Clean up Plex Companion subscribers
This commit is contained in:
parent
55791659a9
commit
98554dbe26
1 changed files with 4 additions and 6 deletions
|
@ -1,12 +1,12 @@
|
||||||
import re
|
import re
|
||||||
import threading
|
import threading
|
||||||
from xml.dom.minidom import parseString
|
# from xml.dom.minidom import parseString
|
||||||
from functions import *
|
from functions import *
|
||||||
from settings import settings
|
from settings import settings
|
||||||
from httppersist import requests
|
from httppersist import requests
|
||||||
|
|
||||||
from xbmc import Player
|
from xbmc import Player
|
||||||
import xbmcgui
|
# import xbmcgui
|
||||||
import downloadutils
|
import downloadutils
|
||||||
from utils import window
|
from utils import window
|
||||||
import PlexFunctions as pf
|
import PlexFunctions as pf
|
||||||
|
@ -67,11 +67,9 @@ class SubscriptionManager:
|
||||||
ret += ' />'
|
ret += ' />'
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
WINDOW = xbmcgui.Window(10000)
|
|
||||||
|
|
||||||
# pbmc_server = str(WINDOW.getProperty('plexbmc.nowplaying.server'))
|
# pbmc_server = str(WINDOW.getProperty('plexbmc.nowplaying.server'))
|
||||||
# userId = str(WINDOW.getProperty('currUserId'))
|
# userId = str(WINDOW.getProperty('currUserId'))
|
||||||
pbmc_server = WINDOW.getProperty('pms_server')
|
pbmc_server = window('pms_server')
|
||||||
if pbmc_server:
|
if pbmc_server:
|
||||||
(self.protocol, self.server, self.port) = \
|
(self.protocol, self.server, self.port) = \
|
||||||
pbmc_server.split(':')
|
pbmc_server.split(':')
|
||||||
|
@ -81,7 +79,7 @@ class SubscriptionManager:
|
||||||
while not keyid:
|
while not keyid:
|
||||||
if count > 300:
|
if count > 300:
|
||||||
break
|
break
|
||||||
keyid = WINDOW.getProperty('Plex_currently_playing_itemid')
|
keyid = window('Plex_currently_playing_itemid')
|
||||||
xbmc.sleep(100)
|
xbmc.sleep(100)
|
||||||
count += 1
|
count += 1
|
||||||
if keyid:
|
if keyid:
|
||||||
|
|
Loading…
Reference in a new issue