mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-24 17:10:32 +00:00
start of kodi uniqueid
This commit is contained in:
parent
863919d696
commit
87501eedea
3 changed files with 32 additions and 1 deletions
|
@ -21,6 +21,12 @@ class KodiMovies(KodiItems):
|
|||
|
||||
KodiItems.__init__(self)
|
||||
|
||||
def create_entry_uniqueid(self):
|
||||
self.cursor.execute("select coalesce(max(uniqueid_id),0) from uniqueid")
|
||||
kodi_id = self.cursor.fetchone()[0] + 1
|
||||
|
||||
return kodi_id
|
||||
|
||||
def create_entry_rating(self):
|
||||
self.cursor.execute("select coalesce(max(rating_id),0) from rating")
|
||||
kodi_id = self.cursor.fetchone()[0] + 1
|
||||
|
@ -128,6 +134,26 @@ class KodiMovies(KodiItems):
|
|||
))
|
||||
self.cursor.execute(query, (args))
|
||||
|
||||
def add_uniqueid(self, *args):
|
||||
query = (
|
||||
'''
|
||||
INSERT INTO uniqueid(
|
||||
uniqueid_id, media_id, media_type, value, type)
|
||||
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
'''
|
||||
)
|
||||
self.cursor.execute(query, (args))
|
||||
|
||||
def update_uniqueid(self, *args):
|
||||
query = ' '.join((
|
||||
|
||||
"UPDATE uniqueid",
|
||||
"SET media_id = ?, media_type = ?, value = ?, type = ?",
|
||||
"WHERE uniqueid_id = ?"
|
||||
))
|
||||
self.cursor.execute(query, (args))
|
||||
|
||||
def add_countries(self, kodi_id, countries):
|
||||
|
||||
if self.kodi_version > 14:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue