diff --git a/resources/lib/embydb_functions.py b/resources/lib/embydb_functions.py index ee4cf558..d6485fe3 100644 --- a/resources/lib/embydb_functions.py +++ b/resources/lib/embydb_functions.py @@ -234,7 +234,7 @@ class Embydb_Functions(): return items - def getPlexId(self, kodiid): + def getPlexId(self, kodiid, mediatype): """ Returns the Plex ID usind the Kodiid. Result: (Plex Id, Parent's Plex Id) @@ -242,10 +242,10 @@ class Embydb_Functions(): query = ' '.join(( "SELECT emby_id, parent_id", "FROM emby", - "WHERE kodi_id = ?" + "WHERE kodi_id = ? AND media_type = ?" )) try: - self.embycursor.execute(query, (kodiid)) + self.embycursor.execute(query, (kodiid, mediatype)) item = self.embycursor.fetchone() return item except: