Skip to content

Commit

Permalink
Letwatch DVD option
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-alpha committed Sep 21, 2015
1 parent fd06ef7 commit 05c9620
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Contents/Code/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
TITLE = L('Title')
VERSION = '0.04' # Release notation (x.y - where x is major and y is minor)
VERSION = '0.05' # Release notation (x.y - where x is major and y is minor)
GITHUB_REPOSITORY = 'coder-alpha/DesiTV.bundle'
PREFIX = "/video/desitv"
################################################################################
Expand Down
12 changes: 11 additions & 1 deletion Contents/Code/desirulez.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def PlayerLinksMenu(url, title, type):
# Add the item to the collection
if type == "TV":
oc.add(DirectoryObject(key=Callback(EpisodeLinksMenu, url=url, title=title, type=L('LetWatchUS-HD')), title=L('LetWatchUS-HD'), thumb=R('icon-letwatchus.png')))
oc.add(DirectoryObject(key=Callback(EpisodeLinksMenu, url=url, title=title, type=L('LetWatchUS-DVD')), title=L('LetWatchUS-DVD'), thumb=R('icon-letwatchus.png')))
oc.add(DirectoryObject(key=Callback(EpisodeLinksMenu, url=url, title=title, type=L('DailymotionHD')), title=L('DailymotionHD'), thumb=R('icon-dailymotion.png')))
oc.add(DirectoryObject(key=Callback(EpisodeLinksMenu, url=url, title=title, type=L('DailymotionDVD')), title=L('DailymotionDVD'), thumb=R('icon-dailymotion.png')))
oc.add(DirectoryObject(key=Callback(EpisodeLinksMenu, url=url, title=title, type=L('DailymotionSD')), title=L('DailymotionSD'), thumb=R('icon-dailymotion.png')))
Expand Down Expand Up @@ -331,6 +332,8 @@ def EpisodeLinksMenu(url, title, type):

if type == "LetWatchUS-HD":
items = GetLetwatchusHD(html)
elif type == "LetWatchUS-DVD":
items = GetLetwatchusDVD(html)
elif type == "Dailymotion HD":
items = GetDailymotionHD(html)
elif type == "Dailymotion DVD":
Expand Down Expand Up @@ -492,7 +495,14 @@ def GetLetwatchusHD(html):
if len(items) == 0:
items = html.xpath("//div[@class='content hasad']//b[contains(font[@color='Red']//text(), 'Letwatch 720p')]//following-sibling::a")
return items


####################################################################################################

def GetLetwatchusDVD(html):
items = html.xpath("//div[@class='content']//b[contains(font/text(),'Letwatch DVD')]/following-sibling::a[count(. | //b[count(//b[contains(font/text(),'Letwatch DVD')]/preceding-sibling::b)+2]/preceding-sibling::a) = count(//b[count(//b[contains(font/text(),'Letwatch DVD')]/preceding-sibling::b)+2]/preceding-sibling::a)]")
if len(items) == 0:
items = html.xpath("//div[@class='content hasad']//b[contains(font[@color='Red']//text(), 'Letwatch DVD')]//following-sibling::a")
return items
####################################################################################################

def GetDailymotion(html):
Expand Down

0 comments on commit 05c9620

Please sign in to comment.