Skip to content

Commit

Permalink
[VideoInfoScanner] Honor importwatchedstate and importresumepoint fro…
Browse files Browse the repository at this point in the history
…m AS.xml

Fixes xbmc#24909.
  • Loading branch information
neo1973 committed Apr 2, 2024
1 parent 122a369 commit ee7e2d7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion xbmc/video/VideoInfoScanner.cpp
Expand Up @@ -42,6 +42,7 @@
#include "utils/URIUtils.h"
#include "utils/Variant.h"
#include "utils/log.h"
#include "video/VideoInfoTag.h"
#include "video/VideoManagerTypes.h"
#include "video/VideoThumbLoader.h"
#include "video/dialogs/GUIDialogVideoManagerExtras.h"
Expand Down Expand Up @@ -744,7 +745,15 @@ namespace VIDEO
if (loader)
{
pItem->GetVideoInfoTag()->Reset();
result = loader->Load(*pItem->GetVideoInfoTag(), false);
CVideoInfoTag& infoTag = *pItem->GetVideoInfoTag();
result = loader->Load(infoTag, false);

// keep some properties only if advancedsettings.xml says so
const auto advancedSettings = CServiceBroker::GetSettingsComponent()->GetAdvancedSettings();
if (!advancedSettings->m_bVideoLibraryImportWatchedState)
infoTag.ResetPlayCount();
if (!advancedSettings->m_bVideoLibraryImportResumePoint)
infoTag.SetResumePoint(CBookmark());
}
}
if (result == CInfoScanner::FULL_NFO)
Expand Down

0 comments on commit ee7e2d7

Please sign in to comment.