Skip to content

Commit

Permalink
Hotfix: Fix new item metadata not being processed on first seen.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfain committed Jul 14, 2024
1 parent 28f87f4 commit f5cdc84
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/lib/handler/medialibraryhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ void MediaLibraryHandler::on_load_library(QStringList paths, bool vrMode)
item.libraryPath = path;
setLiveProperties(item);

SettingsHandler::getLibraryListItemMetaData(item);
item.metadata.isMFS = item.metadata.tags.contains(SettingsHandler::getXTags().MFS);

if(!vrMode && !scriptPath.isEmpty())
funscriptsWithMedia.append(scriptPath);
Expand Down Expand Up @@ -994,7 +992,12 @@ void MediaLibraryHandler::setLiveProperties(LibraryListItem27 &libraryListItem)
{
assignID(libraryListItem);
setThumbPath(libraryListItem);
SettingsHandler::getLibraryListItemMetaData(libraryListItem);
if(SettingsHandler::hasLibraryListItemMetaData(libraryListItem)) {
SettingsHandler::getLibraryListItemMetaData(libraryListItem);
libraryListItem.metadata.isMFS = libraryListItem.metadata.tags.contains(SettingsHandler::getXTags().MFS);
} else {
LogHandler::Debug("New item found: "+libraryListItem.nameNoExtension);
}
}

void MediaLibraryHandler::lockThumb(LibraryListItem27 &item)
Expand Down
10 changes: 8 additions & 2 deletions src/lib/handler/settingshandler.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "settingshandler.h"

const QString SettingsHandler::XTEVersion = "0.46b";
const float SettingsHandler::XTEVersionNum = 0.46f;
const QString SettingsHandler::XTEVersion = "0.461b";
const float SettingsHandler::XTEVersionNum = 0.461f;
const QString SettingsHandler::XTEVersionTimeStamp = QString(XTEVersion +" %1T%2").arg(__DATE__).arg(__TIME__);

SettingsHandler::SettingsHandler(){
Expand Down Expand Up @@ -427,6 +427,12 @@ void SettingsHandler::Load(QSettings* settingsToLoadFrom)
Save();
Load();
}
if(currentVersion < 0.461f) {
locker.unlock();
setForceMetaDataFullProcess(true);
Save();
Load();
}
}
settingsChangedEvent(false);
}
Expand Down

0 comments on commit f5cdc84

Please sign in to comment.