<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/102580/">http://git.reviewboard.kde.org/r/102580/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 12th, 2011, 12:08 p.m., <b>Sam Lade</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</blockquote>
<p>On September 12th, 2011, 9:59 p.m., <b>Luc Menut</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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</pre>
</blockquote>
<p>On September 12th, 2011, 10:16 p.m., <b>Sam Lade</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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</pre>
</blockquote>
<p>On October 9th, 2011, 10:38 p.m., <b>Luc Menut</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Sam: can you push this to master? I would do it but can not test the audioCD support for lack of an optical drive.</pre>
<br />
<p>- Bart</p>
<br />
<p>On October 9th, 2011, 10:39 p.m., Luc Menut wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Amarok.</div>
<div>By Luc Menut.</div>
<p style="color: grey;"><i>Updated Oct. 9, 2011, 10:39 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Currently, Amarok does not list the Audio CD in the Collection viewer if the CD is already in the drive when amarok starts. The audio CD is not detected by MediaDeviceCache::refreshCache() at startup (if the CD is already in the drive when amarok starts), but is correctly detected by MediaDeviceCache::slotAddSolidDevice( const QString &udi ) when the CD is inserted in the drive when amarok is running.
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</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I tested this patch with Amarok 2.4.1 (Mageia 1) and Amarok 2.4.3 (Mageia Cauldron).</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=276032">276032</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/MediaDeviceCache.cpp <span style="color: grey">(70868a6)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/102580/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>
<div>
<a href="http://git.reviewboard.kde.org/r/102580/s/255/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2011/09/12/AmarokMediaSourcesAudioCD_400x100.jpeg" style="border: 1px black solid;" alt="" /></a>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>