Not logged in. · Lost password · Register
Forum: General discussion RSS
updating <#playlist_numtracks> and <#playlist_leng
mferit #1
Member since Jun 2006 · 8 posts
Group memberships: Members
Show profile · Link to this post
I am working on a skin, and in my "browse.html" file, I have references to <#playlist_numtracks> and <#playlist_length>. On my "browse.html" page, after I click on a

<a href="browser.html?add=<#browser_enc_directoryname>">add directory</a>

   or a

<a href="browser.html?add=<#browser_enc_filename>">add file</a>

   or a

<a href="browser.html?file=<#browser_enc_filename>">add and play file</a>

the <#playlist_numtracks> and <#playlist_length> do not reflect the changes, even after I do a browser-initiated reload (using both Firegox and IE on WinXP home) or a issue a "browser.html?refresh" command. The only way I can get them to update is to navigate to my index.html page and then back to my browser.html.

On the other hand, on my "editplaylist.html" page, "?removesong" updates <#playlist_numtracks> and <#playlist_length> as expected.

Is there a way to make get the <#playlist_numtracks> and <#playlist_length> fields to update on a page with "?add" and "?file" ?
Avatar
Tom W.M. #2
Member since Feb 2003 · 40 posts · Location: La Crosse, WI, USA
Group memberships: Members
Show profile · Link to this post
Does a force refresh--Ctrl]-[F5]--make any difference?
mferit #3
Member since Jun 2006 · 8 posts
Group memberships: Members
Show profile · Link to this post
A forced refresh--Ctrl]-[F5]--doesn't work. :(
But I did find a workaround. :)

I solved it  by placing
<!-- <table><#playlist template=templates/nothing.html highlight=templates/nothing.html></table> -->
in the troublesome page.

I suspect that the fields that were not being updated are updated by the browseamp server when it processes <#playlist template ...>. Even though it is in a comment, the <#playlist template ...> still gets processed by the server (confirmed by looking at the resulting code sent to the browser).
Avatar
Tom W.M. #4
Member since Feb 2003 · 40 posts · Location: La Crosse, WI, USA
Group memberships: Members
Show profile · Link to this post
Huh.  Weird bug.  Henry?

Thanks for finding a workaround--this may come in handy later.
mferit #5
Member since Jun 2006 · 8 posts
Group memberships: Members
Show profile · Link to this post
I should also add that I needed to place the workaround code *before* the references to <#playlist_numtracks> and <#playlist_length>.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Page created in 165.1 ms (73.9 ms) · 58 database queries in 63.4 ms
Current time: 2018-02-21, 13:13:10 (UTC +00:00)