projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e52776
)
[bandcamp] Modernize
author
Sergey M․
<dstftw@gmail.com>
Fri, 16 Oct 2015 18:51:35 +0000
(
00:51
+0600)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 16 Oct 2015 18:51:35 +0000
(
00:51
+0600)
youtube_dl/extractor/bandcamp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/bandcamp.py
b/youtube_dl/extractor/bandcamp.py
index f19e19001bef41311a8fd31666e27784335e805b..c1ef8051d3074a6551941bf140f88eee4ed8a124 100644
(file)
--- a/
youtube_dl/extractor/bandcamp.py
+++ b/
youtube_dl/extractor/bandcamp.py
@@
-10,6
+10,8
@@
from ..compat import (
)
from ..utils import (
ExtractorError,
+ float_or_none,
+ int_or_none,
)
@@
-56,7
+58,7
@@
class BandcampIE(InfoExtractor):
'ext': ext,
'vcodec': 'none',
'acodec': ext,
- 'abr': int(abr_str),
+ 'abr': int
_or_none
(abr_str),
})
self._sort_formats(formats)
@@
-65,7
+67,7
@@
class BandcampIE(InfoExtractor):
'id': compat_str(data['id']),
'title': data['title'],
'formats': formats,
- 'duration': float
(data['duration']
),
+ 'duration': float
_or_none(data.get('duration')
),
}
else:
raise ExtractorError('No free songs found')