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.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.c | 9 | ||||
| -rw-r--r-- | docs/CUSTOM_WPS_FORMAT | 4 |
2 files changed, 13 insertions, 0 deletions
@@ -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 ----------------------- |