Skip to content

Commit

Permalink
Fixed torrenttelik playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyPavlenko committed Feb 24, 2016
1 parent 73da4c4 commit dd2f94d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/torrenttelik_plugin.py
Expand Up @@ -26,7 +26,8 @@ def downloadPlaylist(self, url):
try:
req = urllib2.Request(url, headers={'User-Agent' : "Magic Browser"})
Torrenttelik.playlist = urllib2.urlopen(req, timeout=10).read()
Torrenttelik.playlist = Torrenttelik.playlist.split('\xef\xbb\xbf')[1] # garbage at the beginning
Torrenttelik.playlist = Torrenttelik.playlist.split('\xef\xbb\xbf')[1] # garbage at the beginning
Torrenttelik.playlist = Torrenttelik.playlist.replace(',\r\n]}', '\r\n]}') # excess comma at the end
except:
Torrenttelik.logger.error("Can't download playlist!")
return False
Expand Down

0 comments on commit dd2f94d

Please sign in to comment.