Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Unable to resume a failed rip #136

Closed
Freso opened this issue Feb 21, 2017 · 5 comments
Closed

Regression: Unable to resume a failed rip #136

Freso opened this issue Feb 21, 2017 · 5 comments
Labels
Bug Generic bug: can be used together with more specific labels
Milestone

Comments

@Freso
Copy link
Member

Freso commented Feb 21, 2017

morituri (and earlier versions of whipper) would pick up a failed rip and continue work on it if one existed in the --working-directory. Commit 6ddb5d0 broke this functionality.

(testenv) freso@koume ~/D/M/whipper ((6ddb5d01…)|BISECTING)> 
whipper cd --device='/dev/cdrom' rip --working-directory='/tmp/rip-disc.0ZS' --output-directory='' --track-template='%A - %d (%y) [%X]/%t. %a - %n' --disc-template='%A - %d (%y) [%X]/%A - %d' --release-id=''
Using configured read offset 6
Checking device /dev/sr0
eject: Cd-rom-kommandoen luk skuffen mislykkedes: Inddata/uddata-fejl
CDDB disc id: c60ad910
MusicBrainz disc id uGW3uFk5PpnLkV4kpWF60jv9p5Q-
MusicBrainz lookup URL https://musicbrainz.org/cdtoc/attach?toc=1+16+208425+182+11207+23655+37550+49765+63032+75605+88475+103612+118135+128537+141927+156832+170277+184925+195940&tracks=16&id=uGW3uFk5PpnLkV4kpWF60jv9p5Q-
Disc duration: 00:46:16.573, 16 audio tracks

Matching releases:

Artist  : Amália Rodrigues
Title   : Fados e guitarradas au Portugal
Duration: 00:46:17.267
URL     : https://musicbrainz.org/release/e836cbb9-031b-47b7-81b7-4b1d7041badc
Release : e836cbb9-031b-47b7-81b7-4b1d7041badc
Type    : Album
Barcode : 3229264011325
Cat no  : 401132

** Message: pygobject_register_sinkfunc is deprecated (GstObject)
Output directory Amália Rodrigues - Fados e guitarradas au Portugal (1995) [FLAC] already exists
Found Hidden Track One Audio from frame 0 to 31
Ripping track 0 of 16: 00. Amália Rodrigues - Hidden Track One Audio.flac
Checksums match for track 0               
Peak level: 0.00% 
Rip quality: 100.00%
HTOA discarded, contains digital silence
Verifying track 1 of 16: 01. Amália Rodrigues - Fado da adiça.flac
Traceback (most recent call last):        
  File "/home/freso/tmp/testenv/lib/python2.7/site-packages/whipper-0.4.2-py2.7.egg/morituri/extern/task/task.py", line 511, in c
    callable(*args, **kwargs)
  File "/home/freso/tmp/testenv/lib/python2.7/site-packages/whipper-0.4.2-py2.7.egg/morituri/common/checksum.py", line 289, in _crc32
    w = wave.open(self.path)
  File "/usr/lib64/python2.7/wave.py", line 511, in open
    return Wave_read(f)
  File "/usr/lib64/python2.7/wave.py", line 164, in __init__
    self.initfp(f)
  File "/usr/lib64/python2.7/wave.py", line 131, in initfp
    raise Error, 'file does not start with RIFF id'
wave.Error: file does not start with RIFF id
exception Error at /usr/lib64/python2.7/wave.py:131: initfp(): file does not start with RIFF id
Traceback (most recent call last):
  File "/home/freso/tmp/testenv/lib/python2.7/site-packages/whipper-0.4.2-py2.7.egg/morituri/extern/task/task.py", line 511, in c
    callable(*args, **kwargs)
  File "/home/freso/tmp/testenv/lib/python2.7/site-packages/whipper-0.4.2-py2.7.egg/morituri/common/checksum.py", line 289, in _crc32
    w = wave.open(self.path)
  File "/usr/lib64/python2.7/wave.py", line 511, in open
    return Wave_read(f)
  File "/usr/lib64/python2.7/wave.py", line 164, in __init__
    self.initfp(f)
  File "/usr/lib64/python2.7/wave.py", line 131, in initfp
    raise Error, 'file does not start with RIFF id'
