Skip to content

Commit

Permalink
[videodatabase] always update runtime from streamdetails
Browse files Browse the repository at this point in the history
  • Loading branch information
mkortstiege committed Mar 5, 2015
1 parent 575e381 commit f133b8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/video/VideoDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2559,7 +2559,7 @@ void CVideoDatabase::SetStreamDetailsForFileId(const CStreamDetails& details, in
details.GetSubtitleLanguage(i).c_str()));
}

// update the runtime information, if empty
// update the runtime information
if (details.GetVideoDuration())
{
vector< pair<string, int> > tables;
Expand All @@ -2568,8 +2568,8 @@ void CVideoDatabase::SetStreamDetailsForFileId(const CStreamDetails& details, in
tables.push_back(make_pair("musicvideo", VIDEODB_ID_MUSICVIDEO_RUNTIME));
for (vector< pair<string, int> >::iterator i = tables.begin(); i != tables.end(); ++i)
{
std::string sql = PrepareSQL("update %s set c%02d=%d where idFile=%d and c%02d=''",
i->first.c_str(), i->second, details.GetVideoDuration(), idFile, i->second);
std::string sql = PrepareSQL("update %s set c%02d=%d where idFile=%d",
i->first.c_str(), i->second, details.GetVideoDuration(), idFile);
m_pDS->exec(sql);
}
}
Expand Down

0 comments on commit f133b8a

Please sign in to comment.