Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb51156' into 'master'
[tracker] Disable metadata writes from MTP to tracker. Fixes JB#51156

See merge request mer-core/buteo-mtp!36
  • Loading branch information
chriadam committed Sep 18, 2020
2 parents 6154180 + 2636c4f commit 61c4067
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mts/platform/storage/fsstorageplugin/fsstorageplugin.cpp
Expand Up @@ -3533,8 +3533,9 @@ MTPResponseCode FSStoragePlugin::setObjectPropertyValue( const ObjHandle &handle
}
if(true == sendObjectPropList)
{
m_tracker->setPropVals(storageItem->m_path, propValList);
#if 0
// Disable this as tracker extracts better information, and doesn't like data from other sources.
m_tracker->setPropVals(storageItem->m_path, propValList);
// Ask tracker to ignore the current file, this is because we already have
// all required metadata from the initiator.
m_tracker->ignoreNextUpdate(QStringList(m_tracker->generateIri(storageItem->m_path)));
Expand Down
7 changes: 5 additions & 2 deletions mts/platform/storage/fsstorageplugin/storagetracker.cpp
Expand Up @@ -181,7 +181,10 @@ void StorageTracker::populateFunctionMap()
m_handlerTable[MTP_OBJ_PROP_Buffer_Size] = getBufferSize;
m_handlerTable[MTP_OBJ_PROP_Encoding_Quality] = getEncodingQuality;
#endif

/* These direct settings of file properties aren't expected by tracker, and don't match what tracker
* is expecting. Disable them as they cause an error in tracker-extract when it tries to update them
*/
#if 0
// Setters
m_handlerTableUpdate[MTP_OBJ_PROP_Date_Created] = setDateCreated;
m_handlerTableUpdate[MTP_OBJ_PROP_Name] = setName;
Expand Down Expand Up @@ -210,7 +213,7 @@ void StorageTracker::populateFunctionMap()
m_handlerTableUpdate[MTP_OBJ_PROP_Use_Count] = setUseCount;
m_handlerTableUpdate[MTP_OBJ_PROP_DRM_Status] = setDRMStatus;
// We don't support the below as of now.
#if 0

m_handlerTableUpdate[MTP_OBJ_PROP_Keywords] = setKeywords;
m_handlerTableUpdate[MTP_OBJ_PROP_Subtitle] = setSubtitle;
m_handlerTableUpdate[MTP_OBJ_PROP_Hidden] = setHidden;
Expand Down

0 comments on commit 61c4067

Please sign in to comment.