Error: file does not start with RIFF id
(testenv) freso@koume ~/D/M/whipper ((6ddb5d01…)|BISECTING) [255]> git bisect log
git bisect start
# bad: [c7108592152c882041af039c676231aa46294bc2] Merge pull request #134 from ubitux/master
git bisect bad c7108592152c882041af039c676231aa46294bc2
# bad: [c7108592152c882041af039c676231aa46294bc2] Merge pull request #134 from ubitux/master
git bisect bad c7108592152c882041af039c676231aa46294bc2
# good: [490d84380a367ac913dc7eb5b78532dee220a959] Amend previous tagged release (#107)
git bisect good 490d84380a367ac913dc7eb5b78532dee220a959
# bad: [6ddb5d0114a480a8f65404ea3ea9216f628f633f] Add gstreamer-less flac encoder and tagging (#121)
git bisect bad 6ddb5d0114a480a8f65404ea3ea9216f628f633f
# good: [4dc7a3cf770cca523420f395fc2d4cc54cd24b6a] Merge pull request #114 from JoeLametta/fix-old-rip-references
git bisect good 4dc7a3cf770cca523420f395fc2d4cc54cd24b6a
# first bad commit: [6ddb5d0114a480a8f65404ea3ea9216f628f633f] Add gstreamer-less flac encoder and tagging (#121)
@Freso
Copy link
Member Author

Freso commented Feb 21, 2017

How it should behave:

