Rockbox Technical Forums
Support and General Use => Theming and Appearance Customization => Topic started by: JdGordon on January 07, 2010, 02:56:36 AM
-
bertrik got this silly idea into my head today that it would be relativly simple to implement a playlist viewer for the WPS...
well it turns out it was :)
(http://www.rockbox.org/tracker/task/10898?getfile=21179)
Thats a simple example as usual... the 4 lines are in a viewport which dumps many upcoming tracks as will fit (or are in the playlist).
The top three show the title and track length because they have been buffered already. The bottom one shows the filename because its not on the buffer yet.
My goal is to make it very customisable, so while its in development I need help figuring out the syntax for the wps token.
Right now you just add %Vp in a viewport and it will display in the whole viewport. I'm thinking something like the following would be good...
%Vp|<start offset>|<WPS code to display if ID3 is loaded>|<display if not loaded>
start offset is the first track to start the listing.. I want to allow this to be negative so you can see the previous tracks also, but that doesnt work yet, 0 would be the current track and 1 is the next track
I really want to make this flexible which means putting in a very simple skin parser for the text (limited to pretty much just %i* tokens and a few others)
Right now none of the lines scroll... if a skin parser is used we can probaly get scrolling happening, but maybe its not needed? a flag for scroll all or scroll none could be enough?
do we need to bother showing the current track differently? like with an icon or shading like the lists? I'm thinking not really...
anyway, have a play with the patch, or come up with ideas on what to add...
-
nuts... Its looking very likely that without major work of som sort or another, I wont be able to aadd the full customisability I want.
so instead I'll just hard code two versions which you can chose from (suggestions welcome)
the first will be one line per track, like the screenshot but the time display aligned on the right and the title scrolling (if enabled)
the second will be 2 lines per track, the first being the artist (scrolling if enabled) or the directory if no id3 is avilable, the second line will be the title/filename
That should be enough to waste screen space :)
-
Since you invited ideas.... ;D
What about a line for totals (number of tracks, time)
It would also be nice if this (or something similar) could be available from the WPS context menu. That way, it would be available even if one does not want to allocate space on the wps for the viewport for the playlist viewer.
Just my $.02 for what it is worth.
-
the point of this is to add more info which isnt available in the standard WPS tokens. number of tracks is easily available, and total time isnt ever going to be (without reading every track in the playlist there is no way to know this, and thats a nodo)
you have the real playlist viewer available in the wps context menu which is much more useful than this.
-
I'd suggest dropping the "start value" and just check if there's already a %X (X stands for Next in playlist info) tag used. Then only the end value has to be defined and the start value will always be either track 3 or track 2 (if no %X tag is used). Do you read me?
-
nope, I have no idea what you are trying to say :)
by the way, the end value isnt defined, it goes by the size of the viewport, so if there is enough for 3 lines, 3 lines will be displayed.
I originally wanted to be able to display something like:
4: previous
5: current <- the track that is currently playing
6: next
7: next+1
which is why the start offset is important (not everyone is going to want to see the previous and current track).
Also, from a codeing point of view, looking back to see if any tokens were used is bad.
-
the point of this is to add more info which isnt available in the standard WPS tokens. number of tracks is easily available, and total time isnt ever going to be (without reading every track in the playlist there is no way to know this, and thats a nodo)
you have the real playlist viewer available in the wps context menu which is much more useful than this.
I see your point about not reading time for all of the tracks in the playlist - perhaps it would be useful to display a total time for the tracks available in the buffer. The playlist viewer does not display any times at all.
Anyway, thanks for all of your contributions in making Rockbox a great product.
-
I see your point about not reading time for all of the tracks in the playlist - perhaps it would be useful to display a total time for the tracks available in the buffer.
As much as I too wish there were a way to display a total time for all tracks in the buffer (don't worry! I understand why it's a nodo) I do not see the value in displaying the total playtime left in the buffer.
I can not think for an honest use for this, outside the entertainment of watching the number go down and up, down and up.
;)
-
oh yeah! I got a very limited parser/displayer working :D
(http://imagebin.ca/img/DyqnHRD1.bmp)
Those top 3 lines are being drawn from the skin line "|%pp.%ia - %it|"
-
I can not think for an honest use for this, outside the entertainment of watching the number go down and up, down and up.
;)
Heaven forbid that we would think a feature be added to Rockbox just for entertainment. ;D
-
Could there be a way to implement this conditionally?
Like when Hold is on for instance?
I'm thinking from the viewpoint of limited screen size.
Just curious, no importence.
[St.]
-
of course. just put it in a conditional viewport.
-
well bugger the lot of you.... I'm having fun implementing this wehether you want it or not! :D
(http://imagebin.ca/img/U8AzZB.bmp)
I've come up with a clever way to make it extremely customisable (including partial scrolling) without making the code complex :D
Everything under "Up next:" in that screenshot is this playlist viewer. except there are 3 of them! One does the playlist number, one does the track title/filename (could be scrolling if you wanted but I tihnk that looks crap), and one does the track time (-- is because those tracks havnt been buffered yet).
I've attached my wps to give you an idea how it looks... the skin language is now looking like:
%Vp|<offset>|<code to show if id3>|<show me otherwise>|
the offset is how far from the current track to start displaying. 0 is the current track, 1 is the next track, etc
The code in the next two parts is a very limited skin code. NO conditionals, and just about no tags are supported... the following list are supported:
<free text>
%pp - playlist position
%fn - file name
%fp - file path
%ia - artist
%it - track title
%pt - track length
%s - scroll the whole line
add suggestions for which other tags to add support for.
-
Good work. I also like the look of this and cant wait to get started themeing with it.
-
I'm looking forward to try this out :)
thanks
-
I'm definetely going to use this in my theme as well - as soon as I can.
It looks very nice and seems pretty customizable by now
-
I have to admit I rather like where this is going, I only regret I own a DAP with very little screen space, though I may still have to play with it when I get a chance anyway to see if I can't make something work...
-
This just got commited :) I'll put my example wps on the theme site
-
Blame [St.] for this post....
The attached wps shows off more of this feature :p
I'm now using sublines and conditional viewports to display (alternativly) the title, author and genre of each track (with the playlist number and track time always shown)
This will be on the theme site as soon as checkwps lets me upload it :/
-
you know whats crazy? i remember when the rockbox for the h1xx series was being developed and we were talking about UI. it had this kind of feature, but photoshopped. Users said that this would never be implemented and now look how far we have come? this is great!
-
This is a very nice addition - now we need some of the more artistic types to come up with themes :)
-
once 3.5 comes out, I'm going to modify amarok for the ipod video, deleting some of the lower stuff and replacing it with playlist info :)
-
A question: how many viewers can be used per screen? I understand that I am able to put them to conditional vps... right?
I have some freakn' neat wps ideas :D
-
bakseetdrivr: why wait for 3.5? (especially when it looks like there is no interest in releaseing for a while anyway)
raudonkepuraite: there is no limit to the amount of these you can put on the screen, the demo a few posts up has 5... anyone using more than 20 will get a special prize from me :D
psycho_maniac: you wouldnt like to find that discussion would you? would be pretty funny to look back on
If there are any tags which you really want but don't work now, let me know.
-
Blame [St.] for this post....
w00t!
Happy to take the blame for that :D
[St.]
-
If there are any tags which you really want but don't work now, let me know.
I really want %C tag... is it possible?
-
its not possible
-
(http://img62.imageshack.us/img62/4595/fidelityplaylist.jpg)
Works great, thanks for this feature.
This will be even better when I can display it "along" with Album Art instead of instead of it :D
-
As much as I too wish there were a way to display a total time for all tracks in the buffer (don't worry! I understand why it's a nodo)
Can you explain why it's a no-do? Is it due to the expense of opening each file just to determine its runtime? What about EXTM3U tags in the playlist? There's an old patch on the tracker that's probably out of sync now that adds support for EXTM3U tags. http://www.rockbox.org/tracker/task/7652
However, I guess this doesn't actually help for getting the total runtime unless the entire playlist is scanned when it's loaded. I'm not sure whether or not that's the case.
-
even using the EXTM3U (which doesnt guarentee correctness), there is nowhere to store these numbers, remember the playlist could be very large.
and yes, we don't want to open every file to see their length
-
Yes, it may contain all tracks on the player (or more even).
The discussion just caught my eye and reminded me of this patch, in particular these comments by the author: Supporting EXTM3U format has several potential benefits:
1. Instead of displaying filenames, track title and length can easily be viewed when viewing playlist (currently I think there is a patch that does it by opening each file).
2. Length of playlist can be readily calculated by summing, which can have some interesting applications such as finding how much time is left in current playlist. (Currently this is not possible yet with this patch, but I'm still thinking of possible solutions).
I can see that finding the total playtime for playlists of arbitrary length could be problematic even without the problem of opening each file.
-
I havnt looked at the extm3u patch, and I wouldnt have any problem accepting it if its done correctly, especially now we have this which would put it to good use. the hard thing is storing all that extra info safely.
-
... anyone using more than 20 will get a special prize from me :D
Do 18 viewports qualify if they're conditional viewports? ;D
(http://themes.rockbox.org/themes/320x240/breeze/1-2.png)
I obviously had some fun with your playlist viewer today and I noticed some things:
1. The %fn tag works like the %fm tag (->it does show the file extension) while %fm does not work at all.
Being able to leave out the file extension would be nice since file names tend to be pretty long and screen space is limited
2. The %d1,%d2,... tags would also be nice. Assuming a proper folder structure (Artist/Album/title.mp3), you could still provide useful information even without ID3-tags in most cases.
-
Post the wps.. looks gooood
-
It's on the theme site for Cowon D2 (and iPod Video, I guess)
http://themes.rockbox.org/index.php?themeid=508&target=cowond2
-
haha right. I forgot it lets you choose the offset :p and no, you need to get to 20 for the prize.
I'll fix %fn/m and I want to fix %d but there isnt much that can be done without a bit of extra work (which is planned, but no time just yet)
-
Alright, 21 viewports!
(http://img27.imageshack.us/img27/5420/neu3.png)
Actually, there are 22 viewports in the viewer, but the track info on the top is a normal viewport that displays the %it tag. I noticed some rare cases when the viewer would show nothing at all if the id3 info is missing. Now there's at least one line that says "unknown" in that case.
The theme is ready for upload, but the theme site's checkwps won't let me upload it at the moment.
Now what's my prize? ;D
I'm looking forward to your fixes and I hope getting the %d tag to work won't cause too much struggle.
And thank you for all the work you put in the wps/sbs stuff. You surely know how to keep me interested in making themes for rockbox :)
-
you got your prize yesterday! your very own copy of the win32 d2 sim :)
%d is going to be a struggle so it wont happy any time soon I think. And I had a look at fn/m and its not so simple either :/
-
Hehe, I knew you'd say that :) Thanks again for helping me out.
Aligning works nicely for items with ID3 tags. Not sure about when there's no info, though. It seems it doesn't work there (yet)
-
Any particular reason why the playlist viewer doesnt display the last track?
Im using Rockbox r24777-1002.
Ive tried several albums, always doesnt display the last track.
-
that was a bug which I fixed maybe 2 weeks ago...
-
that was a bug which I fixed maybe 2 weeks ago...
Ok cool. Thanks. Just need to find a more up to date sim then. Cheers.