mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Fix X-Plex-Client-Identifier to send unique id per client, not static value.
This commit is contained in:
parent
7bf45f8bef
commit
4f1056cf87
4 changed files with 14 additions and 2 deletions
|
@ -24,6 +24,7 @@ import webbrowser
|
|||
import sqlite3
|
||||
import cherrypy
|
||||
import datetime
|
||||
import uuid
|
||||
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from apscheduler.triggers.interval import IntervalTrigger
|
||||
|
@ -128,6 +129,12 @@ def initialize(config_file):
|
|||
except Exception as e:
|
||||
logger.error("Can't connect to the database: %s", e)
|
||||
|
||||
# Check if PlexPy has a uuid
|
||||
if CONFIG.PMS_UUID == '' or not CONFIG.PMS_UUID:
|
||||
my_uuid = generate_uuid()
|
||||
CONFIG.__setattr__('PMS_UUID', my_uuid)
|
||||
CONFIG.write()
|
||||
|
||||
# Get the currently installed version. Returns None, 'win32' or the git
|
||||
# hash.
|
||||
CURRENT_VERSION, CONFIG.GIT_BRANCH = versioncheck.getVersion()
|
||||
|
@ -334,3 +341,7 @@ def shutdown(restart=False, update=False):
|
|||
subprocess.Popen(popen_list, cwd=os.getcwd())
|
||||
|
||||
os._exit(0)
|
||||
|
||||
def generate_uuid():
|
||||
logger.debug(u"Generating UUID...")
|
||||
return uuid.uuid4().hex
|
Loading…
Add table
Add a link
Reference in a new issue