Merge pull request #36 from mattsch/add_sets
Quick hack to get sets working
This commit is contained in:
commit
d8e9ca9ffe
2 changed files with 8 additions and 1 deletions
|
@ -530,6 +530,8 @@ class Movies(Items):
|
|||
if userdata['Favorite']:
|
||||
tags.append("Favorite movies")
|
||||
self.kodi_db.addTags(movieid, tags, "movie")
|
||||
# Add any sets from Plex collection tags
|
||||
self.kodi_db.addSets(movieid, collections)
|
||||
# Process playstates
|
||||
self.kodi_db.addPlaystate(fileid, resume, runtime, playcount, dateplayed)
|
||||
|
||||
|
|
|
@ -1181,6 +1181,11 @@ class Kodidb_Functions():
|
|||
))
|
||||
self.cursor.execute(query, (kodiid, mediatype, tag_id,))
|
||||
|
||||
def addSets(self, movieid, collections):
|
||||
for setname in collections:
|
||||
setid = self.createBoxset(setname)
|
||||
self.assignBoxset(setid, movieid)
|
||||
|
||||
def createBoxset(self, boxsetname):
|
||||
|
||||
self.logMsg("Adding boxset: %s" % boxsetname, 2)
|
||||
|
@ -1386,4 +1391,4 @@ class Kodidb_Functions():
|
|||
self.cursor.execute(query, (genreid, genre))
|
||||
|
||||
query = "INSERT OR REPLACE INTO song_genre(idGenre, idSong) values(?, ?)"
|
||||
self.cursor.execute(query, (genreid, kodiid))
|
||||
self.cursor.execute(query, (genreid, kodiid))
|
||||
|
|
Loading…
Reference in a new issue