Commit Graph
63 Commits
Author SHA1 Message Date
Šarūnas Nejus 11d41aee7d typing: add missing types to plugins 2026-08-31 11:27:12 +01:00
Šarūnas Nejus 5039c8f6cf typing: add types to event handlers 2026-08-18 10:46:33 +01:00
Temitope S Olugbemi 65a01c2c2a fix(importfeeds): keep import going when a symlink can't be created
When `formats` includes `link`, importfeeds creates a symlink per imported
item. A failed symlink (lacking privilege on Windows, a read-only directory, or
a filesystem without symlink support) raised beets.util.FilesystemError out of
the import pipeline and aborted the whole `beet import` run, even though the
tracks were already imported.

Catch FilesystemError around the link() call, log a per-item warning, and
continue with the remaining items. Add regression tests for the
warn-and-continue behaviour, that only FilesystemError is caught, and that a
successful link still creates the symlink. Add a changelog entry.

Fixes #840.
2026-07-03 10:26:17 -07:00
Sebastian Mohr 54a2bd20e1 Removed This file is part of beets... headers. 2026-06-29 11:20:15 +02:00
Šarūnas Nejus d53ee774a9 Enable and fix flake8-return 2026-06-09 00:14:06 +01:00
Sebastian Mohr adfb73b66d Run ruff format 2026-05-20 16:53:06 +02:00
Šarūnas Nejus d93ddf8dd4 Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
Šarūnas Nejus 1c16b2b308 Replace string concatenation (' + ')
- Join hardcoded strings
- Replace concatenated variables with f-strings
2025-08-30 23:10:15 +01:00
Šarūnas Nejus 85a17ee503 Reformat the codebase 2024-09-21 11:57:48 +01:00
Serene-Arc a6e5201ff3 Apply formatting tools to all files
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
J0J0 TodosandAdrian Sampson 342421a36c Update beetsplug/importfeeds.py
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2023-07-27 20:14:39 +02:00
J0J0 Todos 60227c48f5 Add m3u per session feature to importfeeds plugin 2023-07-27 07:56:14 +02:00
Andrew Rogl 1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
David Logie f909f092fc Fix importfeeds plugin on Python 3. 2017-08-12 16:45:13 +01:00
Johnny Robeson 17883bc501 replace os.symlink() with util.link() in importfeeds 2016-07-09 22:44:26 -04:00
Adrian Sampson 5efd5b21c5 Use new as_str method
Instead of `get(six.text_type)`, which was a surprisingly large portion of our
uses of six.
2016-06-25 19:16:14 -07:00
Johnny Robeson e8afcbe7ec replace unicode with six.text_type 2016-06-24 05:53:49 -04:00
Johnny Robeson 4dd43f1081 write to the m3u file in binary mode in importfeeds 2016-06-12 20:27:01 -04:00
Adrian Sampson e54c7eec3d Standardize __future__ imports without parentheses
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen fc3d10d248 Removed unicode_literals from plugins
* fuzzy
* ihate
* importadded
* importfeeds
* info
* inline
2016-02-20 13:53:10 +01:00
Jack Wilsdon 12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Peter Kessen 3eb8008b11 added encoding as comment in files
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00
Fabrice Laporte 72075dde5d fix #1490 don't overwrite basename argument 2015-06-02 22:12:00 +02:00
David Logie 9b9c033df6 importfeeds: Fix Unicode error when writing files. 2015-02-07 15:13:01 +00:00
Adrian Sampson b8dab9cf9f Merge pull request #1247 from brunal/future
Use all __future__ imports in beets core

Conflicts:
	beetsplug/web/__init__.py
	test/test_embedart.py
2015-01-26 17:02:07 -08:00
David Logie 29de697a8d Fix bug where playlists were not created in subdirs.
Playlist names containing path separators would cause beets to crash if
the parent directories for the playlist didn't already exist.
2015-01-24 13:00:25 +00:00
Bruno Cauet a5026100a3 All plugins use unicode_literals
Given that part of them has no test I may have broke them
2015-01-20 16:22:27 +01:00
Bruno Cauet 90b388b775 Use __future__ imports but unicode_literals everywhere
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.

Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet 4babc40fd8 Delete useless "config['mypluginname']" mentions
Replace with self.config where this is painless.
More plugins would benefit from this update but that requires turning
functions into methods.
2015-01-12 10:55:59 +01:00
Bruno Cauet b27c5304d1 Merge branch 'master' into logging
Conflicts:
	beetsplug/fetchart.py
	beetsplug/mpdstats.py
2015-01-09 15:15:27 +01:00
Frederik “Freso” S. Olesen 4b1f0cbf48 Happy 2015. ;)
See 7a410f636b

Command used:

    git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Bruno Cauet 860e7e1483 Update 3 plugins: func → methods, listeners
- functions turn into method in order to have the logger object
- registering the listener has to be updated too
2015-01-06 21:42:09 +01:00
Bruno Cauet b8211a3c4c Every plugin uses its own logger
logging.getLogger(__name__) everywhere!
Several loggers prefixed every log message with [logername], which we
delete here.
2015-01-06 10:35:44 +01:00
Bruno Cauet 30f158a95e Move "from beets import logging" statements
Move the import next to other beets-related imports
2015-01-05 10:05:21 +01:00
Bruno Cauet 7df8bef8b7 Update logging imports: logging → beets.logging 2015-01-04 17:02:27 +01:00
Bruno Cauet 8cac47af2a Convert beets plugins to lazy logging 2015-01-04 17:02:27 +01:00
robotanarchy 2039d2effe don't use the _write_m3u function for stdout stuff 2014-09-14 20:17:53 +02:00
robotanarchy 68eae9e683 didn't know about flake... 2014-09-13 17:25:10 +02:00
robotanarchy 5b0b3eee45 importfeeds: add new 'echo' type that writes to stdout 2014-09-13 17:11:00 +02:00
Adrian Sampson 5f4a9c6446 fix Windows path manipulation in importfeeds 2014-04-18 15:52:23 -07:00
Adrian Sampson e5a9db1cac fix up some indentation warnings in plugins 2014-04-13 17:55:49 -07:00
Fabrice Laporte 3ead936fe5 flake8 cleaning beetsplug/*
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Thomas Scholtes 0daea144e8 Fix album import feed with slashes
Makes tests from f2da1922b28571216c7bc0eaa71f56a316dc0d5d pass.
Fixes #610 and supersedes #611.
2014-03-19 17:26:11 +01:00
Adrian Sampson 54d8adf6a6 changelog for #180 2013-03-12 22:00:11 -07:00
Lucas Duailibe b9844ccf3a importfeeds: absolute path option (#180) 2013-03-13 01:50:09 -03:00
Adrian Sampson f59ff7e89e importfeeds: use bytestring paths 2013-02-02 08:22:51 -08:00
Fabrice Laporte bc82e04077 importfeeds: fix UnicodeDecodeError when creating symlinks 2013-02-02 10:31:36 +01:00
Adrian Sampson 0969749e5b cleanup, docs, and changelog for relative_to (#74) 2013-01-22 21:02:41 -08:00
Adrian Sampson b4da79b2e9 Merge pull request #74 from phmongeau/relative_feeds
relative importfeeds m3u path
2013-01-22 20:46:42 -08:00
Philippe Mongeau ddbae951c0 importfeeds: add relative_to config 2013-01-22 22:54:13 -05:00