From ffed536d5dc568532e97100fc6e1e7f66061a559 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 24 Apr 2012 21:58:06 -0700 Subject: [PATCH] add %aunique to default path formats (#190) At this point, everything's in place except for the import workflow. Album directory uniquification works if you import two identically-named albums and then immediately execute "beet move". Currently, however, a couple of things prevent this from working as expected during the normal import process: - The tmpl_aunique method expects the item to be associated with an album in the database before it is called. This is currently not the case. - With the multithreaded importer, it's possible for both duplicates to have their destinations calculated before either is added to the database. This means that neither will detect a duplicate at the time of the move/copy. - Even if the above issue is resolved, it will be the case that only the second album to be imported will have a uniquifying string added. If we want to add the string to the old album, we'll need to explicitly move it. Also, documentation on this feature is still forthcoming. --- beets/ui/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index d34ff9971..195440f53 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -56,9 +56,9 @@ PF_KEY_QUERIES = { 'singleton': 'singleton:true', } DEFAULT_PATH_FORMATS = [ - (library.PF_KEY_DEFAULT, '$albumartist/$album/$track $title'), - (PF_KEY_QUERIES['singleton'], 'Non-Album/$artist/$title'), - (PF_KEY_QUERIES['comp'], 'Compilations/$album/$track $title'), + (library.PF_KEY_DEFAULT, '$albumartist/$album%aunique{}/$track $title'), + (PF_KEY_QUERIES['singleton'], 'Non-Album/$artist/$title'), + (PF_KEY_QUERIES['comp'], 'Compilations/$album%aunique{}/$track $title'), ] DEFAULT_ART_FILENAME = 'cover' DEFAULT_TIMEOUT = 5.0