Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category User Interface
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Robert Kukla - 2006-11-07
Last edited by Thomas Martitz - 2011-06-05

FS#6301 - new tags for WPS and tagcache

Tagcache is great for selecting and ordering tracks according to
specific criteria and has allowed me to (re-)discover the music
in my collection in new and different ways. For example I love
being able to listen to the works of an artist in chronological order.

But for some things I still needed to create off-line playlists using
a number of scripts I wrote which is cumbersome and so I set out to integrate
these features into tagcache. This is the result. Unfortunately it is
impossible to separate the features from each other, as they sometimes
modify the same lines in the source, but I have provided patches for the
different stages (starting with simple changes to more complex) ones.

I don’t know if people feel this should go into CVS or not. I have mainly
written it for myself, but if there is interest I can do any required
changes.

Anyway. Here it goes:

1_relplay.patch

relative playtime (relplay) is the cumulative actual playtime divided by cumulative
maximum playtime. I prefer the measure to playcount which counts regardless
of how much of a track I have played and score which discards the number of
times a track was played. For example if you play half of a track twice,
these are the values:

playcount = 2
relplay = 100
score = 50

If you play them completely you’ll get:

playcount = 2
relplay = 200
score = 100

2_comment.patch

This adds the comment field from id3 and vorbis tags to WPS (%fC, %FC) and tagcache.
That is where I have stored special version info (live, remix etc)
and it helps me to not have to listen to the same song again and
again in different incarnations.

For example:

“browse” → genre ? comment !~ “live” & comment !~ “mix” → artist → album → title
“live” → artist ? comment !~ “live” → album → title

3_lyrics+albumart.patch

I have about 2000 lyrics files of different formats to be used with the
excellent plugin sncviewer: http://forums.rockbox.org/index.php?topic=2372.0 and it is difficult to remember which tracks have lyrics and which don’t.
So this patch creates a WPS tag (use either plain %fl or %?fl<none|txt|snc|lrc|lrc8>)
and a tagcache tag for tracks with lyrics.

For example:

“lyrics” → lyrics → genre → artist → title
“need timestamps” → genre ? lyrics = “TXT” → artist → title

Similar for album art. The WPS code %fa will indicate if a track has an associated
image file. Since I have a h120, I am only interested in *.jpg files, but it can
be extended to include *.bmp files if so required.

“no album art” → genre ? albumart = “<Untagged>” → artist → title

I use it with patch: http://forums.rockbox.org/index.php?topic=2372.msg16986#msg16986

4_rating.patch

This patch adds the rating (which was replaced by score) back into rockbox as WPS tag %rr
and it can also be used with tagcache:

For example:

%format “fmt_best” “%01 %s” rating title %limit = “100” %sort = “inverse” “best of” → genre ? comment !~ “live” & rating > “0” → title = “fmt_best”

4_set_rating.patch

Displaying a rating is not much good if you can’t set it, so this patch re-enables the
set rating code that is still included in rockbox.

4_set_rating_alt.patch

Personally I find the original settings screen a little clumsy, so I have provided an alternative
method.

To install, pick one of the patches (two for level 4) and patch with -p0 from the root of the rockbox
source tree.

Enjoy. :)

Closed by  Thomas Martitz
2011-06-05 11:37
Reason for closing:  Out of Date
Additional comments about closing:  

There doesn't seem to be interest in this anymore. Open a new task if this is wrong.

Paul Louden commented on 2006-11-07 20:23

So, just to clarify what you're saying: You install 1 OR 2 OR 3 OR (4_rating.patch)+(4_set_rating.patch OR 4_set_rating_alt.patch)?

Each higher number cumulatively includes the prior ones?

Robert Kukla commented on 2006-11-07 21:08

Yes, that's correct.

Robert Kukla commented on 2007-01-10 14:47

5_lyrics_albumart_numeric.patch

lyrics & albumart are now stored as an integer in the database rather than as text. This is computational more efficient, doesn't need the two extra data files but most importantly allows to dynamically update the database. For example when a *.txt lyrics file is synced to a *.lrc file, the wps and database will change to reflect this on the next re-buffer event.

As a disadvantage one needs to specify the numeric value in search conditions. (i.e. 'lyrics = "4"' instead of 'lyrics = "TXT"').

6_dayssince.patch

Only useful for targets with RTC (written for my modded h1x0). The patch introduces two new tags: dayssinceplayed and dayssinceadded and can be used in tagnavi_custom.config like for example:

%format "fmt_dsp" "%d %s" dayssinceplayed title

%menu_start "played" "played"
"last n days" → genre ? dayssinceplayed >= "0" & dayssinceplayed < "" → artist → title = "fmt_dsp"
"last week" → genre ? dayssinceplayed >= "0" & dayssinceplayed < "7" → artist → title = "fmt_dsp"
"last month" → genre ? dayssinceplayed >= "0" & dayssinceplayed < "31" → artist → title = "fmt_dsp"
"before last month" → genre ? dayssinceplayed > "30" → artist → title = "fmt_dsp"

Equivalent for dayssinceadded. This should also answer the request in a forum thread which I can't find right now (not much luck with search engines recently) to display recently uploaded tracks (if auto-update is enabled for database).

As usual the higher numbers include the lower numbered patches, but in addition you will need one of the set_rating patches to be able to set the rating.

Robert Kukla commented on 2007-02-10 16:59

Synched to current svn (removed code related to comment, as this is in SVN now). Also a few small bug fixes.

Robert Kukla commented on 2007-02-26 18:06

- removed the RTC related stuff since I wasn't actually using it and the new "entryage" has a similar purpose.
- that leaves: lyrics, albumart, rating and relplay

Robert Kukla commented on 2007-03-27 08:52

Only lyrics, albumart and relplay left now.

Robert Kukla commented on 2007-04-07 15:24

adapted to wps tokenizer

Robert Kukla commented on 2007-06-17 12:03

synced after metadata.c split

Robert Kukla commented on 2007-08-05 15:21

synced after discnumber addition

Robert Kukla commented on 2007-08-15 09:41

synced after changes to get_metadata

Robert Kukla commented on 2007-11-06 12:43

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing