Skip to content

Commit 6e218ae

Browse files
committed
plugins.vimeo: fix offline event streams
1 parent 40c16b8 commit 6e218ae

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/streamlink/plugins/vimeo.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _schema_config(config):
4848
{
4949
"cdns": {
5050
str: validate.all(
51-
{"url": validate.url()},
51+
{validate.optional("url"): validate.url()},
5252
validate.get("url"),
5353
),
5454
},
@@ -64,7 +64,7 @@ def _schema_config(config):
6464
validate.optional("progressive"): [
6565
validate.all(
6666
{
67-
"url": validate.url(),
67+
validate.optional("url"): validate.url(),
6868
"quality": str,
6969
},
7070
validate.union_get("quality", "url"),
@@ -74,7 +74,7 @@ def _schema_config(config):
7474
validate.optional("text_tracks"): [
7575
validate.all(
7676
{
77-
"url": str,
77+
validate.optional("url"): str,
7878
"lang": str,
7979
},
8080
validate.union_get("lang", "url"),
@@ -218,11 +218,15 @@ def _get_streams(self):
218218

219219
hls = hls or {}
220220
for url in hls.values():
221+
if not url:
222+
continue
221223
streams.extend(HLSStream.parse_variant_playlist(self.session, url).items())
222224
break
223225

224226
dash = dash or {}
225227
for url in dash.values():
228+
if not url:
229+
continue
226230
p = urlparse(url)
227231
if p.path.endswith("dash.mpd"):
228232
# LIVE
@@ -240,12 +244,14 @@ def _get_streams(self):
240244
streams.extend(
241245
(quality, HTTPStream(self.session, url))
242246
for quality, url in progressive or []
247+
if url
243248
)
244249

245250
if text_tracks and self.session.get_option("mux-subtitles"):
246251
substreams = {
247252
lang: HTTPStream(self.session, urljoin("https://vimeo.com/", url))
248253
for lang, url in text_tracks
254+
if url
249255
}
250256
for quality, stream in streams:
251257
yield quality, MuxedStream(self.session, stream, subtitles=substreams)

0 commit comments

Comments
 (0)