Skip to content

Commit

Permalink
add support for 2003
Browse files Browse the repository at this point in the history
Signed-off-by: wwqgtxx <[email protected]>
  • Loading branch information
wwqgtxx committed Jun 28, 2016
1 parent c8f73b9 commit 38def26
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion wwqLyParse/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
version = {
'port_version' : "0.5.0",
'type' : 'parse',
'version' : '0.4.0',
'version' : '0.4.1',
'uuid' : '{C35B9DFC-559F-49E2-B80B-79B66EC77471}',
'filter' : [],
'name' : 'WWQ猎影解析插件',
Expand Down
2 changes: 1 addition & 1 deletion wwqLyParse/parsers/iqiyimparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def Parse(self,input_text,types=None):
"urls" : info['data']['m3u'],
"duration" : time_s*1e3,
"length" : size,
"maxDown" : 1,
#"maxDown" : 1,
"unfixIp" : True
}]
})
Expand Down
31 changes: 22 additions & 9 deletions wwqLyParse/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
from lib import bridge

def get_systeminfo():
args = "systeminfo"
PIPE = subprocess.PIPE
p = subprocess.Popen(args, stdout=PIPE, stderr=PIPE, shell=False)
stdout, stderr = p.communicate()
stdout = bridge.try_decode(stdout)
stderr = bridge.try_decode(stderr)
global systeminfo
systeminfo = stdout
try:
args = "systeminfo"
PIPE = subprocess.PIPE
p = subprocess.Popen(args, stdout=PIPE, stderr=PIPE, shell=False)
stdout, stderr = p.communicate()
stdout = bridge.try_decode(stdout)
stderr = bridge.try_decode(stderr)
global systeminfo
systeminfo = stdout
except:
systeminfo = ""
get_systeminfo()

def isX64():
Expand All @@ -30,6 +33,9 @@ def isX64():
elif ("x86-based PC" in systeminfo):
print("x86")
return False
else:
print("UnKnow")
return False

def isXP():
if ("Windows XP" in systeminfo):
Expand All @@ -38,6 +44,13 @@ def isXP():
else:
return False

def is2003():
if ("Server 2003" in systeminfo):
print("2003")
return True
else:
return False

def makePython():
global EMBED_PYTHON
if isX64():
Expand All @@ -50,7 +63,7 @@ def makePython():
def checkEmbedPython():
global useEmbedPython
useEmbedPython = True
if isXP():
if (isXP() or is2003() or (systeminfo =="")):
useEmbedPython = False
return
y_bin = bridge.pn(bridge.pjoin(bridge.get_root_path(), './printok.py'))
Expand Down

0 comments on commit 38def26

Please sign in to comment.