diff --git a/VERSION b/VERSION index 78d37b4a..1705867e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.5-develop16 +1.16.5-develop17 diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 63ffba4e..b603a3cf 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -1,4 +1,4 @@ -import argparse, os, sys, time, traceback +import argparse, os, sys, time, traceback, uuid from datetime import datetime try: @@ -123,7 +123,21 @@ with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "VERSION")) a version = util.parse_version(line) break -plexapi.BASE_HEADERS["X-Plex-Client-Identifier"] = "Plex-Meta-Manager" +uuid_file = os.path.join(default_dir, "UUID") +uuid_num = None +if os.path.exists(uuid_file): + with open(uuid_file) as handle: + for line in handle.readlines(): + line = line.strip() + if len(line) > 0: + uuid_num = line + break +if not uuid_num: + uuid_num = uuid.uuid4() + with open(uuid_file, "w") as handle: + handle.write(str(uuid_num)) + +plexapi.BASE_HEADERS["X-Plex-Client-Identifier"] = str(uuid_num) def start(attrs): logger.add_main_handler()