Page 1 of 2

Refresh left frame and now playing problems

PostPosted: Sat Jan 07, 2012 8:50 pm
by cypherljk
- When you switch accounts (log out -> log back in) the left panel listing the artists does not change from the theme of previously logged
in user (bug). It is the previous user's theme not the current one.

- - When you are playing a playlist and select 'Playing' from the top panel the currently playing does not change as the playlist changes.
I have playlists of different artists and albums but the center box does not update past the 1st time I select "Playing"

I was using two different systems (Dual Core Intel Win 7 box & Single Core XP box) both on Firefox (multiple versions but
I am on the latest)

I love Subsonic.....

Thanks Sindre

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Sat Jan 07, 2012 9:21 pm
by BKKKPewsey
That is due to the browser cache - if you delete the browser cache and refresh page the correct info will display.
I am not sure if Sindre is using a refresh command in the header but perhaps a refresh page button in the main window
is required - although some browsers appear to be stubborn in updating.

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Sat Jan 07, 2012 9:38 pm
by cypherljk
That would take care of the theme not changing but not the playlist issue. Although I am capable of forcing the cache to refresh most ppl
would probably not be. I run my server and have accounts set up for my family and friends and if they come behind each other they
would experience the issue.

Playlist would still be broken....

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Sun Jan 08, 2012 12:24 am
by ytechie
When you are playing a playlist, and you click "Playing" in the top menu, it does not show the correct album for the current user? I am trying to recreate the problem on my end, and I can't seem to cause any disconnect between the playlist and the now playing info. :?

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Sun Jan 08, 2012 12:49 am
by BKKKPewsey
Now my server is back on line (some essential maintenance) I can concur with ytechie that problem is not reproducible on mine either.
5 secs delay max and the main frame changes to show the current playing album :?
That's using a playlist where every track is from a different album/artist.

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Mon Jan 09, 2012 9:48 pm
by cypherljk
Let me give you the exact steps to reproduce the issue with pictures...

1.) Log in to Subsonic
2.) Under the drop down with "More Options" select "Load" under Playlist
3.) (see pic) Select Load from the list of playlists and the playlist will be load with the last playing album showing (*bug*)
step_3.png

4.) (see pic) Click the 1st item on the bottom to start the playlist playing (Note: the large center will stay on
the last album played *bug*
step_4.png

5.) Select "Playing" from the top bar and the album where the currently playing song was added to the
playlist is shown will be displayed (* correct *)
6.) (see pic) Song #1 completes playback and 2nd song in the list starts playing (the 1st songs album art is
still listed and does not change * bug *).
step_6.png

7.) (see pic) Song #2 completes playback and 3rd song in the list starts playing( the 1st songs album art is
still listed and does not change
step_7.png

8.) (see pic) The album art does not update until I click "Playing" again across the top pane
step_8.png

I am a developer and can provide you with any information needed to fix the issue... I run Firebug on FireFox
so just let me know if you need anything from my browser or my server

cypherljk

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Mon Jan 09, 2012 10:14 pm
by ytechie
This is not a bug at all. This is the normal operation of Subsonic when using a web player.

nowPlaying.view shows the last played album. When the playlist is loaded, the last song played does not change until you actually play a song from the playlist.

The playlist does not refresh the center frame when the song changes. nowPlaying.view refreshes by default every 3 minutes.

Once again, this is perfectly normal.

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Mon Jan 09, 2012 10:23 pm
by ytechie
Would you like to know how to make the main frame show the currently playing album when the song changes? :wink: 8)

(I figured out a way, but I am trying to improve it before I post it)

Now Playing main frame not updating in web player

PostPosted: Tue Jan 10, 2012 12:26 am
by BKKKPewsey
Ok this is weird - looking at cypherljk's screenshots I realised that 1 difference was that I was using jukebox player.
With that it does exactly as I have already stated eg now playing shows the currently playing track (5 sec delay max)
However when I change to the web player it only updates if I hit the now playing icon to force a refresh :?
So why does it refresh automatically using jukebox and, in my case, not all using the web player.
As I rarely use the web player, as the 500 watt amp connected to the server sounds a bit better than me lappie speakers, I have not noticed this before :P

