I realized having to host this potentially indefinitely might not be the best idea, so I am going to shut down this gitea instance eventually.
You’ll have time, at least until the end of 2022, probably longer, but please just get all your stuff somewhere safe in case we ever disappear.

Automatically strip beet root from files

This assumes that your mpd and beet roots are the same directory
master
kageru 4 years ago
parent a55c134ac8
commit 360be6b816
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
  1. 8
      mv3u.py

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

Loading…
Cancel
Save