mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-12 11:16:14 +00:00
Add automatic database migration for Kodi Omega
This commit is contained in:
parent
6ca919c0d7
commit
373d34a56e
3 changed files with 58 additions and 7 deletions
|
@ -11,6 +11,7 @@ from six.moves import queue as Queue
|
|||
from kodi_six import xbmc, xbmcgui
|
||||
|
||||
from .objects import Movies, TVShows, MusicVideos, Music
|
||||
from .objects.kodi import Movies as KodiDb
|
||||
from .database import Database, jellyfin_db, get_sync, save_sync
|
||||
from .full_sync import FullSync
|
||||
from .views import Views
|
||||
|
@ -122,6 +123,14 @@ class Library(threading.Thread):
|
|||
# Make sure we always have a version in the database
|
||||
db.add_version((TARGET_DB_VERSION))
|
||||
|
||||
# Video Database Migrations
|
||||
with Database('video') as videodb:
|
||||
vid_db = KodiDb(videodb.cursor)
|
||||
if vid_db.migrations():
|
||||
LOG.info('changes detected, reloading skin')
|
||||
xbmc.executebuiltin('UpdateLibrary(video)')
|
||||
xbmc.executebuiltin('ReloadSkin()')
|
||||
|
||||
@stop
|
||||
def service(self):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue