diff options
author | methodus <methodus@web.de> | 2012-10-26 20:36:56 +0200 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-10-26 20:36:56 +0200 |
commit | 2b1b5382cf0139588322085e876a1ad0fb600a20 (patch) | |
tree | 058b94093a89dbcec6fa98c6982dce3574933047 /plugins/provider | |
parent | 759075f868a07d1a01d4d0386f99ef044f7dbb2f (diff) | |
download | vdr-plugin-upnp-2b1b5382cf0139588322085e876a1ad0fb600a20.tar.gz vdr-plugin-upnp-2b1b5382cf0139588322085e876a1ad0fb600a20.tar.bz2 |
The database file is now saved in config directory because resource directory might be readonly
Diffstat (limited to 'plugins/provider')
-rw-r--r-- | plugins/provider/recProvider/recProvider.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/provider/recProvider/recProvider.cpp b/plugins/provider/recProvider/recProvider.cpp index fea182a..4e331bf 100644 --- a/plugins/provider/recProvider/recProvider.cpp +++ b/plugins/provider/recProvider/recProvider.cpp @@ -50,6 +50,7 @@ private: int lastFileNumber; string filename; vector<size_t> offsets; + bool initialScan; void CloseFile(){ if(fileFD){ @@ -95,6 +96,7 @@ public: , currentFileNumber(1) , lastFileNumber(1) , offsets(65536) + , initialScan(false) { } @@ -115,6 +117,11 @@ public: string videoDir(VideoDirectory), fs, uri = u.substr(6); int pos = 0, vl = videoDir.length(), ul = uri.length(), vul = vl + ul + 1; + if(!initialScan){ + if(!Recordings.Update(true)) return list; + initialScan = true; + } + for(cRecording* rec = Recordings.First(); rec; rec = Recordings.Next(rec)){ char* file = strdup(rec->Name()); file = ExchangeChars(file, true); |