Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/extract_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,11 @@ def getVersionSortNumber(version):
result = 0

return result


# copy keywords from previously added files corresponding to different versions of the same item, excluding the map size ones
def addInheritedKeywords(db,fid,nameWithoutVersion):
nameWithoutVersion = nameWithoutVersion.replace("'","\\'")
db.query("INSERT IGNORE INTO file_keyword (SELECT DISTINCT %d,keyword FROM file_keyword fk INNER JOIN file f ON (fk.fid=f.fid) WHERE f.name_without_version='%s')" % (fid,nameWithoutVersion))
db.query("INSERT IGNORE INTO file_keyword (SELECT DISTINCT %d,keyword FROM file_keyword fk INNER JOIN file f ON (fk.fid=f.fid) WHERE f.name_without_version='%s' AND fk.keyword NOT IN ('small','medium','large'))" % (fid,nameWithoutVersion))

def setSizeKeywords(db,fid,width,height):
kw = "small"
Expand Down
Loading