summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2011-05-27 13:40:10 (GMT)
committer Jaromil <jaromil@dyne.org>2011-05-27 13:40:10 (GMT)
commit207b505fb92f53abe0bd3a28c4e15b90385cd56d (patch)
tree5f9bbf3c64a440db80b7502e6ae003b04b079bc8
parent70555cc5c37f844e5b463566311c058565717222 (diff)
http stream playback
-rw-r--r--src/avremote.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/avremote.c b/src/avremote.c
index 808df8d..6b4e2be 100644
--- a/src/avremote.c
+++ b/src/avremote.c
@@ -145,7 +145,7 @@ void render_uri_meta(upnp_t *upnp, char *path) {
struct stat fs;
if( stat(path,&fs) < 0 ) {
- fprintf(stderr,"error: cannot load file %s (%s)\n", path, strerror(errno));
+ // fprintf(stderr,"error: cannot load file %s (%s)\n", path, strerror(errno));
filesize = 0;
} else
filesize = fs.st_size;
@@ -154,7 +154,10 @@ void render_uri_meta(upnp_t *upnp, char *path) {
pdir = dirname(dir);
strncpy(file,path,1023);
pfile = basename(file);
- snprintf(url,1023,"file://%s",path);
+ if( strncmp(path,"http://",7)==0 )
+ snprintf(url,1023,"%s",path);
+ else
+ snprintf(url,1023,"file://%s",path);
snprintf(upnp->meta,MAX_META_SIZE-1,UPNP_META_FORMAT, url,