@staticmethod
def playlist_result(entries, playlist_id=None, playlist_title=None):
"""Returns a playlist"""
- # Ensure we don't have any duplicates in the playlist
- seen = set()
- new_list = []
- for url in entries:
- theurl = tuple(url.items())
- if theurl not in seen:
- seen.add(theurl)
- new_list.append(url)
- entries = new_list
-
video_info = {'_type': 'playlist',
'entries': entries}
if playlist_id:
if matches:
urlrs = [self.url_result(unescapeHTML(tuppl[1]), 'Youtube')
for tuppl in matches]
+ # First, ensure we have a duplicate free list of entries
+ seen = set()
+ new_list = []
+ theurl = tuple(url.items())
+ if theurl not in seen:
+ seen.add(theurl)
+ new_list.append(url)
+ urlrs = new_list
return self.playlist_result(
urlrs, playlist_id=video_id, playlist_title=video_title)
if matches:
urlrs = [self.url_result(unescapeHTML(tuppl[1]))
for tuppl in matches]
+ # First, ensure we have a duplicate free list of entries
+ seen = set()
+ new_list = []
+ theurl = tuple(url.items())
+ if theurl not in seen:
+ seen.add(theurl)
+ new_list.append(url)
+ urlrs = new_list
return self.playlist_result(
urlrs, playlist_id=video_id, playlist_title=video_title)
if matches:
urlrs = [self.url_result(unescapeHTML(eurl), 'FunnyOrDie')
for eurl in matches]
+ # First, ensure we have a duplicate free list of entries
+ seen = set()
+ new_list = []
+ theurl = tuple(url.items())
+ if theurl not in seen:
+ seen.add(theurl)
+ new_list.append(url)
+ urlrs = new_list
return self.playlist_result(
urlrs, playlist_id=video_id, playlist_title=video_title)