summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Heiner <jheiner@rockbox.org>2002-08-22 04:03:57 +0000
committerJustin Heiner <jheiner@rockbox.org>2002-08-22 04:03:57 +0000
commit70a203341f6f6c691e9c4abecbe7096d29995807 (patch)
treebd1a90c97f99264835a933937c9d7c3a3296a299
parenta27f5d7bd1b14b432e7307af5beee7deb5cb4b70 (diff)
downloadrockbox-70a203341f6f6c691e9c4abecbe7096d29995807.zip
rockbox-70a203341f6f6c691e9c4abecbe7096d29995807.tar.gz
rockbox-70a203341f6f6c691e9c4abecbe7096d29995807.tar.bz2
rockbox-70a203341f6f6c691e9c4abecbe7096d29995807.tar.xz
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.c9
-rw-r--r--docs/CUSTOM_WPS_FORMAT4
2 files changed, 13 insertions, 0 deletions
diff --git a/apps/wps.c b/apps/wps.c
index f601865..c4b027c 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -282,6 +282,15 @@ int wps_load_custom_config(void)
snprintf(tmpbuf, sizeof(tmpbuf), "%s",
szLast?++szLast:id3->path);
break;
+ case 'h': /* Conditional Filename \ ID3 Title-Artist */
+ if(id3->artist && id3->title)
+ snprintf(tmpbuf, sizeof(tmpbuf), "%s - %s",
+ id3->title?id3->title:"<no title>");
+ id3->artist?id3->artist:"<no artist>",
+ else
+ snprintf(tmpbuf, sizeof(tmpbuf), "%s",
+ szLast?++szLast:id3->path);
+ break;
case 'b': /* File Bitrate */
snprintf(tmpbuf, sizeof(tmpbuf), "%d", id3->bitrate);
break;
diff --git a/docs/CUSTOM_WPS_FORMAT b/docs/CUSTOM_WPS_FORMAT
index 16549f3..d9461f9 100644
--- a/docs/CUSTOM_WPS_FORMAT
+++ b/docs/CUSTOM_WPS_FORMAT
@@ -24,6 +24,9 @@ Tags
%c : Conditional Title/Filename
Displays "Artist - Title" *or*
Displays Filename if no ID3 Artist/Title
+%h : Conditional Title/Filename
+ Displays "Title - Artist" *or*
+ Displays Filename if no ID3 Artist/Title
%b : File Bitrate
%f : File Frequency
%p : File Path
@@ -33,6 +36,7 @@ Tags
%l : Playlist Total Entries
%e : Elapsed Track Time
%o : Total Track Time
+%% : Displays a %
Example wps.config File
-----------------------