beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.89k stars 1.82k forks source link

'beet import' in pretend mode with autotagging off should show the destination #1405

Open flight16 opened 9 years ago

flight16 commented 9 years ago

Background

I want to see the destination of an import so I know I didn't make a mistake that will send my music collection sprawling across my hdd.

I have a large directory of perfectly tagged files. I simply want to import them to beets and move them to directories based on their tags.

Commands executed, output displayed

kaeru:~ flight16$ beet import -A --pretend /Volumes/Music/Vanilla/Music/BT\ -\ ESCM/
Album: /Volumes/Music/Vanilla/Music/BT - ESCM
  /Volumes/Music/Vanilla/Music/BT - ESCM/101 Firewater.m4a
  /Volumes/Music/Vanilla/Music/BT - ESCM/102 Orbitus Teranium.m4a
  /Volumes/Music/Vanilla/Music/BT - ESCM/103 Flaming June.m4a
  /Volumes/Music/Vanilla/Music/BT - ESCM/104 Lullaby For Gaia.m4a
  /Volumes/Music/Vanilla/Music/BT - ESCM/105 Memories In A Sea Of Forgetfulness.m4a
  /Volumes/Music/Vanilla/Music/BT - ESCM/106 Solar Plexus.m4a
  /Volumes/Music/Vanilla/Music/BT - ESCM/107 Nectar.m4a
  /Volumes/Music/Vanilla/Music/BT - ESCM/108 Remember.m4a
  /Volumes/Music/Vanilla/Music/BT - ESCM/109 Love, Peace, And Grease.m4a
  /Volumes/Music/Vanilla/Music/BT - ESCM/110 Content.m4a
kaeru:~ flight16$


That output doesn't isn't useful to me. It doesn't allow me to verify the files will go where I think they will go, that the files have all of the metadata to be used for the path template, and that I don't have any errors in my path template.

kaeru:~ flight16$ beet import -A  /Volumes/Music/Vanilla/Music/BT\ -\ ESCM/
/Volumes/Music/Vanilla/Music/BT - ESCM
kaeru:~ flight16$ tree /Volumes/Music/Vanilla/Beets/
/Volumes/Music/Vanilla/Beets/
├── BT\ -\ ESCM
│   ├── $disk01\ Firewater.m4a
│   ├── $disk02\ Orbitus\ Teranium.m4a
│   ├── $disk03\ Flaming\ June.m4a
│   ├── $disk04\ Lullaby\ For\ Gaia.m4a
│   ├── $disk05\ Memories\ In\ A\ Sea\ Of\ Forgetfulness.m4a
│   ├── $disk06\ Solar\ Plexus.m4a
│   ├── $disk07\ Nectar.m4a
│   ├── $disk08\ Remember.m4a
│   ├── $disk09\ Love,\ Peace,\ And\ Grease.m4a
│   └── $disk10\ Content.m4a
└── library.blb

1 directory, 11 files
kaeru:~ flight16$

Whoops! Syntax error in my path template caused my files to go to the wrong destination.

What I expected to see

kaeru:~ flight16$ beet import -A --pretend /Volumes/Music/Vanilla/Music/BT\ -\ ESCM/
Source                                                                               Target
/Volumes/Music/Vanilla/Music/BT - ESCM/101 Firewater.m4a                          -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk01 Firewater.m4a                           
/Volumes/Music/Vanilla/Music/BT - ESCM/102 Orbitus Teranium.m4a                   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk02 Orbitus Teranium.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/103 Flaming June.m4a                       -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk03 Flaming June.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/104 Lullaby For Gaia.m4a                   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk04 Lullaby For Gaia.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/105 Memories In A Sea Of Forgetfulness.m4a -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk05 Memories In A Sea Of Forgetfulness.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/106 Solar Plexus.m4a                       -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk06 Solar Plexus.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/107 Nectar.m4a                             -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk07 Nectar.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/108 Remember.m4a                           -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk08 Remember.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/109 Love, Peace, And Grease.m4a            -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk09 Love, Peace, And Grease.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/110 Content.m4a                            -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk10 Content.m4a
(10 files)

Or if beets detects my terminal isn't wide enough

kaeru:~ flight16$ beet import -A --pretend /Volumes/Music/Vanilla/Music/BT\ -\ ESCM/
/Volumes/Music/Vanilla/Music/BT - ESCM/101 Firewater.m4a                          
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk01 Firewater.m4a                           
/Volumes/Music/Vanilla/Music/BT - ESCM/102 Orbitus Teranium.m4a                   
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk02 Orbitus Teranium.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/103 Flaming June.m4a                       
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk03 Flaming June.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/104 Lullaby For Gaia.m4a                   
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk04 Lullaby For Gaia.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/105 Memories In A Sea Of Forgetfulness.m4a 
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk05 Memories In A Sea Of Forgetfulness.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/106 Solar Plexus.m4a                       
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk06 Solar Plexus.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/107 Nectar.m4a                             
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk07 Nectar.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/108 Remember.m4a                           
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk08 Remember.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/109 Love, Peace, And Grease.m4a            
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk09 Love, Peace, And Grease.m4a
/Volumes/Music/Vanilla/Music/BT - ESCM/110 Content.m4a                            
   -> /Volumes/Music/Vanilla/Beets/BT - ESCM/$disk10 Content.m4a
(10 files)

I also expect to see the above when I run the command for real.

(This isn't some made-up example. It was honestly my very first experience with beets 5 minutes ago.)

sampsyo commented 9 years ago

Thanks for the request. This seems reasonable.

tomjaspers commented 9 years ago

Right now the pretend mode skips all parts of the import process, and just prints the files selected. Very basic, and little informative.

Would it not be more expected behavior to have the importer run and group the albums, look up the candidates, and then print out what would happen to the files ?

This way a user would experience the actual importing process, without fear of making changes to his filesystem / the database.

sampsyo commented 9 years ago

Absolutely, although I can at the moment see uses for both. This feature was originally created to check whether filtering and such were yielding the right set of files; that's probably best served by something that just quickly lists out paths. But you're right that it might also be useful to run the whole, slow process and just skip the actual importing.

I'm not sure whether that calls for another new config option or just something like a "forced action" where the action can be "skip".

tomjaspers commented 9 years ago

Just spitballing here, but let's say:

Use cases:

  1. Normal import: nothing changes from the current process / current output
  2. Display which files would be imported, without the slow tagging process: $ beet -v import --pretend -A . This will also show how the files will be moved (and thus cover this issues' use-case).
  3. Display how the files will be tagged (can make the first import less scary for new users): $ beet import --pretend
  4. Display which files will be processed, how they will be tagged, and how they will be moved: $ beet -v import --pretend
sampsyo commented 9 years ago

This seems eminently reasonable! And no new flag required.

It seems like the implementation should be fairly straightforward too, right? Just check in the appropriate pipeline stages and suppress action, rather than dropping the tasks altogether as we do now.

tomjaspers commented 9 years ago

Yeah, barring any unforseen special cases, it should be little work. I'll get something up tomorrow, probably.

tomjaspers commented 9 years ago

Sorry I've been MIA! Gotta focus on finishing thesis before I can start work on beets again.

sampsyo commented 9 years ago

@tomjaspers Hey, me too! :smiley: https://github.com/sampsyo/thesis