Commit 9b8f43a
committed
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>1 parent 2bd77b9 commit 9b8f43a
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
998 | 1004 | | |
999 | 1005 | | |
1000 | 1006 | | |
| |||
1007 | 1013 | | |
1008 | 1014 | | |
1009 | 1015 | | |
1010 | | - | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1011 | 1020 | | |
| 1021 | + | |
1012 | 1022 | | |
1013 | 1023 | | |
1014 | 1024 | | |
| |||
0 commit comments