fix db
This commit is contained in:
@@ -343,9 +343,9 @@ def run(item=None):
|
||||
if platformtools.dialog_yesno(config.get_localized_string(60038), config.get_localized_string(60015)):
|
||||
run(Item(channel="setting", action="report_menu"))
|
||||
finally:
|
||||
if not item.action.startswith('play'):
|
||||
from core import db
|
||||
db.close()
|
||||
# db need to be closed when not used, it will cause freezes
|
||||
from core import db
|
||||
db.close()
|
||||
|
||||
|
||||
def new_search(item, channel=None):
|
||||
|
||||
@@ -102,7 +102,10 @@ def mark_auto_as_watched(item):
|
||||
xbmc.sleep(500)
|
||||
if next_episode and next_episode.next_ep:
|
||||
from platformcode.launcher import play_from_library
|
||||
return play_from_library(next_episode)
|
||||
play_from_library(next_episode)
|
||||
# db need to be closed when not used, it will cause freezes
|
||||
from core import db
|
||||
db.close()
|
||||
|
||||
# If it is configured to mark as seen
|
||||
if config.get_setting("mark_as_watched", "videolibrary"):
|
||||
|
||||
Reference in New Issue
Block a user