Merge lp:~samuel-buffet/entertainer/eyeD3_exception_proof_indexer into lp:entertainer

Proposed by Samuel Buffet
Status: Merged
Approved by: Paul Hummer
Approved revision: 365
Merged at revision: not available
Proposed branch: lp:~samuel-buffet/entertainer/eyeD3_exception_proof_indexer
Merge into: lp:entertainer
Diff against target: None lines
To merge this branch: bzr merge lp:~samuel-buffet/entertainer/eyeD3_exception_proof_indexer
Reviewer Review Type Date Requested Status
Matt Layman Approve
Review via email: mp+5884@code.launchpad.net

Commit message

EyeD3 exceptions have been fixed.

To post a comment you must log in.
Revision history for this message
Samuel Buffet (samuel-buffet) wrote :

Hi,

Since the time we've removed all try/except in the code, the backend refuses to index my music contents properly.

The traceback I've added in the bug report Bug #366368 demonstrates that the eyeD3 module we use to extract mp3 tags is crashing.

This is why I think we should reintroduce a try/except there waiting for the new indexer that Paul is working on.

Samuel-

Revision history for this message
Matt Layman (mblayman) wrote :

I'm okay with this since most (if not all) of this code will be going away when the new indexer comes into play.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'entertainerlib/backend/components/mediacache/music_cache.py'
2--- entertainerlib/backend/components/mediacache/music_cache.py 2009-02-07 21:43:35 +0000
3+++ entertainerlib/backend/components/mediacache/music_cache.py 2009-04-24 20:41:49 +0000
4@@ -250,8 +250,12 @@
5 - Get tags
6 - Insert data to the music cache database
7 """
8- mp3_file = eyeD3.Mp3AudioFile(filename, eyeD3.ID3_ANY_VERSION)
9- tags = mp3_file.getTag()
10+ try:
11+ mp3_file = eyeD3.Mp3AudioFile(filename, eyeD3.ID3_ANY_VERSION)
12+ tags = mp3_file.getTag()
13+ except:
14+ self.logger.error("Couldn't read ID3tags: " + filename)
15+ return
16
17 if tags is None:
18 self.logger.error("Couldn't read ID3tags: " + filename)

Subscribers

People subscribed via source and target branches