diff options
author | methodus <methodus@web.de> | 2012-10-29 01:13:45 +0100 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-10-29 01:13:45 +0100 |
commit | 0deea38705627533ab074d51247d37b7a783606a (patch) | |
tree | 1d1150a1179cfa9abb021cabff22802ba10c1d34 | |
parent | 1b5a8fd308b133924f59210509e2bc822f57c2e0 (diff) | |
download | vdr-plugin-upnp-0deea38705627533ab074d51247d37b7a783606a.tar.gz vdr-plugin-upnp-0deea38705627533ab074d51247d37b7a783606a.tar.bz2 |
Fixed compile error when building against VDR 1.7.20 and older
-rw-r--r-- | plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp b/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp index 1a83f54..07f4fb4 100644 --- a/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp +++ b/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp @@ -149,10 +149,17 @@ private: resource.SetResourceUri(u); resource.SetProtocolInfo(ProtocolInfo("video/mpeg", fourthfield).ToString()); - if(recording->LengthInSeconds() > 0){ + int duration = 0; + cEvent* event = NULL; + if((event = info->GetEvent()) && event->Duration() > 0){ + duration = event->Duration(); + } +#if VDRVERSNUM > 10723 + else if(recording->LengthInSeconds() > 0){ boost::posix_time::time_duration duration = boost::posix_time::seconds(recording->LengthInSeconds()); resource.SetDuration(boost::posix_time::to_simple_string(duration)); } +#endif metadata.AddResource(resource); |