Merge branch 'master' into use-other-downloaders

This commit is contained in:
Rogério Brito 2013-01-23 07:03:46 -02:00
commit 3b8b71ef8f
3 changed files with 10 additions and 5 deletions

View File

@ -25,7 +25,7 @@ make clean
nosetests --with-coverage --cover-package=youtube_dl --cover-html test || exit 1 nosetests --with-coverage --cover-package=youtube_dl --cover-html test || exit 1
echo "\n### Changing version in version.py..." echo "\n### Changing version in version.py..."
sed -i~ "s/__version__ = '.*'/__version__ = '$version'/" youtube_dl/version.py sed -i "s/__version__ = '.*'/__version__ = '$version'/" youtube_dl/version.py
echo "\n### Committing CHANGELOG README.md and youtube_dl/version.py..." echo "\n### Committing CHANGELOG README.md and youtube_dl/version.py..."
make README.md make README.md
@ -81,6 +81,6 @@ ROOT=$(pwd)
git push "$ROOT" gh-pages git push "$ROOT" gh-pages
git push "$ORIGIN_URL" gh-pages git push "$ORIGIN_URL" gh-pages
) )
rm -r build rm -rf build
echo "\n### DONE!" echo "\n### DONE!"

View File

@ -3541,10 +3541,12 @@ class JustinTVIE(InfoExtractor):
video_extension = os.path.splitext(video_url)[1][1:] video_extension = os.path.splitext(video_url)[1][1:]
video_date = re.sub('-', '', clip['start_time'][:10]) video_date = re.sub('-', '', clip['start_time'][:10])
video_uploader_id = clip.get('user_id', clip.get('channel_id')) video_uploader_id = clip.get('user_id', clip.get('channel_id'))
video_id = clip['id']
video_title = clip.get('title', video_id)
info.append({ info.append({
'id': clip['id'], 'id': video_id,
'url': video_url, 'url': video_url,
'title': clip['title'], 'title': video_title,
'uploader': clip.get('channel_name', video_uploader_id), 'uploader': clip.get('channel_name', video_uploader_id),
'uploader_id': video_uploader_id, 'uploader_id': video_uploader_id,
'upload_date': video_date, 'upload_date': video_date,

View File

@ -409,7 +409,10 @@ def encodeFilename(s):
# match Windows 9x series as well. Besides, NT 4 is obsolete.) # match Windows 9x series as well. Besides, NT 4 is obsolete.)
return s return s
else: else:
return s.encode(sys.getfilesystemencoding(), 'ignore') encoding = sys.getfilesystemencoding()
if encoding is None:
encoding = 'utf-8'
return s.encode(encoding, 'ignore')
class ExtractorError(Exception): class ExtractorError(Exception):