diff --git a/VERSION b/VERSION index c402a380..9262b889 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.2-develop16 +1.17.2-develop17 diff --git a/docs/home/environmental.md b/docs/home/environmental.md index 87eecbdb..0eafd453 100644 --- a/docs/home/environmental.md +++ b/docs/home/environmental.md @@ -12,6 +12,7 @@ These docs are assuming you have a basic understanding of Docker concepts. One | [Time to Run](#time-to-run) | `-t` or `--time` | `PMM_TIME` | | [Run](#run) | `-r` or `--run` | `PMM_RUN` | | [Run Tests](#run-tests) | `-rt`, `--tests`, or `--run-tests` | `PMM_TEST` | +| [Timeout](#timeout) | `-ti` or `--timeout` | `PMM_TIMEOUT` | | [Collections Only](#collections-only) | `-co` or `--collections-only` | `PMM_COLLECTIONS_ONLY` | | [Playlists Only](#playlists-only) | `-po` or `--playlists-only` | `PMM_PLAYLISTS_ONLY` | | [Operations](#operations) | `-op` or `--operations` | `PMM_OPERATIONS` | @@ -211,6 +212,45 @@ docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex +### Timeout + +Change the main Plex Meta Manager timeout. + + + + + + + + + + + + + + + + + +
ShellEnvironment
Flags-ti or --timeoutPMM_TIMEOUT
Example--timeout 360PMM_TIMEOUT=360
+ +
+ Local Environment + +```shell +python plex_meta_manager.py ---timeout 360 +``` + +
+
+ Docker Environment + +```shell +docker run -it -v "X:\Media\Plex Meta Manager\config:/config:rw" meisnate12/plex-meta-manager ---timeout 360 +``` + +
+ ### Collections Only Only run collection metadata/YAML files, skip library operations, overlays, and collections/metadata. @@ -221,6 +261,7 @@ Only run collection metadata/YAML files, skip library operations, overlays, and Shell Environment + Flags -co or --collections-only diff --git a/modules/mdblist.py b/modules/mdblist.py index 6e085448..4e49c539 100644 --- a/modules/mdblist.py +++ b/modules/mdblist.py @@ -36,6 +36,7 @@ class MDbObj: self.tomatoesaudience_rating = None self.tmdb_rating = None self.letterboxd_rating = None + self.myanimelist_rating = None for rating in data["ratings"]: if rating["source"] == "imdb": self.imdb_rating = util.check_num(rating["value"], is_int=False) diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 2fd77b77..564b9b83 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -22,6 +22,7 @@ parser.add_argument("-db", "--debug", dest="debug", help=argparse.SUPPRESS, acti parser.add_argument("-tr", "--trace", dest="trace", help=argparse.SUPPRESS, action="store_true", default=False) parser.add_argument("-c", "--config", dest="config", help="Run with desired *.yml file", type=str) parser.add_argument("-t", "--time", "--times", dest="times", help="Times to update each day use format HH:MM (Default: 05:00) (comma-separated list)", default="05:00", type=str) +parser.add_argument("-ti", "--timeout", dest="timeout", help="PMM Global Timeout (Default: 180)", default=180, type=int) parser.add_argument("-re", "--resume", dest="resume", help="Resume collection run from a specific collection", type=str) parser.add_argument("-r", "--run", dest="run", help="Run without the scheduler", action="store_true", default=False) parser.add_argument("-is", "--ignore-schedules", dest="ignore_schedules", help="Run ignoring collection schedules", action="store_true", default=False) @@ -89,6 +90,7 @@ no_missing = get_arg("PMM_NO_MISSING", args.no_missing, arg_bool=True) read_only_config = get_arg("PMM_READ_ONLY_CONFIG", args.read_only_config, arg_bool=True) divider = get_arg("PMM_DIVIDER", args.divider) screen_width = get_arg("PMM_WIDTH", args.width, arg_int=True) +timeout = get_arg("PMM_TIMEOUT", args.timeout, arg_int=True) debug = get_arg("PMM_DEBUG", args.debug, arg_bool=True) trace = get_arg("PMM_TRACE", args.trace, arg_bool=True) @@ -125,6 +127,15 @@ def my_except_hook(exctype, value, tb): sys.excepthook = my_except_hook +old_send = requests.Session.send + +def new_send(*send_args, **kwargs): + if kwargs.get("timeout", None) is None: + kwargs["timeout"] = timeout + return old_send(*send_args, **kwargs) + +requests.Session.send = new_send + version = ("Unknown", "Unknown", 0) with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "VERSION")) as handle: for line in handle.readlines():