"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tivo_commands.c" between
minidlna-1.1.4.tar.gz and minidlna-1.1.5.tar.gz

About: ReadyMedia (formerly known as MiniDLNA) is a simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients.

tivo_commands.c  (minidlna-1.1.4):tivo_commands.c  (minidlna-1.1.5)
skipping to change at line 126 skipping to change at line 126
} }
static char * static char *
tivo_unescape_tag(char *tag) tivo_unescape_tag(char *tag)
{ {
modifyString(tag, "&", "&", 1); modifyString(tag, "&", "&", 1);
modifyString(tag, "<", "<", 1); modifyString(tag, "<", "<", 1);
modifyString(tag, "<", "<", 1); modifyString(tag, "<", "<", 1);
modifyString(tag, ">", ">", 1); modifyString(tag, ">", ">", 1);
modifyString(tag, ">", ">", 1); modifyString(tag, ">", ">", 1);
modifyString(tag, """, """, 1);
return tag; return tag;
} }
#define FLAG_SEND_RESIZED 0x01 #define FLAG_SEND_RESIZED 0x01
#define FLAG_NO_PARAMS 0x02 #define FLAG_NO_PARAMS 0x02
#define FLAG_VIDEO 0x04 #define FLAG_VIDEO 0x04
static int static int
callback(void *args, int argc, char **argv, char **azColName) callback(void *args, int argc, char **argv, char **azColName)
{ {
struct Response *passed_args = (struct Response *)args; struct Response *passed_args = (struct Response *)args;
skipping to change at line 188 skipping to change at line 189
char *episode; char *episode;
flags |= FLAG_VIDEO; flags |= FLAG_VIDEO;
strcatf(str, "<Item><Details>" strcatf(str, "<Item><Details>"
"<ContentType>%s</ContentType>" "<ContentType>%s</ContentType>"
"<SourceFormat>%s</SourceFormat>" "<SourceFormat>%s</SourceFormat>"
"<SourceSize>%s</SourceSize>", "<SourceSize>%s</SourceSize>",
mime, mime, size); mime, mime, size);
episode = strstr(title, " - "); episode = strstr(title, " - ");
if( episode ) if( episode )
{ {
strcatf(str, "<Title>%.*s</Title>" strcatf(str, "<EpisodeTitle>%s</EpisodeTitle>", e
"<EpisodeTitle>%s</EpisodeTitle>", pisode+3);
(int)(episode-title), title, episode *episode = '\0';
+3);
}
else
{
strcatf(str, "<Title>%s</Title>", title);
} }
if( date ) if( date )
{ {
struct tm tm; struct tm tm;
memset(&tm, 0, sizeof(tm)); memset(&tm, 0, sizeof(tm));
tm.tm_isdst = -1; // Have libc figure out if DST is in effect or not tm.tm_isdst = -1; // Have libc figure out if DST is in effect or not
strptime(date, "%Y-%m-%dT%H:%M:%S", &tm); strptime(date, "%Y-%m-%dT%H:%M:%S", &tm);
strcatf(str, "<CaptureDate>0x%X</CaptureDate>", ( unsigned int)mktime(&tm)); strcatf(str, "<CaptureDate>0x%X</CaptureDate>", ( unsigned int)mktime(&tm));
} }
if( comment ) if( comment )
strcatf(str, "<Description>%s</Description>", com ment); strcatf(str, "<Description>%s</Description>", tiv o_unescape_tag(comment));
} }
else else
{ {
return 0; return 0;
} }
strcatf(str, "<Title>%s</Title>", tivo_unescape_tag(title)); strcatf(str, "<Title>%s</Title>", title);
if( artist ) { if( artist ) {
strcatf(str, "<ArtistName>%s</ArtistName>", tivo_unescape _tag(artist)); strcatf(str, "<ArtistName>%s</ArtistName>", tivo_unescape _tag(artist));
} }
if( album ) { if( album ) {
strcatf(str, "<AlbumTitle>%s</AlbumTitle>", tivo_unescape _tag(album)); strcatf(str, "<AlbumTitle>%s</AlbumTitle>", tivo_unescape _tag(album));
} }
if( genre ) { if( genre ) {
strcatf(str, "<MusicGenre>%s</MusicGenre>", tivo_unescape _tag(genre)); strcatf(str, "<MusicGenre>%s</MusicGenre>", tivo_unescape _tag(genre));
} }
if( resolution ) { if( resolution ) {
 End of changes. 4 change blocks. 
10 lines changed or deleted 6 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS