Skip to content

Commit

Permalink
Fix subscribe toolbar-button in some cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
programmin1 committed Aug 30, 2012
1 parent 453915a commit 1417300
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,13 @@ def __init__(self, url, contentType, source):
isPod = False
if isPod and podurl: # Every media file has link to same url, so it must be podcast url of this page.
self.podcast = podurl
elif (len(buttons) > 1 and
buttons[0].get("subscribe-podcast-url")):
if not(buttons[0].get("subscribe-podcast-url").startswith("http://itunes.apple.com/WebObjects/DZR.woa/wa/subscribePodcast?id=")):
self.podcast = buttons[0].get("subscribe-podcast-url")
elif (len(buttons) > 1):
if buttons[0].get("subscribe-podcast-url"):
if not(buttons[0].get("subscribe-podcast-url").startswith("http://itunes.apple.com/WebObjects/DZR.woa/wa/subscribePodcast?id=")):
self.podcast = buttons[0].get("subscribe-podcast-url")
elif buttons[0].get("course-feed-url") and buttons[1].get("course-feed-url") is None:
# Single "subscribe", not a listing-page.
self.podcast = buttons[0].get("course-feed-url")

logging.debug("Parse took " + str(time.time()-sttime) + "s.")

Expand Down

0 comments on commit 1417300

Please sign in to comment.