Skip to content

Commit

Permalink
Add %art_url formatting placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusor committed Feb 21, 2018
1 parent e11597e commit 07557f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"Artist:\t\t" ARG_INFO_ARTIST_NAME "\n" \
"Album:\t\t" ARG_INFO_ALBUM_NAME "\n" \
"Album Artist:\t" ARG_INFO_ALBUM_ARTIST "\n" \
"Art URL:\t" ARG_INFO_ART_URL "\n" \
"Track:\t\t" ARG_INFO_TRACK_NUMBER "\n" \
"Length:\t\t" ARG_INFO_TRACK_LENGTH "\n" \
"Volume:\t\t" ARG_INFO_VOLUME "\n" \
Expand All @@ -46,6 +47,7 @@
#define ARG_INFO_ARTIST_NAME "%artist_name"
#define ARG_INFO_ALBUM_NAME "%album_name"
#define ARG_INFO_ALBUM_ARTIST "%album_artist"
#define ARG_INFO_ART_URL "%art_url"
#define ARG_INFO_BITRATE "%bitrate"
#define ARG_INFO_COMMENT "%comment"

Expand Down Expand Up @@ -82,6 +84,7 @@
"\t%" ARG_INFO_ARTIST_NAME "\tprints the artist name\n" \
"\t%" ARG_INFO_ALBUM_NAME "\tprints the album name\n" \
"\t%" ARG_INFO_ALBUM_ARTIST "\tprints the album artist\n" \
"\t%" ARG_INFO_ART_URL "\tprints the URL of the cover art image\n" \
"\t%" ARG_INFO_PLAYBACK_STATUS "\tprints the playback status\n" \
"\t%" ARG_INFO_SHUFFLE_MODE "\tprints the shuffle mode\n" \
"\t%" ARG_INFO_VOLUME "\t\tprints the volume\n" \
Expand Down Expand Up @@ -197,6 +200,7 @@ void print_mpris_info(mpris_properties *props, char* format)
output = str_replace(output, ARG_INFO_TRACK_NUMBER, track_number_label);
output = str_replace(output, ARG_INFO_BITRATE, bitrate_label);
output = str_replace(output, ARG_INFO_COMMENT, props->metadata.comment);
output = str_replace(output, ARG_INFO_ART_URL, props->metadata.url);

fprintf(stdout, "%s\n", output);
free(output);
Expand Down

0 comments on commit 07557f9

Please sign in to comment.