diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-05-13 18:16:03 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-05-13 18:16:03 +0000 |
commit | 8c484eeccfaafd2d5eaf7cd77842581004957a8a (patch) | |
tree | 831e06fb02c0d01214d65e1a692d834deadb0911 /src/directory.c | |
parent | e7ae1b0ce96b41dc336210c6df575a4d1cb9d2be (diff) |
add type element to Song struct, and change utf8file to utf8url
git-svn-id: https://svn.musicpd.org/mpd/trunk@999 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/directory.c')
-rw-r--r-- | src/directory.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/directory.c b/src/directory.c index ed0992021..356664501 100644 --- a/src/directory.c +++ b/src/directory.c @@ -277,7 +277,7 @@ void removeSongFromDirectory(Directory * directory, char * shortname) { void * song; if(findInList(directory->songs,shortname,&song)) { - LOG("removing: %s\n",((Song *)song)->utf8file); + LOG("removing: %s\n",((Song *)song)->utf8url); deleteFromList(directory->songs,shortname); } } @@ -508,7 +508,7 @@ int updatePath(char * utf8path) { } else if((song = getSongDetails(path,&shortname,&parentDirectory))) { /* if this song update is successfull, we are done */ - if(song && isMusic(song->utf8file,&mtime)) { + if(song && isMusic(song->utf8url,&mtime)) { free(path); if(song->mtime==mtime) return 0; else if(updateSongInfo(song)==0) return 1; @@ -655,7 +655,8 @@ int addToDirectory(Directory * directory, char * shortname, char * name) { } else if(isMusic(name,NULL)) { Song * song; - song = addSongToList(directory->songs,shortname,name); + song = addSongToList(directory->songs,shortname,name, + SONG_TYPE_FILE); if(!song) return -1; LOG("added %s\n",name); return 1; @@ -1071,7 +1072,7 @@ int printDirectoryInDirectory(FILE * fp, Directory * directory, void * data) { } int printSongInDirectory(FILE * fp, Song * song, void * data) { - myfprintf(fp,"file: %s\n",song->utf8file); + myfprintf(fp,"file: %s\n",song->utf8url); return 0; } @@ -1103,7 +1104,7 @@ int searchForTitleInDirectory(FILE * fp, Song * song, void * string) { } int searchForFilenameInDirectory(FILE * fp, Song * song, void * string) { - char * dup = strDupToUpper(song->utf8file); + char * dup = strDupToUpper(song->utf8url); if(strstr(dup,(char *)string)) printSongInfo(fp,song); free(dup); return 0; |