kepstin / regainer

Advanced ReplayGain scanner and tagger
MIT License
22 stars 2 forks source link

misnamed .opus.webm causes stacktrace #3

Open 7eggert opened 5 years ago

7eggert commented 5 years ago

The .opus file was downloaded from a video platform and named .opus by the script or by the browser. Yet it contains a .webm container with an opus stream. Regainer is confused about this.

Namespace(FILE=['foo.opus'], album=deque([]), dry_run=False, exclude=deque([]), force=False, jobs=2, track=deque([]))
./regainer:725: DeprecationWarning: 'with (yield from lock)' is deprecated use 'async with lock' instead
  with (yield from self.job_sem):
Traceback (most recent call last):
  File "./regainer", line 878, in <module>
    loop.run_until_complete(future)
  File "/usr/lib64/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "./regainer", line 745, in scan
    yield from self.read_tags()
  File "./regainer", line 728, in read_tags
    self.tagger.read_gain)
  File "/usr/lib64/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "./regainer", line 460, in read_gain
    if self.audio.tags is None:
AttributeError: 'NoneType' object has no attribute 'tags'
kepstin commented 5 years ago

The underlying mutagen library does not support tagging webm or matroska files… yet. See https://github.com/quodlibet/mutagen/issues/3 and https://github.com/quodlibet/quodlibet/issues/1702

I should be able to provide a more readable error message, however.