diff --git a/lib/svtplay_dl/__init__.py b/lib/svtplay_dl/__init__.py index a5f87c7..7f09d5a 100644 --- a/lib/svtplay_dl/__init__.py +++ b/lib/svtplay_dl/__init__.py @@ -225,11 +225,12 @@ def get_one_media(stream, options): return if options.subtitle and options.get_url: - if options.get_all_subtitles: - for sub in subs: - print(sub.url) - else: - print(subs[0].url) + if subs: + if options.get_all_subtitles: + for sub in subs: + print(sub.url) + else: + print(subs[0].url) if options.force_subtitle: return