Commit 3436d376 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

patches: prevent runtime selector failure in upnpx

parent 2e21be01
......@@ -159,6 +159,8 @@ UPNPXVERSION=1.2.4
curl -O http://upnpx.googlecode.com/files/upnpx-${UPNPXVERSION}.tar.gz
tar xf upnpx-${UPNPXVERSION}.tar.gz
mv upnpx-${UPNPXVERSION} upnpx
cd upnpx && patch -p1 < ${aspen_root_dir}/patches/upnpx/duration-selector-failure.patch
cd ..
fi
if ! [ -e AQGridView ]; then
git clone git://github.com/AlanQuatermain/AQGridView.git
......
diff -ru upnpx-1.2.4/src/upnp/MediaServerBasicObjectParser.m upnpx/src/upnp/MediaServerBasicObjectParser.m
--- upnpx-1.2.4/src/upnp/MediaServerBasicObjectParser.m 2012-03-07 20:53:57.000000000 +0100
+++ upnpx/src/upnp/MediaServerBasicObjectParser.m 2013-08-11 14:30:52.000000000 +0200
@@ -238,7 +238,10 @@
[media setAudioChannels:audioChannels];
[media setSize:size];
[media setDuration:duration];
- [media setDurationInSeconds:[duration HMS2Seconds]];
+ if ([duration respondsToSelector:@selector(HMS2Seconds)])
+ [media setDurationInSeconds:[duration HMS2Seconds]];
+ else
+ [media setDurationInSeconds:@""];
[media setBitrate:bitrate];
[media setIcon:icon]; //REMOVE THIS ?
[media setAlbumArt:albumArt];
@@ -279,9 +282,11 @@
[r setNrAudioChannels: [audioChannels intValue]];
[r setProtocolInfo: protocolInfo];
[r setSize: [size intValue]];
- [r setDurationInSeconds:[duration HMS2Seconds]];
-
- [resources addObject:r];
+ if ([duration respondsToSelector:@selector(HMS2Seconds)])
+ [r setDurationInSeconds:[duration HMS2Seconds]];
+ else
+ [r setDurationInSeconds:@""];
+ [resources addObject:r];
[r release];
}else{
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment