diff --git a/plex.js b/plex.js index 63c362c..41355eb 100644 --- a/plex.js +++ b/plex.js @@ -82,7 +82,7 @@ function getPhotoLibraryId() { function getTTPTags(mid) { let sql = `SELECT A.id as tid,B.tag as tag FROM taggings as A, tags as B - WHERE A.metadata_item_id = ? + WHERE B.id = ? AND A.tag_id = B.id AND B.tag_type = 0 AND B.extra_data='TTP'`; @@ -451,4 +451,4 @@ module.exports = { deleteAllPlaceTags: deleteAllPlaceTags, addPlaceTags: addPlaceTags, updatePlaceImageTimestamp: updatePlaceImageTimestamp -}; \ No newline at end of file +};