Skip to content

Commit

Permalink
cartoonhd: fix tvshow matching
Browse files Browse the repository at this point in the history
  • Loading branch information
hbiyik committed Oct 24, 2016
1 parent 08e9869 commit 897cc72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/providers/video_index_tvdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def run(ump):
dt = date.today()
ws=time.strftime("%Y-%m-%d",(dt+timedelta(days=-7)).timetuple())
we=time.strftime("%Y-%m-%d",(dt+timedelta(days=+7)).timetuple())
ump.index_item("Last 2 Weeks","agenda",args={"seen":True,"start":ws,"end":we,"human":True})
ump.index_item("Last + This Week","agenda",args={"seen":True,"start":ws,"end":we,"human":True})
for i in range(8):
day=dt+timedelta(days=i-1)
if i== 0: dayname="Yesterday"
Expand Down
9 changes: 5 additions & 4 deletions lib/providers/video_link_cartoonhd.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ def run(ump):
"sl":md5.new(slk.encode("base-64")[:-1]+search).hexdigest()
}
for result in json.loads(ump.get_page(domain+"/api/v2/cautare/"+search,encoding,data=d).encode("ascii","replace")):
if ump.is_same(name,result["title"]) and (is_serie or ump.is_same(str(i["year"]),str(result["year"]))):
found=True
break
meta=result["meta"].lower()
if ump.is_same(name,result["title"]):
if (is_serie and "show" in meta) or (not is_serie and "movie" in meta and ump.is_same(str(i["year"]),str(result["year"]))):
found=True
break
if found:
ump.add_log("cartoonhd has matched %s"%names[0])
else:
ump.add_log("cartoonhd can't match %s"%names[0])
return

if is_serie:
sourcepage=domain+result["permalink"]+"/season/%01d/episode/%01d"%(int(i["season"]),int(i["episode"]))
else:
Expand Down

0 comments on commit 897cc72

Please sign in to comment.