Problem getting track info from freedb (1 Viewer)

IkeV70

Portal Pro
April 28, 2008
55
3
Home Country
Netherlands Netherlands
I think there is a problem with the freedb track info retrieval function in MP.
I've been trying to find the reason wy MP sometimes hangs for 1.5 minutes when opening an Audio CD and then displays the correct track title of only the first few tracks, the rest is just displayed as "Track 03", "Track 04", etc.. This is what I found out:

In Plugins/WindowsPlugins/GUIMusic/GUIMusicFiles.cs, in the OnRetrieveMusicInfo( ) method, there is some code that checks if the CD or Drive has changed:

Code:
                // Disk changed (or other drive)
                if (GUIMusicFiles.MusicCD != null)
                {
                  if (freedb.GetCDDBDiscID(driveLetter).ToLower() != GUIMusicFiles.MusicCD.DiscID)
                  {
                    GUIMusicFiles.MusicCD = null;
                  }
                }
The problem is that two different DiscID's are compared. FreeDB sometimes returns multiple DiscID's. E.g. for my copy of Supertramp - Crime of the Century. The freedb.GetCDDBDiscID() method will return only 1 discid, GUIMusicFiles.MusicCD.DiscID contains multiple comma-separated ID's.
If this situation occurs then GUIMusicFiles.MusicCD will be reset to NULL for each track, The Disc info is therefore retrieved again from freedb for each track. This will be ok for two or three times, but after that the WebRequest to freedb will time out (after 100 seconds -> the 1.5 minute freeze).

Example URL that returns multiple DiscID's:
http://freedb.freedb.org/~cddb/cddb...808&hello=ike+IKE-HP+MediaPortal+1.0+&proto=5

I can reproduce this problem with 0.2.3.0 and with 1.0 RC1, latest SVN files.


Apart from fixing this problem I also suggest setting te WebRequest timeout to something less than 100 seconds. Best thing ofcourse would be to only do asynchronous webrequests to prevent freeze problems alltogether.


Steps to reproduce:
1. Insert audio CD Supertramp - Crime of the century
2. Open Music - Audio CD to see the tracklist in MP


Thanks,

Ike.




TV-Server Version:
MediaPortal Version: 1.0 RC1
MediaPortal Skin:
Windows Version:
CPU Type:
HDD:
Memory:
Motherboard:
Video Card:
Video Card Driver:
Sound Card:
Sound Card AC3:
Sound Card Driver:
1. TV Card:
1. TV Card Type:
1. TV Card Driver:
2. TV Card:
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec:
MPEG2 Audio Codec:
h.264 Video Codec:
Satelite/CableTV Provider:
HTPC Case:
Cooling:
Power Supply:
Remote:
TV:
TV - HTPC Connection:
 

Users who are viewing this thread

Top Bottom