Review Request: Fix audio CD's discovery at amarok's startup (bug 276032)

Luc Menut lmenut at free.fr
Sun Oct 9 22:38:34 UTC 2011



> On Sept. 12, 2011, 12:08 p.m., Sam Lade wrote:
> > First of all, thanks for looking at this - I know it's been annoying a lot of our users.
> > 
> > It doesn't seem to be working reliably for me. Sometimes an audio CD is correctly shown on startup, but a lot of the time it doesn't work. Mostly it seems to work after first insertion of the audio CD, but after a couple of Amarok startups it ceases to do so for subsequent starts. I can't get any reliable trigger for this happening, however.
> > 
> > I'm running Amarok Git (it's not that far from 2.4.3 at the moment) on KDE 4.7.0 and Qt 4.7.2 on Kubuntu. I can provide any relevant sections of the debug output if you wish (give me things to grep for, or I can just dump the lot if you can find it), or any other debugging info you're after.
> 
> Luc Menut wrote:
>     Thanks for the feedback. Sadly, I can't reproduce here the problem; I started/stopped/started amarok several times with an audio CD in the CD drive, and the audio CD always appears correctly in Local Music (without the patch the audio CD only appears if the audio CD is inserted when amarok is already running).
>     Just to be sure we are speaking of the same things, by Collection viewer, I mean the left panel "Media Sources" and not the Playlist (cf screenshot). I know that "amarok --cdplay" still doesn't work properly, and most of the time doesn't add automatically the CD tracks in the playlist.
>     I haven't the time to build Amarok from git for now. Perhaps, it could be interesting to have feedback from others users on others systems/distribs.
>     
>     --
>     Luc Menut
>     Mageia Contributor
> 
> Sam Lade wrote:
>     Yes, I'm solely referring to the appearance in the local music section, and only starting Amarok normally. 
>     
>     There does appear to be a link between whether Amarok starts playing and whether the CD reliably appears. I couldn't get the CD to not appear when I started Amarok with no music playing, but it was hit and miss with music playing. Not sure if this is chance or an actual effect. Maybe try with "resume playback on start" and music playing when you quit to see if you can get the same issue?
>     
>     I caught a debug log for a start with the CD not detected (this is grepping for AudioCd with 50 lines of context, hope this is enough to be useful): http://pastebin.com/7GTTEr6i
>     Same thing with Amarok stopped and the CD detected on start: http://pastebin.com/mr9ZVxtd

First, sorry to reply so late.

This week-end, I built Amarok git, but I still can't reproduce your issue; I tried with "resume playback on start" and music playing, and even with quick start/stop/start/..., the audio CD always appears.

I looked at your debug files; it appears that even when the CD doesn't appear in "local music" (http://pastebin.com/7GTTEr6i), the CD is correctly detected by MediaDeviceCache::refreshCache() (lines 28 to 50):
- line 46 & 47 are the debug of lines 133 & 134 of MediaDeviceCache.cpp with this patch (Found Solid::DeviceInterface::OpticalDisc with udi =  "/org/freedesktop/UDisks/devices/sr0:media")
- line 49 ([MediaDeviceCache] device is an Audio CD) is the debug of line 140 of MediaDeviceCache.cpp with the patch, so at the end of MediaDeviceCache::refreshCache() (line 50 "END__: void MediaDeviceCache::refreshCache()) the CD is correctly detected. Without this patch, you wouldn't have line 49 "device is an Audio CD".

Your issue show there is another bug in an other part of the code that sometimes prevents the CD to appear in "local music", but I don't sufficiently know and understand amarok's code to help on this part of the bug.

--
Luc Menut
Mageia Contributor


- Luc


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102580/#review6439
-----------------------------------------------------------


On Sept. 11, 2011, 4:40 p.m., Luc Menut wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102580/
> -----------------------------------------------------------
> 
> (Updated Sept. 11, 2011, 4:40 p.m.)
> 
> 
> Review request for Amarok.
> 
> 
> Description
> -------
> 
> Currently, Amarok does not list the Audio CD in the Collection viewer if the CD is already in the drive when amarok starts.
> 
> 
> I don't have write access to kde git, so could you commit the change for me if the patch looks fine. Thanks.
> 
> regards,
> Luc
> 
> 
> This addresses bug 276032.
>     https://bugs.kde.org/show_bug.cgi?id=276032
> 
> 
> Diffs
> -----
> 
>   src/MediaDeviceCache.cpp 70868a6 
> 
> Diff: http://git.reviewboard.kde.org/r/102580/diff/diff
> 
> 
> Testing
> -------
> 
> I tested this patch with Amarok 2.4.1 (Mageia 1) and Amarok 2.4.3 (Mageia Cauldron).
> 
> 
> Screenshots
> -----------
> 
> 
>   http://git.reviewboard.kde.org/r/102580/s/255/
> 
> 
> Thanks,
> 
> Luc Menut
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20111009/3c3b7851/attachment.html>


More information about the Amarok-devel mailing list