Maintaining Different Music Formats #6898
Replies: 1 comment 3 replies
|
I would keep the FLAC library as the only managed library and treat the OGG tree as a reproducible export. The convert plugin already has the two pieces needed for that model:
For example: plugins: convert inline portabletags
item_fields:
portable_artist: |
from unihandecode import Unihandecoder
return Unihandecoder().decode(albumartist or artist)
portable_album: |
from unihandecode import Unihandecoder
return Unihandecoder().decode(album)
portable_title: |
from unihandecode import Unihandecoder
return Unihandecoder().decode(title)
convert:
dest: /path/to/ogg-library
format: ogg
refresh: yes
paths:
default: $portable_artist/$portable_album/$track $portable_titleThat handles the filenames. To transliterate only the metadata in the converted copy, a small local plugin can listen for the convert plugin's from beets.plugins import BeetsPlugin
from unihandecode import Unihandecoder
class PortableTagsPlugin(BeetsPlugin):
def __init__(self):
super().__init__()
self.decoder = Unihandecoder()
self.register_listener("after_convert", self.after_convert)
def after_convert(self, item, dest, keepnew):
fields = ("artist", "albumartist", "album", "title")
tags = {
field: self.decoder.decode(item.get(field) or "")
for field in fields
}
item.write(path=dest, tags=tags)
For the FLAC tagging fix you mentioned, first make sure the corrected tags are written back to the source file, for example with Relevant implementation points are the convert plugin's |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I have a music library in FLAC that I am converting to OGG. No issues there with the convert plugin, things end up mostly how I want them.
What issue I am running into is maintaining a separate OGG library that has all non-ASCII characters removed from the paths and metadata. A device I am playing music on does not support Unicode characters.
I don't want to use the asciify function, as the
unidecodePython package does not have the support I need for the Japanese titles. I understand there is some discussion aboutunihandecodeand I was able to use that standalone to transliterate my metadata, but I've also located a tagging issue present in a FLAC file that I now need to propagate through my OGG files.Is anyone else doing something similar to this? How are you accomplishing it without creating a second non-beets managed library? Or if it is not managed by beets, what are you using?
Thank you!
All reactions