Added trailers filtering: jellyfin-web can only play youtube trailers, not kinopoisk-hosted
This commit is contained in:
1 parent
d10b6d71f7
commit
b8b92cf60b
5 files changed
+18
-5
No files matched your search
@@ -197,13 +197,14 @@ namespace Jellyfin.Plugin.Kinopoisk
|
||||
}
|
||||
|
||||
public static MediaUrl ToMediaUrl(this VideoResponse_trailers src) {
|
||||
if (src is null)
|
||||
if (src is null || !"YOUTUBE".Equals(src.Site))
|
||||
return null;
|
||||
|
||||
return new MediaUrl
|
||||
{
|
||||
Name = src.Name,
|
||||
Url = src.Url
|
||||
.Replace("https://youtu.be/", "https://www.youtube.com/watch?v=") // Jellyfin web currently don't recognize youtu.be links
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user