From 2e1a2328fdb16b720304a278bd8080da539c32e8 Mon Sep 17 00:00:00 2001 From: SpootDev Date: Thu, 31 Mar 2016 10:51:48 -0500 Subject: [PATCH] return data directly instead of creating new var --- resources/lib/embydb_functions.py | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/resources/lib/embydb_functions.py b/resources/lib/embydb_functions.py index c1150272..cfebd5ff 100644 --- a/resources/lib/embydb_functions.py +++ b/resources/lib/embydb_functions.py @@ -145,9 +145,7 @@ class Embydb_Functions(): "WHERE emby_id LIKE ?" )) self.embycursor.execute(query, (embyid+"%",)) - items = self.embycursor.fetchall() - - return items + return self.embycursor.fetchall() def getItem_byView(self, mediafolderid): @@ -158,9 +156,7 @@ class Embydb_Functions(): "WHERE media_folder = ?" )) self.embycursor.execute(query, (mediafolderid,)) - items = self.embycursor.fetchall() - - return items + return self.embycursor.fetchall() def getItem_byKodiId(self, kodiid, mediatype): @@ -172,9 +168,7 @@ class Embydb_Functions(): "AND media_type = ?" )) self.embycursor.execute(query, (kodiid, mediatype,)) - item = self.embycursor.fetchone() - - return item + return self.embycursor.fetchone() def getItem_byParentId(self, parentid, mediatype): @@ -186,9 +180,7 @@ class Embydb_Functions(): "AND media_type = ?" )) self.embycursor.execute(query, (parentid, mediatype,)) - items = self.embycursor.fetchall() - - return items + return self.embycursor.fetchall() def getItemId_byParentId(self, parentid, mediatype): @@ -200,9 +192,7 @@ class Embydb_Functions(): "AND media_type = ?" )) self.embycursor.execute(query, (parentid, mediatype,)) - items = self.embycursor.fetchall() - - return items + return self.embycursor.fetchall() def getChecksum(self, mediatype): @@ -213,9 +203,7 @@ class Embydb_Functions(): "WHERE emby_type = ?" )) self.embycursor.execute(query, (mediatype,)) - items = self.embycursor.fetchall() - - return items + return self.embycursor.fetchall() def getMediaType_byId(self, embyid):