diff options
author | Justin Heiner <jheiner@rockbox.org> | 2002-08-22 04:03:57 +0000 |
---|---|---|
committer | Justin Heiner <jheiner@rockbox.org> | 2002-08-22 04:03:57 +0000 |
commit | 70a203341f6f6c691e9c4abecbe7096d29995807 (patch) | |
tree | bd1a90c97f99264835a933937c9d7c3a3296a299 | |
parent | a27f5d7bd1b14b432e7307af5beee7deb5cb4b70 (diff) | |
download | rockbox-70a203341f6f6c691e9c4abecbe7096d29995807.tar.gz rockbox-70a203341f6f6c691e9c4abecbe7096d29995807.zip |
Added conditional Title-Artist to appease PsycoXul :-) It's bound to %h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1913 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/wps.c | 9 | ||||
-rw-r--r-- | docs/CUSTOM_WPS_FORMAT | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/apps/wps.c b/apps/wps.c index f601865bcd..c4b027cbc3 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -282,6 +282,15 @@ int wps_load_custom_config(void) | |||
282 | snprintf(tmpbuf, sizeof(tmpbuf), "%s", | 282 | snprintf(tmpbuf, sizeof(tmpbuf), "%s", |
283 | szLast?++szLast:id3->path); | 283 | szLast?++szLast:id3->path); |
284 | break; | 284 | break; |
285 | case 'h': /* Conditional Filename \ ID3 Title-Artist */ | ||
286 | if(id3->artist && id3->title) | ||
287 | snprintf(tmpbuf, sizeof(tmpbuf), "%s - %s", | ||
288 | id3->title?id3->title:"<no title>"); | ||
289 | id3->artist?id3->artist:"<no artist>", | ||
290 | else | ||
291 | snprintf(tmpbuf, sizeof(tmpbuf), "%s", | ||
292 | szLast?++szLast:id3->path); | ||
293 | break; | ||
285 | case 'b': /* File Bitrate */ | 294 | case 'b': /* File Bitrate */ |
286 | snprintf(tmpbuf, sizeof(tmpbuf), "%d", id3->bitrate); | 295 | snprintf(tmpbuf, sizeof(tmpbuf), "%d", id3->bitrate); |
287 | break; | 296 | break; |
diff --git a/docs/CUSTOM_WPS_FORMAT b/docs/CUSTOM_WPS_FORMAT index 16549f389c..d9461f969e 100644 --- a/docs/CUSTOM_WPS_FORMAT +++ b/docs/CUSTOM_WPS_FORMAT | |||
@@ -24,6 +24,9 @@ Tags | |||
24 | %c : Conditional Title/Filename | 24 | %c : Conditional Title/Filename |
25 | Displays "Artist - Title" *or* | 25 | Displays "Artist - Title" *or* |
26 | Displays Filename if no ID3 Artist/Title | 26 | Displays Filename if no ID3 Artist/Title |
27 | %h : Conditional Title/Filename | ||
28 | Displays "Title - Artist" *or* | ||
29 | Displays Filename if no ID3 Artist/Title | ||
27 | %b : File Bitrate | 30 | %b : File Bitrate |
28 | %f : File Frequency | 31 | %f : File Frequency |
29 | %p : File Path | 32 | %p : File Path |
@@ -33,6 +36,7 @@ Tags | |||
33 | %l : Playlist Total Entries | 36 | %l : Playlist Total Entries |
34 | %e : Elapsed Track Time | 37 | %e : Elapsed Track Time |
35 | %o : Total Track Time | 38 | %o : Total Track Time |
39 | %% : Displays a % | ||
36 | 40 | ||
37 | Example wps.config File | 41 | Example wps.config File |
38 | ----------------------- | 42 | ----------------------- |