fixup plugin handle directory fails by default

Issue #107 invalid
Rusty Parks
created an issue
def handleDirectory(self, directory, _):
    if not self._file_cache:

The fixup plugin's handle directory doesn't have an obvious way to get past it's early out. Since an empty list is Falsy, it'll fail on the file cache check and early out.

If there's a workaround, please send add example code of how to use this handleDirectory method in the class directory.

Comments (2)

  1. Travis Shirk repo owner

    _file_cache is inherited and managed in the base class. If you run the plugin against a directory and set inpsect the cache it is not empty and the files are processed as a unit.

    $ eyeD3 --plugin=fixup /home/travis/var/music/complete/\(1988\)\ Demo\ \'88/
    Scanning directory /home/travis/var/music/complete/(1988) Demo '88
    Only 5 audio files, process directory as an EP [Yn]? ^C(eyeD3-0.7-devel) 
    travis at nobunny in ~/projects/eyeD3/hg on 0.7.x! 
    $ eyeD3 --plugin=fixup /home/travis/var/music/complete/\(1988\)\ Demo\ \'88/
    > /home/travis/projects/eyeD3/hg/src/eyed3/plugins/
        345     def handleDirectory(self, directory, _):
        346         import ipdb; ipdb.set_trace()
    --> 347         if not self._file_cache:
        348             return
    ipdb> pp self._file_cache
    [<eyed3.mp3.Mp3AudioFile object at 0x7ff78c97b490>,
     <eyed3.mp3.Mp3AudioFile object at 0x7ff78c9889d0>,
     <eyed3.mp3.Mp3AudioFile object at 0x7ff78c994cd0>,
     <eyed3.mp3.Mp3AudioFile object at 0x7ff78c85e810>,
     <eyed3.mp3.Mp3AudioFile object at 0x7ff78c866350>]
  2. Log in to comment