1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 13:44:14 +01:00

pluto.tv: remove support for subtitles

This commit is contained in:
Johan Andersson 2024-04-05 23:01:51 +02:00
parent 9b768832d4
commit c587004ecd

View File

@ -8,6 +8,7 @@ from svtplay_dl.error import ServiceError
from svtplay_dl.fetcher.hls import hlsparse
from svtplay_dl.service import OpenGraphThumbMixin
from svtplay_dl.service import Service
from svtplay_dl.subtitle import subtitle
class Plutotv(Service, OpenGraphThumbMixin):
@ -55,7 +56,7 @@ class Plutotv(Service, OpenGraphThumbMixin):
yield ServiceError("Can't find video info")
return
yield from hlsparse(
playlists = hlsparse(
self.config,
self.http.request("get", HLSplaylist, headers={"Authorization": f"Bearer {self.sessionToken}"}),
HLSplaylist,
@ -63,6 +64,12 @@ class Plutotv(Service, OpenGraphThumbMixin):
filter=True,
)
for playlist in playlists:
if self.config.get("subtitle") and isinstance(playlist, subtitle):
logging.warning("Subtitles are no longer supported for pluto.tv")
continue
yield playlist
def find_all_episodes(self, options):
episodes = []
self.data = self.get_urldata()