aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-03-03 02:40:51 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-03-03 03:27:55 +0800
commit7465e7e42d0a02196e8d8ecd49edcadca4823897 (patch)
treee2bdb2da397171e1706e42e08a431ea50a3125d4 /youtube_dl
parent5e73a67d44bc25bd8660704cd437d35bd1e9541e (diff)
downloadyoutube-dl-7465e7e42d0a02196e8d8ecd49edcadca4823897.tar.xz
[letv] Keep videos' order in playlists
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/letv.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/letv.py b/youtube_dl/extractor/letv.py
index 246556316..91172c096 100644
--- a/youtube_dl/extractor/letv.py
+++ b/youtube_dl/extractor/letv.py
@@ -22,6 +22,7 @@ from ..utils import (
str_or_none,
encode_data_uri,
url_basename,
+ orderedSet,
)
@@ -211,8 +212,8 @@ class LetvTvIE(InfoExtractor):
page = self._download_webpage(url, playlist_id)
# Currently old domain names are still used in playlists
- media_ids = list(set(re.findall(
- r'http://www.letv.com/ptv/vplay/(\d+).html', page)))
+ media_ids = orderedSet(re.findall(
+ r'http://www.letv.com/ptv/vplay/(\d+).html', page))
entries = [self.url_result(LetvIE._URL_TEMPLATE % media_id, ie='Letv')
for media_id in media_ids]