I'm not sure where you are getting the 3 mins update from ytechie but after 12 mins and 6 tracks it was still showing the original album :roll:

I would concur that there does appear to be a problem using the web player :(

Thanks for screenshots cypherljk and bringing it to our (Sindre's) attention
I am suprised that no one else has commented on this before so I wonder if it a new "feature" :roll:

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Tue Jan 10, 2012 1:30 am
by ytechie
The 3 min refresh is because of a refresh meta tag in main.jsp.
nowPlaying.view redirects the middle frame to main.view with the correct album path.

However, I was wrong. After examining some of the source behind the frames, it looks like it does not refresh when it is showing the furthest point of an album.

However, if you click "up", and examine the source, you will see that there is a refresh!

Both the now playing screen and the screen you hit after clicking "up" are main.view.
That is where my assumption caught me off guard :D
Even though both are main.view, both do no have the meta refresh!

So BKKKPewsey, you are right that if you stay on now playing, it does not refresh.
However, if you navigate up, it will refresh even though it is the same main.view!

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Tue Jan 10, 2012 1:35 am
by ytechie
Also, there is an easy fix.

This is how to refresh the main frame 3 seconds after changing songs.

Go to the playlist.jsp file located in the WEB-INF/jsp directory.

Scroll down to the function skip(index):

Code: Select all
function skip(index) {
        if (index < 0 || index >= songs.length) {
            return;
        }

        var song = songs[index];
        currentStreamUrl = song.streamUrl;
        updateCurrentImage();
        var list = new Array();
        list[0] = {
            file:song.streamUrl,
            title:song.title,
            provider:"sound"
        };

        if (song.duration != null) {
            list[0].duration = song.duration;
        }
        if (song.format == "aac" || song.format == "m4a") {
            list[0].provider = "video";
        }

        player.sendEvent("LOAD", list);
        player.sendEvent("PLAY");
    }


Add this line right before the end of the function:

Code: Select all
setTimeout("top.main.location = 'nowPlaying.view?'", 3000);


The timeout is to give the playlist a chance to update the information so we don't navigate to the last played album.

Hope this helps!

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Tue Jan 10, 2012 2:07 pm
by cypherljk
Thanks that fix for the playlist update works. Any ideas on the account one? It's not a biggie.... I know having the code post a refresh was mentioned...

Re: 2 Bugs.... (1 account / 1 playlist)

PostPosted: Tue Jan 10, 2012 3:40 pm
by BKKKPewsey
ytechie wrote:However, if you navigate up, it will refresh even though it is the same main.view!

BKKKPewsey wrote:However when I change to the web player it only updates if I hit the now playing icon to force a refresh
I thought I had said that :)

Any ideas on why the jukebox player updates the main frame automatically?

As far as the refresh of left frame is concerned over to you "ytechie"
(An onLoad=reload "" command comes to mind but not really my skill set)

ps cypherljk I am changing the thread title so its easier to reference.

Re: Refresh left frame and now playing problems

PostPosted: Tue Jan 10, 2012 9:48 pm
by ytechie
I meant navigate up by clicking the "up" link. This will pop a meta refresh into the page. 8)

There is a clause in main.jsp that only adds a refresh if the frame is not showing the now playing window.

Re: Refresh left frame and now playing problems

PostPosted: Sun Jan 15, 2012 8:09 pm
by ytechie
Just realized that this topic still had a valid question that wasn't answered.

I experience the same problem occasionally with the left frame.
You see, the left frame is cached because of how large it can be, how often it will need to be loaded, and how seldom it will change dramatically.

The caching control is done by the http server backend. The file you are going to want to take a look at is web.xml.