mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
twitch: Don't include description in filename
This can easily lead to "IOError: [Errno 36] File name too long" exceptions.
This commit is contained in:
parent
f7b26a5745
commit
495dc1fcaa
@ -70,10 +70,7 @@ class Twitch(Service):
|
|||||||
|
|
||||||
if options.output_auto:
|
if options.output_auto:
|
||||||
info = json.loads(get_http_data("https://api.twitch.tv/kraken/videos/v%s" % videoid)[1])
|
info = json.loads(get_http_data("https://api.twitch.tv/kraken/videos/v%s" % videoid)[1])
|
||||||
if info["description"]:
|
options.output = "twitch-%s-%s" % (info["channel"]["name"], filenamify(info["title"]))
|
||||||
options.output = "twitch-%s-%s_%s" % (info["channel"]["name"], filenamify(info["title"]), filenamify(info["description"]))
|
|
||||||
else:
|
|
||||||
options.output = "twitch-%s-%s" % (info["channel"]["name"], filenamify(info["title"]))
|
|
||||||
|
|
||||||
if "token" not in access:
|
if "token" not in access:
|
||||||
raise TwitchUrlException('video', self.url)
|
raise TwitchUrlException('video', self.url)
|
||||||
|
Loading…
Reference in New Issue
Block a user