mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 17:56:11 +00:00
Remove emby references from music database
This commit is contained in:
parent
a7c96577cd
commit
e96f32308b
2 changed files with 10 additions and 1 deletions
|
@ -63,6 +63,15 @@ class Database(object):
|
|||
jellyfin_tables(self.cursor)
|
||||
self.conn.commit()
|
||||
|
||||
# Migration for #162
|
||||
if self.db_file == 'music':
|
||||
query = self.conn.execute('SELECT * FROM path WHERE strPath LIKE "%/emby/%"')
|
||||
contents = query.fetchall()
|
||||
if contents:
|
||||
for item in contents:
|
||||
newPath = item[1].replace('/emby/', '/')
|
||||
self.conn.execute('UPDATE path SET strPath = "{}" WHERE idPath = "{}"'.format(newPath, item[0]))
|
||||
|
||||
return self
|
||||
|
||||
def _get_database(self, path, silent=False):
|
||||
|
|
|
@ -329,7 +329,7 @@ class Music(KodiDb):
|
|||
|
||||
else:
|
||||
server_address = self.server.auth.get_server_info(self.server.auth.server_id)['address']
|
||||
obj['Path'] = "%s/emby/Audio/%s/" % (server_address, obj['Id'])
|
||||
obj['Path'] = "%s/Audio/%s/" % (server_address, obj['Id'])
|
||||
obj['Filename'] = "stream.%s?static=true" % obj['Container']
|
||||
|
||||
def song_artist_discography(self, obj):
|
||||
|
|
Loading…
Reference in a new issue