Skip to content

Commit

Permalink
fix fixUrl :)
Browse files Browse the repository at this point in the history
  • Loading branch information
lekma committed Sep 27, 2024
1 parent a8c8e77 commit d07c607
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.invidious"
name="Invidious"
version="3.2.1"
version="3.2.2"
provider-name="lekma">

<requires>
Expand Down
25 changes: 13 additions & 12 deletions lib/invidious/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,19 +207,20 @@ def __playlist__(self, playlistId, **kwargs):
# video --------------------------------------------------------------------

def __fixUrl__(self, video):
split = urlsplit(video["url"])
query = split.query.split("&") if split.query else []
if video["manifestType"] == "mpd" and self.__proxy__:
query.append("local=true")
video["url"] = urlunsplit(
(
split.scheme or self.__scheme__,
split.netloc or self.__netloc__,
split.path,
"&".join(query),
split.fragment
if video and (url := video.get("url")):
split = urlsplit(url)
query = split.query.split("&") if split.query else []
if video["manifestType"] == "mpd" and self.__proxy__:
query.append("local=true")
video["url"] = urlunsplit(
(
split.scheme or self.__scheme__,
split.netloc or self.__netloc__,
split.path,
"&".join(query),
split.fragment
)
)
)
return video

@public
Expand Down

0 comments on commit d07c607

Please sign in to comment.