Bug 2184 - Safari Refresh generates new MusicMagic playlist
: Safari Refresh generates new MusicMagic playlist
Status: NEW
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 7.0
: Macintosh MacOS X 10.4
: -- normal (vote)
: Future
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-24 08:05 UTC by Michael Robinson
Modified: 2011-11-06 23:22 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
screen capture 1 (98.07 KB, image/jpeg)
2005-09-24 08:07 UTC, Michael Robinson
Details
Screen capture 2. (153.67 KB, image/jpeg)
2005-09-24 08:08 UTC, Michael Robinson
Details
Traces during browser reload (44.03 KB, text/plain)
2005-09-24 12:46 UTC, Michael Robinson
Details
test option (9.40 KB, patch)
2005-10-12 23:59 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Robinson 2005-09-24 08:05:00 UTC
2005-09-24 nightly.

A Safari reload stops a Music Magic Mix playlist playing + the browser interface is not being updated 
when tracks are added to playlist.

The problems appear to be specific to Safari (I am using 2.0.1).  They do not happen with Firefox  or 
Internet Explorer.

1. Create a Music Magic Playlist by clicking the "m" icon next to a track
2. Click the Play icon beside "This entire playlist" at the top of the playlist.  The first track in the playlist 
starts playing.
3. On the browser "Music Player" interface (right hand side of browser), "Now Playing" shows the first 
track in the playlist.  "THE CURRENT PLAYLIST" is empty and the rest of the MMM playlist is not shown 
(see screen shot 1)
4. Do a browser reload.  The music stops and the browser refresh takes approximately 10 seconds. The 
browser "Music Player" interface shows Stopped.  "THE CURRENT PLAYLIST" shows the first MMM 
playlist. The browser "MusicMagic Mix" interface (left hand side of browser) shows a NEW mix based 
upon the original seed track. (see screen shot 2)

Browser reloads do not affect non-MMM playlists however there appears to be another bug where "THE 
CURRENT PLAYLIST" requires a browser reload to display a track added to the playlist.

1. Click the Play icon beside a track.  The tracks starts playing and "Now Playing" on the browser "Music 
Player" interface shows the track title.
2. Click the + icon beside a track.  "The Current Playlist" remains empty and the track added to the 
playlist is not shown.
3. Do a Browser reload.  The track added to "The Current Playlist" is now shown.

The problems still happen after doing a Reset and Empty Cache on Safari.
Comment 1 Michael Robinson 2005-09-24 08:07:03 UTC
Created attachment 850 [details]
screen capture 1

Current Playlist empty and does not contain the rest of the playlist.
Comment 2 Michael Robinson 2005-09-24 08:08:20 UTC
Created attachment 851 [details]
Screen capture 2.

After browser refresh.	Music stopped. Current Playlist shows first playlist. 
New playlist has been generated on left hand side of browser.
Comment 3 Dan Sully 2005-09-24 10:38:36 UTC
kdf - any ideas here?

I've been noticing similar (and not just MMM) when using Safari.
Comment 4 KDF 2005-09-24 11:10:13 UTC
all skins or just default?  the mmm case isn't unique, but does happen to
require two bits of magic to happen at once.  passing a listref to playtracks is
tricky, as is controlling a refresh when the command is directed at a template
that isn't status_header or status.html. it would help to know if this is all
skins or perhaps which ones fail/pass.

also, try d_source and d_command to see what is stopping the playback. thanks.
Comment 5 KDF 2005-09-24 11:52:04 UTC
two things here.  the status page load, which is supposed to trigger a reload of
the playlist, does not work in safari.

second, and far more stupid and annoying: Safari does a full browser reload
keeping the frames in the previous state! this means the musicmagic query is
redone, AND the command to start playback is RESENT to status_header.html.

I'm fairly sure this must be something new, in both cases for safari.  I'm not
really very adept at debugging with safari, nor familiar with its inner
workings.   I'll do some searching, but I'm really not having a good feeling
about this second issue.  
Comment 6 Michael Robinson 2005-09-24 12:46:47 UTC
Created attachment 853 [details]
Traces during browser reload

Two sets of debug traces with d_source and d_command.

MMM playlist was played then Safari reloaded.  The song stopped playing each
time.
Comment 7 Michael Robinson 2005-09-24 13:07:09 UTC
I quickly tried a few other skins.

Fishbone: the music stopped when doing a browser reload and the full playlist did not appear under "The 
current playlist"

Purple: the music stopped for a few seconds then started playing the first track in the playlist from the 
beginning.  The complete playlist does appear under "The current playlist".

