add first support for music library sync

This commit is contained in:
Marcel van der Veldt 2015-05-08 00:04:40 +02:00
parent 87681ee850
commit 8839b3b323
7 changed files with 760 additions and 13 deletions

View file

@ -61,4 +61,23 @@ class ReadKodiDB():
else:
return None
def getKodiMusicArtists(self, connection, cursor):
#returns all artists in Kodi db
cursor.execute("SELECT kodi_id, emby_id, checksum FROM emby WHERE media_type='artist'")
allartists = cursor.fetchall()
#this will return a list with tuples of all items returned from the database
return allartists
def getKodiMusicAlbums(self, connection, cursor):
#returns all artists in Kodi db
cursor.execute("SELECT kodi_id, emby_id, checksum FROM emby WHERE media_type='album'")
allalbums = cursor.fetchall()
#this will return a list with tuples of all items returned from the database
return allalbums
def getKodiMusicSongs(self, connection, cursor):
#returns all songs in Kodi db
cursor.execute("SELECT kodi_id, emby_id, checksum FROM emby WHERE media_type='song'")
allsongs = cursor.fetchall()
#this will return a list with tuples of all items returned from the database
return allsongs