diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-05-13 18:46:38 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-05-13 18:46:38 +0000 |
commit | 965e6edcf18948ea6971040495e2121a326aa11b (patch) | |
tree | 07d401bd1726b84d73ccba099b677067a05730d4 /src/ls.c | |
parent | 8c484eeccfaafd2d5eaf7cd77842581004957a8a (diff) | |
download | mpd-965e6edcf18948ea6971040495e2121a326aa11b.tar.gz mpd-965e6edcf18948ea6971040495e2121a326aa11b.tar.xz mpd-965e6edcf18948ea6971040495e2121a326aa11b.zip |
redimentary addition of url's to playlist
git-svn-id: https://svn.musicpd.org/mpd/trunk@1000 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/ls.c')
-rw-r--r-- | src/ls.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -41,6 +41,28 @@ char * dupAndStripPlaylistSuffix(char * file) { return ret; } +int isRemoteUrl(char * url) { + char * urlPrefixes[] = { + "http://", + "ftp://", + NULL + }; + + while(*urlPrefixes) { + if(strncmp(*urlPrefixes,url,strlen(*urlPrefixes)) == 0) { +#ifdef HAVE_MAD + if(hasMp3Suffix(*urlPrefixes)) return 1; +#endif +#ifdef HAVE_OGG + if(hasOggSuffix(*urlPrefixes)) return 1; + return 0; +#endif + } + } + + return 0; +} + int lsPlaylists(FILE * fp, char * utf8path) { DIR * dir; struct stat st; |