aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/song.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/song.c b/src/song.c
index cc1547d10..2958d0dc9 100644
--- a/src/song.c
+++ b/src/song.c
@@ -92,7 +92,7 @@ void freeJustSong(Song * song)
{
free(song->url);
if (song->tag)
- freeMpdTag(song->tag);
+ tag_free(song->tag);
free(song);
}
@@ -147,7 +147,7 @@ int printSongInfo(int fd, Song * song)
printSongUrl(fd, song);
if (song->tag)
- printMpdTag(fd, song->tag);
+ tag_print(fd, song->tag);
return 0;
}
@@ -200,7 +200,7 @@ static void insertSongIntoList(SongList * list, ListNode ** nextSongNode,
} else if (cmpRet == 0) {
Song *tempSong = (Song *) ((*nextSongNode)->data);
if (tempSong->mtime != song->mtime) {
- freeMpdTag(tempSong->tag);
+ tag_free(tempSong->tag);
tempSong->tag = song->tag;
tempSong->mtime = song->mtime;
song->tag = NULL;
@@ -257,14 +257,14 @@ void readSongInfoIntoList(FILE * fp, SongList * list, Directory * parentDir)
*/
} else if (matchesAnMpdTagItemKey(buffer, &itemType)) {
if (!song->tag)
- song->tag = newMpdTag();
- addItemToMpdTag(song->tag, itemType,
- &(buffer
- [strlen(mpdTagItemKeys[itemType]) +
- 2]));
+ song->tag = tag_new();
+ tag_add_item(song->tag, itemType,
+ &(buffer
+ [strlen(mpdTagItemKeys[itemType]) +
+ 2]));
} else if (0 == strncmp(SONG_TIME, buffer, strlen(SONG_TIME))) {
if (!song->tag)
- song->tag = newMpdTag();
+ song->tag = tag_new();
song->tag->time = atoi(&(buffer[strlen(SONG_TIME)]));
} else if (0 == strncmp(SONG_MTIME, buffer, strlen(SONG_MTIME))) {
song->mtime = atoi(&(buffer[strlen(SONG_MTIME)]));
@@ -295,7 +295,7 @@ int updateSongInfo(Song * song)
rmp2amp_r(abs_path, abs_path);
if (song->tag)
- freeMpdTag(song->tag);
+ tag_free(song->tag);
song->tag = NULL;