mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-19 22:50:31 +00:00
support add/update krypton ratings
This commit is contained in:
parent
e72a3070e3
commit
cb30feba46
5 changed files with 116 additions and 36 deletions
|
@ -113,6 +113,16 @@ class KodiMovies(KodiItems):
|
|||
self.cursor.execute("DELETE FROM movie WHERE idMovie = ?", (kodi_id,))
|
||||
self.cursor.execute("DELETE FROM files WHERE idFile = ?", (file_id,))
|
||||
|
||||
def get_ratingid(self, media_id):
|
||||
|
||||
query = "SELECT rating_id FROM rating WHERE media_id = ?"
|
||||
self.cursor.execute(query, (media_id,))
|
||||
try:
|
||||
ratingid = self.cursor.fetchone()[0]
|
||||
except TypeError:
|
||||
ratingid = None
|
||||
|
||||
return ratingid
|
||||
|
||||
def add_ratings(self, *args):
|
||||
query = (
|
||||
|
@ -134,6 +144,17 @@ class KodiMovies(KodiItems):
|
|||
))
|
||||
self.cursor.execute(query, (args))
|
||||
|
||||
def get_uniqueid(self, media_id):
|
||||
|
||||
query = "SELECT uniqueid_id FROM uniqueid WHERE media_id = ?"
|
||||
self.cursor.execute(query, (media_id,))
|
||||
try:
|
||||
uniqueid = self.cursor.fetchone()[0]
|
||||
except TypeError:
|
||||
uniqueid = None
|
||||
|
||||
return uniqueid
|
||||
|
||||
def add_uniqueid(self, *args):
|
||||
query = (
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue