Commit graph

3247 commits

Author SHA1 Message Date
Andrew Rogl
ac6cc2ffa4 Fix up invalid master merges 2021-09-26 17:33:15 +10:00
Andrew Rogl
ed07bb5b7e
Merge branch 'master' into pyupgrade 2021-09-26 17:22:15 +10:00
Andrew Rogl
fc4d65a387 Missed a few unicode strings 2021-09-26 16:51:01 +10:00
Andrew Rogl
5859d31405 Commit #4036 2021-09-26 16:41:13 +10:00
Andrew Rogl
6cd7998c3d Forgot to pyupgrade new file 2021-09-26 16:27:20 +10:00
Andrew Rogl
8205b901db Commits #4048 & #4050 2021-09-26 16:03:00 +10:00
Duncan Overbruck
f5e336747a
Add permissions test case for set_art event 2021-09-12 16:40:58 +02:00
Duncan Overbruck
264e771e7c
permissions: set album art permissions 2021-09-12 16:40:44 +02:00
Edgars Supe
d40f0c8860 Fill default config for albumtypes plugin 2021-09-10 14:48:28 +03:00
Edgars Supe
131befa132 Improve albumtypes plugin code 2021-09-10 10:23:47 +03:00
Edgars Supe
bee35885bb Add albumtypes plugin 2021-09-09 23:05:12 +03:00
Andrew Rogl
9106b41a50 Remove as many as possible sys.version tests 2021-08-27 10:24:27 +10:00
Andrew Rogl
ee4268dabb Remove unused imports
Fix imports
Fix formatting
2021-08-26 20:59:48 +10: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
Adrian Sampson
fd81d65c4b
Undo string type inversion in convert 2021-08-21 13:24:18 -04:00
Adrian Sampson
e6a1f5a3dc
convert: Split command in str form
...with yet another round-trip conversion. :/
2021-08-19 17:24:01 -04:00
Adrian Sampson
2f5f9ea174
Remove shlex_split utility
This works around a bug that does not exist in Python 3.x, and the
workaround (by calling the underlying shlex.split function with bytes)
was causing crashes on some versions of Python 3. Seemed to work fine on
3.10-dev, though, oddly.
2021-08-19 17:14:16 -04:00
Adrian Sampson
75c41c0546
Remove most six.PY2 checks 2021-08-19 16:45:11 -04:00
Kirill A. Korinsky
b0f7418372
Stream-friendly smart playlists
This commit introduced a way to generate a stream-frienldy playlists.
2021-08-14 02:41:22 +02:00
maffo999
5dbc7f9f33 Moved logging to debug and fixed empty line. Updated changelog to include new option. 2021-07-15 20:13:18 +02:00
maffo999
653181a296 Fix subsonicupdate plugin 2021-07-14 20:10:04 +02:00
wisp3rwind
0c285753fb lyrics: Add some missing None-checks to the Tekstowo source
The previous code had the potential to crash if (when?) Tekstowo changes
their website structure sufficiently.

The new code is rather ugly due to the explicit checks after each and
every function call. Unfortunately, the alternative would be to catch a
bunch of very generic Exceptions (AttributeError, ...), since there's no
such thing as a `BeautifulSoupNotFoundError`.
2021-07-04 10:38:00 +02:00
wisp3rwind
09be82bd75 lyrics: slightly more consistent white space in Tekstowo source 2021-07-04 00:35:42 +02:00
Martin Atukunda
efcc5b3fae
return None for lyrics if Tekstowo fails to extract lyrics
I experienced a failure to parse Tekstowo for song lyrics. 