Bagpuss: the music stopped for a few seconds then started playing the first track in the playlist from the 
beginning.  The complete playlist does appear under "The current playlist".
Comment 8 Jacob Potter 2005-10-03 16:46:22 UTC
The page-not-updating issue should be fixed in change 4528. I made the JS
include a timestamp in the URL, to absolutely force a refresh.
Comment 9 KDF 2005-10-03 17:57:54 UTC
sadly, full refresh is still going to be an issue.  jacob's patch only gets the
playlist load working. a page reload in safari will still re-issue commands in
the frameset urls.  
Comment 10 Dan Sully 2005-10-11 23:57:11 UTC
kdf - what's the status here? Do you have a patch?
Comment 11 KDF 2005-10-12 00:20:42 UTC
nope. I can't find any info about this.  As far as I can tell, safari seems to do this all on its own.  A full 
browser refresh seems to remember the url for each frame.  unless we follow all of our commands with 
a secondary reload of the frame using a blank url, I have nothing to offer on this aside from the 
aforementioned observations.  I may, in fact, be totally wrong on what is really happening.  that's just 
my best guess.
Comment 12 KDF 2005-10-12 15:26:32 UTC
perhaps faking a for POST will do what we need.  I've tried out a quick and
dirty test:

<FORM METHOD="POST" NAME="myForm" action="[% webroot %]status.html?player=[%
player %]" target="status">
<INPUT TYPE="HIDDEN" NAME="listref" VALUE="musicmagic_mix">
<INPUT TYPE="HIDDEN" NAME="command" VALUE="playlist">
<INPUT TYPE="HIDDEN" NAME="subcommand" VALUE="addtracks">
<INPUT TYPE="HIDDEN" NAME="player" VALUE="[% player %]">
</FORM>

<td><A HREF="javascript:" onClick="document.myForm.submit();return false">test
link</A><td>

Using this form, the status pane URL is still generic.  I'll have to test with
safari to confirm that it works.  I also still need to see if this can be worked
into the current templates in a way that isn't completely horrible (like it is now)

Comment 13 KDF 2005-10-12 15:39:51 UTC
just noticed something else.  the old p0-p6 params seem to disappear from the
url if used.  the command/subcommand params seem to persist.  Removing those
would also solve the problem.  however, I dont yet know where those differences
are created.
Comment 14 KDF 2005-10-12 21:02:38 UTC
nix that last one.  I'm clearly on drugs.  The p0-p4 params are there.  I just
must have caught the refresh at the right timing.

using the post does work to avoid the restart of playback, but the mix is still
regenerating.  The mixerlink would have to be a form as well, and this makes it
complicated.  

Comment 15 KDF 2005-10-12 23:59:30 UTC
Created attachment 902 [details]
test option

This is a test patch, that may work.  This creates a form for the mixerlink, so
that the mix wont be regenerated.  There is also a new link at the top of the
mix list for "this entire playlist" which will do the play command via a form
post.  This will allow safari to reload the full window, with the drawback of
disallowing any specific frame reload via a right click menu (it warns about
resending POSTDATA).

let me know if this seems ok, or what might be the best way to handle the UI
with these changes.
Comment 16 Michael Robinson 2005-10-20 12:54:29 UTC
Seems to work fine in 6.2b2, thanks.
Comment 17 Dan Sully 2005-10-20 15:48:16 UTC
Closing this, as Mike says it works now.
Comment 18 Michael Robinson 2005-10-20 16:10:50 UTC
oops, I closed this too soon. The original bug mentioned 3 problems, 
a) the now playing song list in Safari wasn't being updated after adding songs to the playlist 
b) Doing a Safari refresh stopped the music playing 
c) Doing a Safari refresh generated a new MMM playlist 

The first 2 problems are fixed but the third still exists- if you generate a MMM playlist in Safari then do a 
refresh, a new MMM playlist is produced.

To be honest, I'm not that bothered about the remaining problem and it looks pretty complex given the 
comments on the bug report so I'll leave it up to you guys how you want to handle this - but I won't be 
complaining if it isn't fixed in 6.2. Thanks,
Comment 19 Dan Sully 2005-10-20 17:43:06 UTC
Yeah - let's push C) off to 6.5 - it seems to be a more complicated fix.
Comment 20 Chris Owens 2007-10-16 09:24:11 UTC
Steven to try to reproduce.
Comment 21 Spies Steven 2007-10-19 12:22:47 UTC
I still see the behavior described in Comment #18 in SqueezeCenter 7 with the classic skin.

With the new default skin if one was to do a refresh the left pane is returned to the home menu. So in a way this is not an issue with the new default skin.

I may have stumbled on another manifestation of this bug though.  Using the classic skin in Safari, if I add tracks to the current playlist, either a single track or multiple tracks, and do a refresh, those tracks will be added again to the bottom of the current playlist.  Each time I hit refresh more of the same tracks will be added.  It does not seem to matter what is current on the left pane and this is independent MusicIP.  This does not happen in the new default skin or Firefox either.
Comment 22 KDF 2007-10-19 13:07:17 UTC
the reason the new default skin works is that most commands are done via a background JS call, rather than an http query to a frame.  No query, no problem with reloads on safari.
Comment 23 Spies Steven 2007-10-24 09:21:26 UTC
Chris, I was able to reproduce the described behavior in SC7 so I changed the version to 7.0a1 and assigned it to you.
Comment 24 Alan Young 2011-11-06 23:22:46 UTC
Unassigned bugs cannot have a priority.