(testenv) freso@koume ~/D/M/whipper ((6ddb5d01…)|BISECTING)> git checkout 6ddb5~1
Previous HEAD position was 6ddb5d0... Add gstreamer-less flac encoder and tagging (#121)
HEAD is now at 4dc7a3c... Merge pull request #114 from JoeLametta/fix-old-rip-references
(testenv) freso@koume ~/D/M/whipper ((4dc7a3cf…)|BISECTING) [255]> python2 setup.py install --optimize=1 -v
[…]
(testenv) freso@koume ~/D/M/whipper ((4dc7a3cf…)|BISECTING)> 
whipper cd --device='/dev/cdrom' rip --working-directory='/tmp/rip-disc.0ZS' --output-directory='' --track-template='%A - %d (%y) [%X]/%t. %a - %n' --disc-template='%A - %d (%y) [%X]/%A - %d' --release-id=''
Using configured read offset 6
Checking device /dev/sr0
eject: Cd-rom-kommandoen luk skuffen mislykkedes: Inddata/uddata-fejl
CDDB disc id: c60ad910
MusicBrainz disc id uGW3uFk5PpnLkV4kpWF60jv9p5Q-
MusicBrainz lookup URL https://musicbrainz.org/cdtoc/attach?toc=1+16+208425+182+11207+23655+37550+49765+63032+75605+88475+103612+118135+128537+141927+156832+170277+184925+195940&tracks=16&id=uGW3uFk5PpnLkV4kpWF60jv9p5Q-
Disc duration: 00:46:16.573, 16 audio tracks

Matching releases:

Artist  : Amália Rodrigues
Title   : Fados e guitarradas au Portugal
Duration: 00:46:17.267
URL     : https://musicbrainz.org/release/e836cbb9-031b-47b7-81b7-4b1d7041badc
Release : e836cbb9-031b-47b7-81b7-4b1d7041badc
Type    : Album
Barcode : 3229264011325
Cat no  : 401132

** Message: pygobject_register_sinkfunc is deprecated (GstObject)
Output directory Amália Rodrigues - Fados e guitarradas au Portugal (1995) [FLAC] already exists
Found Hidden Track One Audio from frame 0 to 31
Ripping track 0 of 16: 00. Amália Rodrigues - Hidden Track One Audio.flac
Checksums match for track 0               
Peak level: 0.00% 
Rip quality: 100.00%
HTOA discarded, contains digital silence
Verifying track 1 of 16: 01. Amália Rodrigues - Fado da adiça.flac
Verifying track 2 of 16: 02. Amália Rodrigues - Tantacao.flac
Verifying track 3 of 16: 03. Amália Rodrigues - La porque tens cinco pedras.flac
Verifying track 4 of 16: 04. Amália Rodrigues - Quandos os outros te batem.flac
Verifying track 5 of 16: 05. Amália Rodrigues - Fado Lisboeta.flac
Verifying track 6 of 16: 06. Amália Rodrigues - Minha canção è saudade.flac
Verifying track 7 of 16: 07. Amália Rodrigues - Variaçoes em sol.flac
Verifying track 8 of 16: 08. Amália Rodrigues - Noite (variaçoes).flac
Verifying track 9 of 16: 09. Amália Rodrigues - Al mouraria.flac
Verifying track 10 of 16: 10. Amália Rodrigues - Serenata a Lisboa.flac
Verifying track 11 of 16: 11. Amália Rodrigues - Bailado do fado.flac
Verifying track 12 of 16: 12. Amália Rodrigues - Que deus me perdoe.flac
Verifying track 13 of 16: 13. Amália Rodrigues - Fados das Tamanquinhas.flac
Verifying track 14 of 16: 14. Amália Rodrigues - Fria calridade.flac
Ripping track 15 of 16: 15. Amália Rodrigues - Aquela rua.flac
Checksums match for track 15               
Peak level: 50.97% 
Rip quality: 100.00%
Ripping track 16 of 16: 16. Amália Rodrigues - Variaçoes no fado Lopes.flac
Checksums match for track 16               
Peak level: 33.71% 
Rip quality: 100.00%
AccurateRip URL http://www.accuraterip.com/accuraterip/b/8/9/dBAR-016-001ac98b-014357ba-c60ad910.bin
2 AccurateRip reponses found
Track  0: unknown          (not tracked)                    
Track  1: rip accurate     (max confidence      4) [aee96ce3], DB [aee96ce3]
Track  2: rip accurate     (max confidence      4) [5392ea01], DB [5392ea01]
Track  3: rip accurate     (max confidence      4) [d206f366], DB [d206f366]
Track  4: rip accurate     (max confidence      4) [63e3fe4e], DB [63e3fe4e]
Track  5: rip accurate     (max confidence      4) [652afd8b], DB [652afd8b]
Track  6: rip accurate     (max confidence      4) [c176fb24], DB [c176fb24]
Track  7: rip accurate     (max confidence      4) [7967543b], DB [7967543b]
Track  8: rip accurate     (max confidence      4) [5dd81f4f], DB [5dd81f4f]
Track  9: rip accurate     (max confidence      4) [33f4046f], DB [33f4046f]
Track 10: rip accurate     (max confidence      4) [bae0b549], DB [bae0b549]
Track 11: rip accurate     (max confidence      4) [1754ff8b], DB [1754ff8b]
Track 12: rip accurate     (max confidence      4) [ee4ad78f], DB [ee4ad78f]
Track 13: rip accurate     (max confidence      4) [c67626c7], DB [c67626c7]
Track 14: rip accurate     (max confidence      4) [0016d9f5], DB [0016d9f5]
Track 15: rip accurate     (max confidence      4) [66899cf3], DB [66899cf3]
Track 16: rip accurate     (max confidence      4) [0db2a2bb], DB [0db2a2bb]

@JoeLametta JoeLametta added the Bug Generic bug: can be used together with more specific labels label Apr 28, 2017
@JoeLametta JoeLametta added this to the 1.0 milestone Apr 28, 2017
@MerlijnWajer
Copy link
Collaborator

Should this have 1.0 as milestone? It's kind of annoying, but not a deal breaker. Perhaps 1.1 or so?

@MerlijnWajer
Copy link
Collaborator

MerlijnWajer commented Jan 7, 2018

By the way, the fix is rather simple, I believe. Just have the track verification use wave=False when reading the track, so that it decodes the flac properly.

@MerlijnWajer
Copy link
Collaborator

Anyone want to try what I suggested?

@JoeLametta
Copy link
Collaborator

Anyone want to try what I suggested?

Will test it later today, thanks.

MerlijnWajer added a commit to MerlijnWajer/whipper that referenced this issue Jan 26, 2018
Thanks to Freso for testing.

command/cd: Only call makedirs when dir does not exist
common/checksum: Support flac input files

Fixes whipper-team#136
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Generic bug: can be used together with more specific labels
Projects
None yet
Development

No branches or pull requests

3 participants