mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 17:32:20 +00:00
feat(makhno): add special handling for ashdi.vip URLs
When episode URLs contain 'ashdi.vip', use HostStreamProxy to generate the play URL instead of the standard accsArgs call URL method. This provides better compatibility with this specific streaming provider.
This commit is contained in:
parent
3436520e4a
commit
b91e7b0eac
@ -90,6 +90,19 @@ namespace UAKino.Controllers
|
|||||||
int episodeNumber = UAKinoInvoke.TryParseEpisodeNumber(ep.Title) ?? index;
|
int episodeNumber = UAKinoInvoke.TryParseEpisodeNumber(ep.Title) ?? index;
|
||||||
string episodeName = string.IsNullOrEmpty(ep.Title) ? $"Епізод {episodeNumber}" : ep.Title;
|
string episodeName = string.IsNullOrEmpty(ep.Title) ? $"Епізод {episodeNumber}" : ep.Title;
|
||||||
string callUrl = $"{host}/uakino/play?url={HttpUtility.UrlEncode(ep.Url)}&title={HttpUtility.UrlEncode(title ?? original_title)}";
|
string callUrl = $"{host}/uakino/play?url={HttpUtility.UrlEncode(ep.Url)}&title={HttpUtility.UrlEncode(title ?? original_title)}";
|
||||||
|
if (!string.IsNullOrEmpty(ep.Url) && ep.Url.Contains("ashdi.vip", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
string playUrl = HostStreamProxy(init, accsArgs(ep.Url));
|
||||||
|
episode_tpl.Append(
|
||||||
|
episodeName,
|
||||||
|
title ?? original_title,
|
||||||
|
"1",
|
||||||
|
episodeNumber.ToString("D2"),
|
||||||
|
playUrl
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
episode_tpl.Append(
|
episode_tpl.Append(
|
||||||
episodeName,
|
episodeName,
|
||||||
title ?? original_title,
|
title ?? original_title,
|
||||||
@ -99,6 +112,7 @@ namespace UAKino.Controllers
|
|||||||
"call",
|
"call",
|
||||||
streamlink: accsArgs($"{callUrl}&play=true")
|
streamlink: accsArgs($"{callUrl}&play=true")
|
||||||
);
|
);
|
||||||
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user