Strange loadPlaylist behavior

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

Strange loadPlaylist behavior

Postby branlr » Thu Dec 15, 2011 6:17 pm

Hi everyone, I am modify subsonic for use in a music library to access reserve content.

I plan to use playlists to list course reserves, and there is an inconsistent and troubling behavior when the playlist is loaded.

Basically, when you actually click "load" to load a given playlist, the main panel will return to the last album you browsed.

However, in another instance of subsonic I have running on another computer, it returns to the Home screen with random items after loading a playlist.

I am trying to figure out why the behavior is different, but also, I would like to know how I can prevent EITHER behavior. It would be much better if it just STAYED on the playlist window. In general, I am not sure why it changes to anything at all when it has not been explicitly asked to. Who is to say you don't still want to browse your playlists?

I have looked at the code of loadPlaylist.jsp, but I see nothing in the code for the "Load" button that dictates the behavior of main.

Any advice on this is super appreciated!

-Brandon

EDIT: After restarting tomcat 6, the behavior is now consistently to return to the home screen. This is more acceptable, but I would still appreciate any advice on where I can alter the behavior of the main panel upon loading a play list.
branlr
 
Posts: 2
Joined: Thu May 26, 2011 8:31 pm

Re: Strange loadPlaylist behavior

Postby ytechie » Mon Jan 02, 2012 11:00 pm

Hi! in the loadPlaylist.jsp file, add "target='playlist'" to the load link as I did below:

Code: Select all
<td class="ruleTableHeader">${playlist}</td>
                    <td class="ruleTableCell">
                        <c:choose>
                            <c:when test="${model.load}">
                                <div class="forward"><a href="${loadUrl}" target="playlist"><fmt:message key="playlist.load.load"/></a></div>
                                <c:if test="${model.user.downloadRole}">
                                    <div class="forward"><a href="${downloadUrl}"><fmt:message key="common.download"/></a></div>
                                </c:if>
                                <c:if test="${model.user.playlistRole}">
                                    <div class="forward"><a href="javascript:deletePlaylist('${deleteUrl}')"><fmt:message key="playlist.load.delete"/></a></div>
                                </c:if>
                            </c:when>
                            <c:otherwise>
                                <c:if test="${model.user.playlistRole}">
                                    <div class="forward"><a href="${appendUrl}"><fmt:message key="playlist.load.append"/></a></div>
                                </c:if>
                            </c:otherwise>
                        </c:choose>
                    </td>
                </tr>


Hope this helps!
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York


Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 7 guests