This patch allowed the lyrics plugin to fetch the lyrics from another provider as opposed to failing.
2021-07-01 09:39:42 +03:00
wisp3rwind
d6ca1cc242 duplicates: fix crash when query return empty results 2021-06-18 17:18:50 +02:00
wisp3rwind
316b79f72f lyrics: slightly refactor beautifulsoup checks
instead of having a global list of sources that require the package,
indicate the dependency using an attribute of the source class
2021-06-18 17:16:04 +02:00
wisp3rwind
038cebfa9b lyrics: remove duplicate check for beautifulsoup
The plugin already disables these sources entirely when beautifulsoup is
not available
2021-06-18 17:16:04 +02:00
wisp3rwind
867d383544 lyrics: wrap BeautifulSoup() constructor to centralize error handling
also ensure that the return value is always checked for None
2021-06-18 17:16:04 +02:00
wisp3rwind
b34442f5d1 lyrics: always check for fetch_url() returning None 2021-06-18 17:16:04 +02:00
wisp3rwind
f8a4c661fa lyrics: return None explicitly 2021-06-18 17:16:04 +02:00
wisp3rwind
76aa97827d lyrics: rename html -> soup for consistency 2021-06-18 17:16:04 +02:00
Andrew Rogl
51d922df27 Merge branch 'master' into fix_#2873 2021-05-24 16:21:27 +10:00
Andrew Rogl
81e50cb630 Too quick to delete 2021-05-23 15:43:14 +10:00
Andrew Rogl
39ca5b7be6 Changes as requested 2021-05-23 14:45:02 +10:00
sandersantema
f3e1d90470
Avoid usage of walrus operator which is only compatible with > 3.8 2021-05-13 12:58:26 +02:00
sandersantema
2cd15a7434 Add itunes_dateadded to itunes metasync plugin 2021-05-13 12:32:42 +02:00
Andrew Rogl
923e3bacd6 Attempt to fix duplicates #2873 2021-05-03 16:03:40 +10:00
Sam Thursfield
2fa3717731 Optimise FormattedMapping when querying a specific set of fields
This changes greatly improves the speed of `beet export` and `beet info`
when the `--include-keys` option is used. It also removes the globbing
feature of `--include-keys` that was added in #1295. (See #3762 for
discussion).

Listing all fields for an item requires querying the database to find
any flex attributes. This is slow when done for every item being
exported. We already have a way for the user to specify a fixed set
of keys, but we previously queried everything and filtered it afterwards.
The new approach is more efficient.

Code that iterates through all fields now have to handle invalid field
names. The export and info plugins output invalid fields as None.

Timings before:

    > /usr/bin/time beet export -i title,path,artist -l  Bob Dylan
    13.26user 20.22system 0:34.01elapsed 98%CPU (0avgtext+0avgdata 52544maxresident)k

    > /usr/bin/time beet export -l  Bob Dylan
    12.93user 20.15system 0:33.58elapsed 98%CPU (0avgtext+0avgdata 53632maxresident)k

Timings after:

    > /usr/bin/time beet export -l  Bob Dylan
    13.33user 20.17system 0:34.02elapsed 98%CPU (0avgtext+0avgdata 53500maxresident)k

    > /usr/bin/time beet export -i title,path,artist -l  Bob Dylan
    0.49user 0.07system 0:00.56elapsed 98%CPU (0avgtext+0avgdata 50496maxresident)k

Notice the dramatic speedup in the last example!
2021-05-01 23:41:09 +02:00
Xavier Hocquet
8b979f2a50 Review comments 2021-04-11 18:38:01 -05:00
Xavier Hocquet
31f4df3ff3 Fix falso positive lyric pages for Tekstowo 2021-04-11 17:30:45 -05:00
Evgeniy Gurevich
afc072801c
Simplify Musixmatch multi-part lyrics parser 2021-04-02 10:35:53 +08:00
Evgeniy Gurevich
a8fe8ce9a7
Fix for Musixmatch multi-part lyrics
Sometimes Musixmatch lyrics come in 2 parts.
Also, sometime non-existent lyrics return some content
2021-04-01 14:21:49 +08:00
Adrian Sampson
eab4372a58
Merge pull request #3900 from Lanny/master
badfiles: Optionally run checkers during import
2021-03-29 19:28:30 -04:00
Ryan Lanny Jenkins
79616b42ed Use simpler approach of asserting that at most one handler of import_task_before_choice returns an action. 2021-03-28 16:53:01 -05:00
Xavier Hocquet
6081e6a8df CR comments 2021-03-28 13:08:00 -05:00
Xavier Hocquet
8c6530369d
Merge branch 'master' into tekstowo-lyrics 2021-03-28 12:05:42 -06:00
Ryan Lanny Jenkins
6c4cb82c03 badfiles: Respect any previous decision to skip an import and don't re-prompt the user. 2021-03-27 12:03:56 -05:00
Ryan Lanny Jenkins
1d4a2c3e2a Add a new hook for badfiles pre-import user interaction, instead of flagging the task. 2021-03-27 11:37:26 -05:00
Ryan Lanny Jenkins
9c17d9a924 linting 2021-03-24 17:29:16 -05:00
Ryan Lanny Jenkins
3e1fe88053 Merge branch 'master' of https://github.com/beetbox/beets 2021-03-24 16:59:24 -05:00