Skip to content

Commit 839c856

Browse files
committed
Use CONFIG rather constants
1 parent b5051d8 commit 839c856

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

plexapi/myplex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ def syncItems(self, client=None, clientId=None):
709709
if client:
710710
clientId = client.clientIdentifier
711711
elif clientId is None:
712-
clientId = X_PLEX_IDENTIFIER
712+
clientId = CONFIG.get('header.identifier')
713713

714714
data = self.query(SyncList.key.format(clientId=clientId))
715715

@@ -735,7 +735,7 @@ def sync(self, sync_item, client=None, clientId=None):
735735
:exc:`~plexapi.exceptions.BadRequest`: Provided client doesn't provides `sync-target`.
736736
"""
737737
if not client and not clientId:
738-
clientId = X_PLEX_IDENTIFIER
738+
clientId = CONFIG.get('header.identifier')
739739

740740
if not client:
741741
for device in self.devices():

plexapi/sonos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import requests
3-
from plexapi import CONFIG, X_PLEX_IDENTIFIER
3+
from plexapi import CONFIG
44
from plexapi.client import PlexClient
55
from plexapi.exceptions import BadRequest
66
from plexapi.playqueue import PlayQueue
@@ -105,7 +105,7 @@ def playMedia(self, media, offset=0, **params):
105105
"port": server_port,
106106
"token": media._server.createToken(),
107107
"commandID": self._nextCommandId(),
108-
"X-Plex-Client-Identifier": X_PLEX_IDENTIFIER,
108+
"X-Plex-Client-Identifier": CONFIG.get('header.identifier'),
109109
"X-Plex-Token": media._server._token,
110110
"X-Plex-Target-Client-Identifier": self.machineIdentifier,
111111
},

0 commit comments

Comments
 (0)