PlexClient Override feature added

New feature!  Now, if your directory is named "channels_<NAME>" your script will override and always play to the client <NAME>.  This is going to be helpful for when we add mutli-box support.
This commit is contained in:
mutto233
2018-07-10 01:23:02 -04:00
committed by GitHub
parent 8a56aec40e
commit b4564345ea

View File

@@ -413,6 +413,13 @@ class PseudoDailyScheduleController():
*
'''
def play_media(self, mediaType, mediaParentTitle, mediaTitle, offset, customSectionName, durationAmount):
# Check for necessary client override, if we have a folder of "channels_<NAME>"
cwd = os.getcwd()
if "channels_" in cwd:
head,sep,tail = cwd.partition('channels_')
head,sep,tail = tail.partition('/')
self.PLEX_CLIENTS = [head]
print "CLIENT OVERRIDE: %s" % self.PLEX_CLIENTS
try:
if mediaType == "TV Shows":