diff options
-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) 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 16549f389c..d9461f969e 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 ----------------------- |