Compare commits

..

No commits in common. "master" and "dev" have entirely different histories.
master ... dev

View File

@ -1,9 +1,7 @@
from beets.plugins import BeetsPlugin
from beets import config
import os
rename_cache = os.path.expanduser('~/beets_mv3u_renames')
music_root = config['directory'].get()
rename_cache = os.path.expanduser('~/.cache/beets_mv3u_renames')
class MV3U(BeetsPlugin):
def __init__(self):
@ -40,8 +38,8 @@ class MV3U(BeetsPlugin):
def add_rename(self, item):
src = item.path.decode().replace(music_root, '')
dst = item.destination().decode().replace(music_root, '')
src = item.path.decode()
dst = item.destination().decode()
with open(rename_cache, 'a') as cache:
cache.write(f'{src}\t\t{dst}\n')