On 8/12/16 14:55, Daniel Köbsch wrote:
Hi Johan,
your config seems like what i'm looking for, but i have an strange error
here.
-----------
config.yaml
directory: /run/media/daniel/Music/
library: ~/Music/musiclibrary.blb
paths:
default:
%asciify{%lower{$path_genre}}/%asciify{%lower{$path_letter}}/%asciify{%lower{$albumartist_sort}}/${path_year}-%asciify{%lower{$album}}/${track}-%asciify{%lower{$title}}
comp:
%asciify{%lower{$path_genre}}/v/various_artists/%asciify{%lower{$albumartist_sort}}/${path_year}-%asciify{%lower{$album}}/${track}-%asciify{%lower{$title}}
singleton:
%asciify{%lower{$path_genre}}/%asciify{%lower{$path_letter}}/%asciify{%lower{$albumartist_sort}}/non-album/${track}-%asciify{%lower{$title}}
-----------------------------
doing an "beets import /media/music/tbs/The Main Drag"
leads to
/run/media/daniel/Music/$path_genre/$path_letter/main drag,
the/${path_year}-yours as fast as mine/track-title
wich is…almost good ;)
do you know what i'm missing?
$path_letter, $path_year, and $path_genre are "template fields" I
defined myself with the inline plugin. You'd need to define them to your
liking, mine look something like this (people who actually know how to
code please cover your eyes)
----
pathfields:
path_genre: |
if 'alternative' in genre.lower():
return 'rock'
if 'musical' in genre.lower():
return 'soundtracks'
if 'soundtrack' in genre.lower():
return 'soundtracks'
if 'tango' in genre.lower():
return 'latin'
if 'ambient' in genre.lower():
return 'metal'
if 'doom' in genre.lower():
return 'metal'
for g in ['classical', 'metal', 'rock', 'pop']:
if g in genre.lower():
return g
return genre
path_letter: |
if albumartist_sort and not None:
if albumartist_sort[0].isdigit():
return '0-9'
return albumartist_sort[0]
if albumartist and not None:
if albumartist[0].isdigit():
return '0-9'
return albumartist[0]
if artist and not None:
if artist[0].isdigit():
return '0-9'
return artist[0]
return 'fix_it'
path_year: |
if original_year == 0:
return year
return original_year
----
hope this helps,
.jh
--
You received this message because you are subscribed to the Google Groups
"beets" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.