diff --git a/plexutil.py b/plexutil.py index 054b3e9..3be671a 100644 --- a/plexutil.py +++ b/plexutil.py @@ -9,7 +9,7 @@ import os import sys import logging import logging.config -from typing import Dict, List +from typing import Optional, Dict, List from configparser import ConfigParser from plexapi.server import PlexServer, CONFIG @@ -18,7 +18,7 @@ logger = logging.getLogger(__name__) filename = os.path.basename(sys.argv[0]) SCRIPT_NAME = os.path.splitext(filename)[0] -def getPlexConfig(config_file: str='') -> Dict[str,str]: +def getPlexConfig(config_file: Optional[str]='') -> Dict[str,str]: """Return Plex Config paramaters for connection info {PLEX_URL, PLEX_TOKEN}\n Attempts to use one of either:\n * supplier path/to/config file (INI Format) diff --git a/schedule_preroll.py b/schedule_preroll.py index 8a8fc44..134310d 100644 --- a/schedule_preroll.py +++ b/schedule_preroll.py @@ -68,15 +68,15 @@ def getArguments() -> Namespace: argparse.Namespace: Namespace object """ description = 'Automate scheduling of pre-roll intros for Plex' - version = '0.9.0' + version = '0.9.1' - config_default = None #'./config.ini' + config_default = '' # './config.ini' log_config_default = './logging.conf' schedule_default = './preroll_schedules.yaml' parser = ArgumentParser(description='{}'.format(description)) parser.add_argument('-v', '--version', action='version', version='%(prog)s {}'.format(version), help='show the version number and exit') - parser.add_argument('-lc', '--logconfig-path', + parser.add_argument('-lc', '--logconfig-file', dest='log_config_file', action='store', default=log_config_default, help='Path to logging config file. [Default: {}]'.format(log_config_default)) @@ -84,10 +84,10 @@ def getArguments() -> Namespace: dest='do_test_run', action='store_true', default=False, help='Perform a test run, display output but dont save') - parser.add_argument('-c', '--config-path', + parser.add_argument('-c', '--config-file', dest='config_file', action='store', help='Path to Config.ini to use for Plex Server info. [Default: {}]'.format(config_default)) - parser.add_argument('-s', '--schedule-path', + parser.add_argument('-s', '--schedule-file', dest='schedule_file', action='store', help='Path to pre-roll schedule file (YAML) to be use. [Default: {}]'.format(schedule_default)) args = parser.parse_args()