Cancel processing exports on startup
This commit is contained in:
@@ -45,7 +45,7 @@ if PYTHON2:
|
||||
import common
|
||||
import database
|
||||
import datafactory
|
||||
import helpers
|
||||
import exporter
|
||||
import libraries
|
||||
import logger
|
||||
import mobile_app
|
||||
@@ -65,7 +65,7 @@ else:
|
||||
from plexpy import common
|
||||
from plexpy import database
|
||||
from plexpy import datafactory
|
||||
from plexpy import helpers
|
||||
from plexpy import exporter
|
||||
from plexpy import libraries
|
||||
from plexpy import logger
|
||||
from plexpy import mobile_app
|
||||
@@ -535,6 +535,9 @@ def start():
|
||||
notification_handler.start_threads(num_threads=CONFIG.NOTIFICATION_THREADS)
|
||||
notifiers.check_browser_enabled()
|
||||
|
||||
# Cancel processing exports
|
||||
exporter.cancel_exports()
|
||||
|
||||
if CONFIG.FIRST_RUN_COMPLETE:
|
||||
activity_pinger.connect_server(log=True, startup=True)
|
||||
|
||||
|
@@ -1068,6 +1068,11 @@ def delete_all_exports():
|
||||
return True
|
||||
|
||||
|
||||
def cancel_exports():
|
||||
db = database.MonitorDatabase()
|
||||
db.action('UPDATE exports SET complete = -1 WHERE complete = 0')
|
||||
|
||||
|
||||
def get_export_datatable(section_id=None, rating_key=None, kwargs=None):
|
||||
default_return = {'recordsFiltered': 0,
|
||||
'recordsTotal': 0,
|
||||
|
Reference in New Issue
Block a user