diff options
author | Joerg Bornkessel <hd_brummy@gentoo.org> | 2014-10-19 17:09:51 +0200 |
---|---|---|
committer | Joerg Bornkessel <hd_brummy@gentoo.org> | 2014-10-19 17:09:51 +0200 |
commit | 058d8bc29a289f49e55c44c4e852469eb6fa2362 (patch) | |
tree | 2e5c71c02fd057483c04214ec8d0d9ce380144f2 /xml-cache.c | |
parent | 1c7eccb876c001da1054790d0d48adb880077194 (diff) | |
download | vdr-plugin-audiorecorder-058d8bc29a289f49e55c44c4e852469eb6fa2362.tar.gz vdr-plugin-audiorecorder-058d8bc29a289f49e55c44c4e852469eb6fa2362.tar.bz2 |
added missing intializier, cleanup obsolete code
Diffstat (limited to 'xml-cache.c')
-rw-r--r-- | xml-cache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xml-cache.c b/xml-cache.c index 556a5df..806a33f 100644 --- a/xml-cache.c +++ b/xml-cache.c @@ -47,7 +47,7 @@ void cXmlCache::ReadDir(int level, std::string path) file = result->d_name; int len = file.length() - 8; - if (len < 0) + if (len < 0) len = 0; if (file == "." || file == ".." || @@ -235,8 +235,8 @@ void cXmlCache::rebuild_track(const string &path, const char *date, cTrackInfo trackinfo; trackinfo.set_path(path); - trackinfo.set_date(date); - trackinfo.set_time(time); + trackinfo.set_date(date); + trackinfo.set_time(time); if (! tag->artist().isEmpty()) trackinfo.set_artist(tag->artist().toCString()); @@ -259,8 +259,8 @@ void cXmlCache::rebuild_track(const string &path, const char *date, if (! tag->comment().isEmpty()) { string com = tag->comment().toCString(); trackinfo.set_comment(com.c_str()); - string::size_type f1 = com.find("recorded on \""); - string::size_type f2 = com.find("(vdr-audiorecorder "); + string::size_type f1 = com.find("recorded on \""); + string::size_type f2 = com.find("(vdr-audiorecorder "); if (f1 != string::npos && f2 != string::npos) { com.erase(0, 13); string::size_type p1 = com.find_last_of('@'); @@ -271,7 +271,7 @@ void cXmlCache::rebuild_track(const string &path, const char *date, trackinfo.set_channel(com.substr(p1 + 1, p2 - p1 - 1)); } - } + } } Cache.add_track(trackinfo, false); |