change default view to "newest"

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

Moderator: moderators

change default view to "newest"

Postby 3R3 » Sat Mar 12, 2011 8:42 pm

Inspiration by various posters in a feature request here: Set default view to NEWEST instead of random

to have the suggested mod (newest view instead of random view in main tab) not only show up when manually navigating to home.view or when first logging in, but also when staying there refreshing as often as the randow view to keep the newest view almost updated in real-time, follow below instructions acurately!


Backup, stop server, edit files, restart server, clear browser cache, login!

[OPTIONAL]
(to make "newest" appear leftmost in the main tab)
In home.jsp in subsonic/jetty/xxxx/webapp/WEB-INF/jsp find:
Code: Select all
<c:forTokens items="random newest highest frequent recent users" delims=" " var="cat" varStatus="loopStatus">

replace with:
Code: Select all
<c:forTokens items="newest highest frequent recent random users" delims=" " var="cat" varStatus="loopStatus">

save!


[NEEDED]
in index.jsp find:
Code: Select all
<frame name="main" src="nowPlaying.view?" marginwidth="0" marginheight="0">

replace with:
Code: Select all
<frame name="main" src="home.view?listSize=10&listType=newest" marginwidth="0" marginheight="0">

save!


in top.jsp find:
Code: Select all
<td class="logo" style="padding-right:2em"><a href="home.view?" target="main"><img src="<spring:theme code="logoImage"/>" title="${help}" alt=""></a></td>
    <c:if test="${not model.musicFoldersExist}">
        <td style="padding-right:2em">
            <p class="warning"><fmt:message key="top.missing"/></p>
        </td>
    </c:if>
    <td>
        <table><tr align="center">
            <td style="min-width:4em;padding-right:1.5em">
                <a href="home.view?" target="main"><img src="<spring:theme code="homeImage"/>" title="${home}" alt="${home}"></a><br>
                <a href="home.view?" target="main">${home}</a>

replace with:
Code: Select all
<td class="logo" style="padding-right:2em"><a href="home.view?listSize=10&listType=newest" target="main"><img src="<spring:theme code="logoImage"/>" title="${help}" alt=""></a></td>
    <c:if test="${not model.musicFoldersExist}">
        <td style="padding-right:2em">
            <p class="warning"><fmt:message key="top.missing"/></p>
        </td>
    </c:if>
    <td>
        <table><tr align="center">
            <td style="min-width:4em;padding-right:1.5em">
                <a href="home.view?listSize=10&listType=newest" target="main"><img src="<spring:theme code="homeImage"/>" title="${home}" alt="${home}"></a><br>
                <a href="home.view?listSize=10&listType=newest" target="main">${home}</a>

save!

DONE!
enjoy!

EDIT: works now! :-)
fixed error in code snipped
Last edited by 3R3 on Wed Mar 16, 2011 1:18 am, edited 4 times in total.
User avatar
3R3
 
Posts: 332
Joined: Mon May 04, 2009 2:09 pm
Location: Germany

Postby benzubi » Tue Mar 15, 2011 8:09 pm

hey

I try to use this but I can't find the line

Code: Select all
<frame name="main" src="home.view?" marginwidth="0" marginheight="0">


in my index.jsp

weird :shock:
benzubi
 
Posts: 31
Joined: Sat Feb 19, 2011 12:17 am

Postby 3R3 » Tue Mar 15, 2011 8:17 pm

benzubi wrote:hey

I try to use this but I can't find the line

Code: Select all
<frame name="main" src="home.view?" marginwidth="0" marginheight="0">


in my index.jsp

weird :shock:

That IS weird, as this file defines the main frameset and only contains some 27 lines. Have you tried looking by hand/eye? In my case its line 16, you should really be able to find it.
User avatar
3R3
 
Posts: 332
Joined: Mon May 04, 2009 2:09 pm
Location: Germany

Postby benzubi » Tue Mar 15, 2011 9:49 pm

Take a look at my file :oops:

/var/subsonic/jetty/2169/webapp/WEB-INF/jsp/index.jsp

MOD: Removed pic link as no longer showing correct image

Am I blind or did I miss somthing?
benzubi
 
Posts: 31
Joined: Sat Feb 19, 2011 12:17 am

Postby 3R3 » Wed Mar 16, 2011 1:16 am

nope I'm sorry. I was stupid and forgot I had edited the "nowPlaying.view" to "main.view". Use that line and it should work just fine. The line with "name="main" src="nowPlaying.view" it is.
User avatar
3R3
 
Posts: 332
Joined: Mon May 04, 2009 2:09 pm
Location: Germany

Postby benzubi » Wed Mar 16, 2011 8:58 am

ok :)

works fine indeed.

this feature should be in the next release, it's so nice to have new stuff as home page when using it with friends!
benzubi
 
Posts: 31
Joined: Sat Feb 19, 2011 12:17 am

Postby cyclopes » Tue Apr 19, 2011 12:32 am

