UniversalMusicController/metadata.c

25 lines
623 B
C
Raw Normal View History

2020-05-29 12:21:05 +00:00
#include "metadata.h"
#include <stdio.h>
#include <stdlib.h>
void printSong( struct song_metadata *song ) {
if ( song->title == NULL )
return;
2020-05-29 18:27:46 +00:00
printf( "%s - %s\n", song->title, song->artist );
}
void printMeta( struct song_metadata *song ) {
if ( song->title == NULL )
return;
printf( "TITLE: %s\nALBUM: %s\nARTIST: %s\n", song->title, song->album,
song->artist );
2020-05-29 12:21:05 +00:00
if ( song->year != NULL ) {
2020-05-29 18:27:46 +00:00
printf( "YEAR: %s\n", song->year );
2020-05-29 12:21:05 +00:00
}
2020-05-29 18:27:46 +00:00
printf( "FILE: %s\n", song->file );
2020-05-29 12:21:05 +00:00
if ( song->art_uri != NULL ) {
2020-05-29 18:27:46 +00:00
printf( "ART: %s\n", song->art_uri );
2020-05-29 12:21:05 +00:00
}
}