Merge pull request #127 from mcarlton00/deletions

Remove unused imports and function
This commit is contained in:
mcarlton00 2019-10-27 19:17:08 -04:00 committed by GitHub
commit 0118c57226
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 27 deletions

View file

@ -19,9 +19,8 @@ import library
import setup import setup
import monitor import monitor
from views import Views, verify_kodi_defaults from views import Views, verify_kodi_defaults
from helper import _, window, settings, event, dialog, compare_version from helper import _, window, settings, event, dialog
from jellyfin import Jellyfin from jellyfin import Jellyfin
from database import Database, jellyfin_db, reset
################################################################################################# #################################################################################################

View file

@ -6,5 +6,6 @@ from obj import Objects
from actions import Actions from actions import Actions
from actions import PlaylistWorker from actions import PlaylistWorker
from actions import on_play, on_update, special_listener from actions import on_play, on_update, special_listener
import utils
Objects().mapping() Objects().mapping()

View file

@ -17,7 +17,6 @@ from downloader import TheVoid
from obj import Objects from obj import Objects
from helper import _, playutils, api, window, settings, dialog from helper import _, playutils, api, window, settings, dialog
from dialogs import resume from dialogs import resume
from utils import get_play_action
################################################################################################# #################################################################################################
@ -94,11 +93,7 @@ class Actions(object):
if item['MediaType'] in ('Video', 'Audio'): if item['MediaType'] in ('Video', 'Audio'):
resume = item['UserData'].get('PlaybackPositionTicks') resume = item['UserData'].get('PlaybackPositionTicks')
if resume: if resume and transcode and not seektime:
if get_play_action() == "Resume":
seektime = True
if transcode and not seektime:
choice = self.resume_dialog(api.API(item, self.server).adjust_resume((resume or 0) / 10000000.0)) choice = self.resume_dialog(api.API(item, self.server).adjust_resume((resume or 0) / 10000000.0))
if choice is None: if choice is None:

View file

@ -13,21 +13,6 @@ LOG = logging.getLogger("JELLYFIN." + __name__)
################################################################################################# #################################################################################################
def get_play_action():
''' I could not figure out a way to listen to kodi setting changes?
For now, verify the play action every time play is called.
'''
options = ['Choose', 'Play', 'Resume', 'Show information']
result = JSONRPC('Settings.GetSettingValue').execute({'setting': "myvideos.selectaction"})
try:
return options[result['result']['value']]
except Exception as error:
LOG.exception("Returning play action due to error: %s", error)
return options[1]
def get_grouped_set(): def get_grouped_set():
''' Get if boxsets should be grouped ''' Get if boxsets should be grouped