aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarnova <arnova@void.org>2012-06-16 11:25:58 +0200
committerarnova <arnova@void.org>2012-06-16 11:25:58 +0200
commit6dd278d754e5eafd3c97d282d746fbc946edd26b (patch)
treee456339746b981284c6c5e9611969290464489db
parentc32ecc0abfbd5e773ceca5d6621ac83b3a7d609d (diff)
changed: Improve (error) logging for save file state job
-rw-r--r--xbmc/utils/SaveFileStateJob.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/xbmc/utils/SaveFileStateJob.h b/xbmc/utils/SaveFileStateJob.h
index 534ef4be4a..b65febeb9c 100644
--- a/xbmc/utils/SaveFileStateJob.h
+++ b/xbmc/utils/SaveFileStateJob.h
@@ -37,7 +37,11 @@ bool CSaveFileStateJob::DoWork()
CLog::Log(LOGDEBUG, "%s - Saving file state for video item %s", __FUNCTION__, progressTrackingFile.c_str());
CVideoDatabase videodatabase;
- if (videodatabase.Open())
+ if (!videodatabase.Open())
+ {
+ CLog::Log(LOGWARNING, "%s - Unable to open video database. Can not save file state!", __FUNCTION__);
+ }
+ else
{
bool updateListing = false;
// No resume & watched status for livetv
@@ -107,12 +111,16 @@ bool CSaveFileStateJob::DoWork()
if (dialog && !dialog->IsDialogRunning())
#endif
{
- // consider this item as played
- CLog::Log(LOGDEBUG, "%s - Marking audio item %s as listened", __FUNCTION__, progressTrackingFile.c_str());
-
CMusicDatabase musicdatabase;
- if (musicdatabase.Open())
+ if (!musicdatabase.Open())
+ {
+ CLog::Log(LOGWARNING, "%s - Unable to open music database. Can not save file state!", __FUNCTION__);
+ }
+ else
{
+ // consider this item as played
+ CLog::Log(LOGDEBUG, "%s - Marking audio item %s as listened", __FUNCTION__, progressTrackingFile.c_str());
+
musicdatabase.IncrTop100CounterByFileName(progressTrackingFile);
musicdatabase.Close();
}