beets/beets
weiqianwang123 9b8f43ad97 avoid unnecessary writes when modifying non-media fields
This patch prevents Item.write() from performing a mediafile.save()
when no writable media tag fields have changed. Without this change,
commands such as 'beet modify -a onplayer=true' trigger unnecessary
file writes, updating mtimes and causing significant slowdowns.

Fix verified with a tiny mp3 test case.

Signed-off-by: Qianwei Wang <qweiw@umich.edu>
Signed-off-by: weiqianwang123 <1416740298@qq.com>
2025-12-07 21:08:27 -05:00
..
autotag Centralise warnings for maintainers into deprecate_for_maintainers 2025-11-30 07:02:46 +00:00
dbcore pyupgrade Python 3.10 2025-11-08 12:09:52 +00:00
importer pyupgrade Python 3.10 2025-11-08 12:09:52 +00:00
library avoid unnecessary writes when modifying non-media fields 2025-12-07 21:08:27 -05:00
test tests: move command tests into dedicated files 2025-11-03 14:00:58 +01:00
ui Move PromptChoice to beets.util module 2025-12-02 01:51:14 +00:00
util Move PromptChoice to beets.util module 2025-12-02 01:51:14 +00:00
__init__.py Centralise warnings for maintainers into deprecate_for_maintainers 2025-11-30 07:02:46 +00:00
__main__.py Reformat the codebase 2024-09-21 11:57:48 +01:00
config_default.yaml Do not force load musicbrainz, add a test to show the behaviour 2025-11-30 07:42:21 +00:00
logging.py fix: Sanitize log messages by removing control characters 2025-12-02 15:27:24 +05:00
mediafile.py Centralise warnings for maintainers into deprecate_for_maintainers 2025-11-30 07:02:46 +00:00
metadata_plugins.py pyupgrade Python 3.10 2025-11-08 12:09:52 +00:00
plugins.py Do not force load musicbrainz, add a test to show the behaviour 2025-11-30 07:42:21 +00:00
py.typed Add py.typed marker file to support PEP 561 typing (#5906) 2025-08-09 13:31:55 +02:00
random.py Make a random change for testing 2024-05-07 16:28:28 +01:00