Skip to content
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.

Commit

Permalink
Fix for dropbox lists
Browse files Browse the repository at this point in the history
  • Loading branch information
enen92 committed Nov 17, 2014
1 parent 98534c4 commit a43197c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugin.video.p2p-streams/resources/core/livestreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def addlista():
if (keyb.isConfirmed()):
search = keyb.getText()
if search=='': sys.exit(0)
encode=urllib.quote(search)
if encode.split(".")[-1] != "xml" and encode.split(".")[-1] != "m3u": mensagemok(translate(40000),translate(40128)); sys.exit(0)
if "dropbox" in search and not "?dl=1" in search: search = search + '?dl=1'
if "xml" not in search.split(".")[-1] and "m3u" not in search.split(".")[-1]: mensagemok(translate(40000),translate(40128)); sys.exit(0)
else:
try:
code = get_page_source(search)
Expand All @@ -97,7 +97,7 @@ def addlista():
searchname = keybdois.getText()
if searchname=='': sys.exit(0)
encode=urllib.quote(searchname)
if xbmcvfs.exists(os.path.join(pastaperfil,"Lists")): pass
if os.path.exists(os.path.join(pastaperfil,"Lists")): pass
else: xbmcvfs.mkdir(os.path.join(pastaperfil,"Lists"))
txt_name = searchname + ".txt"
save(os.path.join(pastaperfil,"Lists",txt_name),search)
Expand All @@ -122,8 +122,8 @@ def remove_list(name):
"""
def list_type(url):
ltype = url.split('.')[-1]
if ltype == 'xml': get_groups(url)
elif ltype == 'm3u': parse_m3u(url)
if 'xml' in ltype: get_groups(url)
elif 'm3u' in ltype: parse_m3u(url)
else: pass

def parse_m3u(url):
Expand Down

0 comments on commit a43197c

Please sign in to comment.