Nice 8)
Vote Confirmation ;)
User avatar
cyclopes
 
Posts: 51
Joined: Thu Mar 12, 2009 11:33 pm
Location: Norway

Postby Hellscream » Sun Jul 24, 2011 6:00 pm

Awesome work working fine +1 :D
Image
User avatar
Hellscream
 
Posts: 160
Joined: Fri Apr 22, 2011 11:47 am
Location: Serbia

Postby mudsharkymon » Tue Jul 26, 2011 10:27 pm

Does this tweak :

1) Differentiate NEW from MODIFIED? If I select New I do not want to see modified entries come up!
2) work on version 3.7?

Thx!
mudsharkymon
 
Posts: 58
Joined: Mon May 04, 2009 5:36 am

Postby Hellscream » Tue Jul 26, 2011 10:38 pm

If you modify files inside folders nothing will be registered, but if you change folder it will be shown as new in your library. About version 3.7 i think it will work fine just back up before u change anything.
Image
User avatar
Hellscream
 
Posts: 160
Joined: Fri Apr 22, 2011 11:47 am
Location: Serbia

Re: change default view to "newest"

Postby boognish43 » Wed Nov 30, 2011 5:00 am

does this still work? I cant find the code in the top.jsp
boognish43
 
Posts: 66
Joined: Sat Jan 09, 2010 3:13 pm

Re: change default view to "newest"

Postby BKKKPewsey » Wed Nov 30, 2011 2:23 pm

boognish43 wrote:does this still work? I cant find the code in the top.jsp

Where does it say edit top.jsp :?
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: change default view to "newest"

Postby boognish43 » Wed Nov 30, 2011 4:52 pm

3R3 wrote:Inspiration by various posters in a feature request here: Set default view to NEWEST instead of random

in top.jsp find:
Code: Select all
<td class="logo" style="padding-right:2em"><a href="home.view?" target="main"><img src="<spring:theme code="logoImage"/>" title="${help}" alt=""></a></td>
    <c:if test="${not model.musicFoldersExist}">
        <td style="padding-right:2em">
            <p class="warning"><fmt:message key="top.missing"/></p>
        </td>
    </c:if>
    <td>
        <table><tr align="center">
            <td style="min-width:4em;padding-right:1.5em">
                <a href="home.view?" target="main"><img src="<spring:theme code="homeImage"/>" title="${home}" alt="${home}"></a><br>
                <a href="home.view?" target="main">${home}</a>

replace with:
Code: Select all
<td class="logo" style="padding-right:2em"><a href="home.view?listSize=10&listType=newest" target="main"><img src="<spring:theme code="logoImage"/>" title="${help}" alt=""></a></td>
    <c:if test="${not model.musicFoldersExist}">
        <td style="padding-right:2em">
            <p class="warning"><fmt:message key="top.missing"/></p>
        </td>
    </c:if>
    <td>
        <table><tr align="center">
            <td style="min-width:4em;padding-right:1.5em">
                <a href="home.view?listSize=10&listType=newest" target="main"><img src="<spring:theme code="homeImage"/>" title="${home}" alt="${home}"></a><br>
                <a href="home.view?listSize=10&listType=newest" target="main">${home}</a>

save!

DONE!
enjoy!

EDIT: works now! :-)
fixed error in code snipped


In the original post.. am I missing something?
boognish43
 
Posts: 66
Joined: Sat Jan 09, 2010 3:13 pm

Re: change default view to "newest"

Postby BKKKPewsey » Wed Nov 30, 2011 5:05 pm

:P I think we both need new glasses 8)
Yes you are right but I just checked my top.jsp file (4.6beta2) and the code is there.

Code: Select all
<td class="logo" style="padding-right:2em"><a href="help.view?" target="main"><img src="<spring:theme code="logoImage"/>" title="${help}" alt=""></a></td>

    <c:if test="${not model.musicFoldersExist}">
        <td style="padding-right:2em">
            <p class="warning"><fmt:message key="top.missing"/></p>
        </td>
    </c:if>

    <td>
        <table><tr align="center">
            <td style="min-width:4em;padding-right:1.5em">
                <a href="home.view?" target="main"><img src="<spring:theme code="homeImage"/>" title="${home}" alt="${home}"></a><br>
                <a href="home.view?" target="main">${home}</a>
            </td>
            <td style="min-width:4em;padding-right:1.5em">
                <a href="nowPlaying.view?" target="main"><img src="<spring:theme code="nowPlayingImage"/>" title="${nowPlaying}" alt="${nowPlaying}"></a><br>
                <a href="nowPlaying.view?" target="main">${nowPlaying}</a>
            </td>


:mrgreen:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: change default view to "newest"

Postby inajar » Tue Dec 06, 2011 8:11 pm

Thanks a lot for this!
inajar
 
Posts: 1
Joined: Tue Dec 06, 2011 8:09 pm

Next

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 6 guests