summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Loh <denis.loh@gmail.com>2010-01-27 18:55:30 +0100
committerDenis Loh <denis.loh@gmail.com>2010-01-27 18:55:30 +0100
commit15139183fdea8f65af5a7dbfd354bcedf5886e80 (patch)
tree28a2cda8488455429663bf5cab3d4e1378d2fa6a
parenta26c93fa92a87187dded8d0492ed6988ac725585 (diff)
downloadvdr-plugin-upnp-15139183fdea8f65af5a7dbfd354bcedf5886e80.tar.gz
vdr-plugin-upnp-15139183fdea8f65af5a7dbfd354bcedf5886e80.tar.bz2
Added automatic recording update after a new record was made
-rw-r--r--database/metadata.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/database/metadata.cpp b/database/metadata.cpp
index 2bfa2d1..a9d780f 100644
--- a/database/metadata.cpp
+++ b/database/metadata.cpp
@@ -461,11 +461,20 @@ void cMediaDatabase::Action(){
time_t LastEPGUpdate = 0;
while(this->Running()){
+#ifndef WITHOUT_TV
if(cSchedules::Modified() >= LastEPGUpdate){
MESSAGE(VERBOSE_EPG_UPDATES, "Schedule changed. Updating...");
updateChannelEPG();
LastEPGUpdate = cSchedules::Modified();
}
+#endif
+#ifndef WITHOUT_RECORDS
+ int NotUsed;
+ if(Recordings.StateChanged(NotUsed)){
+ MESSAGE(VERBOSE_EPG_UPDATES, "Recordings changed. Updating...");
+ loadRecordings();
+ }
+#endif
cCondWait::SleepMs(60 * 1000); // sleep a minute
}
@@ -531,7 +540,10 @@ int cMediaDatabase::browse(
}
cUPnPClassObject* Child = Children->First();
- if(Count==0) Count = Container->getChildCount();
+ if(Count==0 || Count > Container->getChildCount())
+ Count = Container->getChildCount();
+
+ MESSAGE(VERBOSE_DIDL, "Number of children: %d", Count);
while(Offset-- && (Child = Children->Next(Child))){}
for(; Count && Child ; Child = Children->Next(Child), Count--){
MESSAGE(VERBOSE_DIDL, "Appending %s to didl", Child->getTitle());