Commit graph

88 commits

Author SHA1 Message Date
Jacob Danell
027b775fcd Change arg name 2025-10-20 15:22:27 +02:00
Ember Light
472aa12767 Add main functionality 2025-10-16 18:49:14 +02:00
Ember Light
b95a17d8d3 remove feat from custom_feat_words 2025-10-12 22:40:27 +02:00
Ember Light
51c971f089 Fix sourcery-ai comments 2025-10-12 21:38:13 +02:00
Ember Light
37a5f9cb15 Add custom feat words 2025-10-12 20:47:51 +02:00
Trey Turner
f0a6059685 feat(FtInTitle): support tracks by artists != album artist 2025-09-21 22:27:11 +01:00
Šarūnas Nejus
b3d434f58f
Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
Šarūnas Nejus
e334e81d40
Use item.filepath instead of displayable_path in logging 2025-08-30 23:10:21 +01: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
7cada1c9f8
Remove no-op decargs 2025-07-08 11:37:33 +01:00
wisp3rwind
b495286127 ftintitle: flatten code
linear code with early exits instead of more complicated nested
conditionals
2025-04-14 20:50:01 +02:00
wisp3rwind
8413de1a85 ftintitle: add typings 2025-04-14 20:42:59 +02:00
Peter Dolan
447cc82e04
Do not write unchanged items to the library in FtInTitle (#5718)
FtInTitle performs a library store operation for every item it
processes, whether or not the item has changed. By limiting the
`item.store()` call to only those cases when the item has changed, the
plugin’s performance when processing an entire library improves by two
to three orders of magnitude.
2025-04-14 18:22:41 +00:00
Karl Besser
ed627c031c Hardcode for_artist keyword in ftintitle plugin
Remove the optional `for_artist` keyword in the
`ftintitle.contains_feat` function and hardcode it to False, since it is
always used like this in the ftintitle plugin.
2024-09-30 10:24:09 -05:00
Karl Besser
c66eb10445 Fix false positives in "feat. X" detection in ftintitle
The old version of the `ftintitle.contains_feat` function could lead to
false positives by matching words like "and" and "with" in the title,
even if there was no "feat. X" part.
With this commit, the `for_artist` keyword is explicitly passed to the
`plugins.feat_tokens` function to disable these matches when matching a
title (and not an artist).
2024-09-26 17:20:12 -04:00
Šarūnas Nejus
85a17ee503
Reformat the codebase 2024-09-21 11:57:48 +01:00
Karl Besser
218cda0401 Fix missing keep_in_artist option in ftintitle
The newly introduced option to keep the feat. artist in the artist field
when importing with the ftintitle plugin was not passed in one function.
2024-09-20 20:47:10 -04:00
Karl Besser
15d652dbae Update log message for keeping artist in ftintitle
Update the log message when the artist is kept unchanged due to setting
the keep_in_artist option to true.
2024-09-05 12:28:51 +02:00
Karl Besser
c046dc3976 Add new keep_in_artist option for ftintitle plugin
The new keep_in_artist option allows keeping the feat. part in the
artist metadata field while still changing the title.
2024-07-09 23:49:20 -04: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
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
a6be28a65e Fix #2817: drop in configuration was ignored
This was overridden by the default CLI option. Now the default for the
config option is None, meaning no change to the config.
2018-02-23 18:18:32 -05:00
Adrian Sampson
fae8fcc932 ftintitle: Clarify indexing
This can only be a two-element array, so just use the index 1. This matches
better with the comments, that say "right-hand side" instead of "the last
value in the list."
2017-04-19 19:08:15 -04:00
Adrian Sampson
9d42728f7f ftintitle: Clarify control flow
Assigning to this variable made it hard to tell what the function was actually
returning.
2017-04-19 19:07:29 -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
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
7d00ab3b50 Removed unicode_literals from plugins
* fetchart
* freedesktop
* fromfilename
* ftintitle
2016-02-20 13:44:45 +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
Adrian Sampson
9f7aa866bd Use ui.should_write everywhere
There sure are a lot of plugins that want to write metadata!
2015-11-07 13:20:09 -08:00
Adrian Sampson
90178ab380 Always log a template literal (fix #1481)
Otherwise, we risk the user-provided string looking like a format string! If
it contains curly braces, it can behave unexpectedly.
2015-05-28 23:44:41 -04:00
Amish Bhadeshia
9a38b07ed4 Housekeeping and styling changes 2015-03-28 11:20:28 +00:00
Amish Bhadeshia
6365a9b538 Added indice into curly brackets, for py26 compatabiity 2015-03-27 20:54:42 +00:00
Amish Bhadeshia
232ff05766 Added tests and simplified implementation method 2015-03-27 17:59:35 +00:00
Amish Bhadeshia
d2a95158f2 Updated ftintitle plugin to follow a format 2015-03-21 15:36:39 +00:00
Adrian Sampson
14ce6a557e Merge pull request #1183 from marcaddeo/refactor-ftintitle
Refactor ftintitle

Conflicts:
	beetsplug/ftintitle.py
2015-01-31 12:51:15 -08: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
Adrian Sampson
24317fd4c7 Rename BeetsPlugin._import_stages to import_stages
For #1208. Restores backwards-compatibility and matches the development docs.
2015-01-11 14:27:59 -08: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
32673b87e7 Update multiple plugins: pass the logger around 2015-01-06 21:42:09 +01:00
Bruno Cauet
1afe82fb41 Make 2 plugins rely on auto log level mgmt
ftintitle and title don't do manual management anymore.
2015-01-06 21:27:15 +01:00
Bruno Cauet
427f7e7035 Automatic logger level changes on import
Breaking changes: plugins should set set _import_stages instead of
import_stages. From outside the latter is replaced by import_stages().
This is because it is now wrapped with log level-getting & -setting
statements.
2015-01-06 21:27:15 +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
Marc Addeo
8cd3d0059f Remove ArtistNotFoundException in favor of returning None for simplicity 2014-12-29 11:10:43 -05:00