mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-12-13 10:33:16 +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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue