mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 17:32:20 +00:00
Implementation of accsArgs for AnimeON, CikavaIdeya, and Unimay modules
Fixed an issue with authorization via accessdb for AnimeON, CikavaIdeya, and Unimay modules. Added wrapping of links via accsArgs to ensure correct transmission of authorization parameters.
This commit is contained in:
parent
84a3466e5e
commit
0ef0908303
@ -92,12 +92,12 @@ namespace AnimeON.Controllers
|
||||
{
|
||||
streamLink = $"{host}/animeon/play?url={HttpUtility.UrlEncode(streamLink)}";
|
||||
streamquality.Append(streamLink, "hls");
|
||||
movie_tpl.Append(string.IsNullOrEmpty(ep.Name) ? $"Серія {ep.EpisodeNum}" : ep.Name, streamLink, streamquality: streamquality);
|
||||
movie_tpl.Append(string.IsNullOrEmpty(ep.Name) ? $"Серія {ep.EpisodeNum}" : ep.Name, accsArgs(streamLink), streamquality: streamquality);
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(streamLink))
|
||||
{
|
||||
streamquality.Append(HostStreamProxy(init, streamLink), "hls");
|
||||
movie_tpl.Append(string.IsNullOrEmpty(ep.Name) ? $"Серія {ep.EpisodeNum}" : ep.Name, streamquality.Firts().link, streamquality: streamquality);
|
||||
streamquality.Append(HostStreamProxy(init, accsArgs(streamLink)), "hls");
|
||||
movie_tpl.Append(string.IsNullOrEmpty(ep.Name) ? $"Серія {ep.EpisodeNum}" : ep.Name, accsArgs(streamquality.Firts().link), streamquality: streamquality);
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,12 +133,12 @@ namespace AnimeON.Controllers
|
||||
{
|
||||
streamLink = $"{host}/animeon/play?url={HttpUtility.UrlEncode(streamLink)}";
|
||||
streamquality.Append(streamLink, "hls");
|
||||
tpl.Append(translationName, streamLink, streamquality: streamquality);
|
||||
tpl.Append(translationName, accsArgs(streamLink), streamquality: streamquality);
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(streamLink))
|
||||
{
|
||||
streamquality.Append(HostStreamProxy(init, streamLink), "hls");
|
||||
tpl.Append(translationName, streamquality.Firts().link, streamquality: streamquality);
|
||||
streamquality.Append(HostStreamProxy(init, accsArgs(streamLink)), "hls");
|
||||
tpl.Append(translationName, accsArgs(streamquality.Firts().link), streamquality: streamquality);
|
||||
}
|
||||
}
|
||||
return rjson ? Content(tpl.ToJson(), "application/json; charset=utf-8") : Content(tpl.ToHtml(), "text/html; charset=utf-8");
|
||||
@ -239,7 +239,7 @@ namespace AnimeON.Controllers
|
||||
if (string.IsNullOrEmpty(streamLink))
|
||||
return Content("Не вдалося отримати посилання на відео", "text/html; charset=utf-8");
|
||||
|
||||
return Redirect(HostStreamProxy(init, streamLink));
|
||||
return Redirect(HostStreamProxy(init, accsArgs(streamLink)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ namespace CikavaIdeya.Controllers
|
||||
}
|
||||
|
||||
if (playResult.streams != null && playResult.streams.Count > 0)
|
||||
return Redirect(HostStreamProxy(init, playResult.streams.First().link));
|
||||
return Redirect(HostStreamProxy(init, accsArgs(playResult.streams.First().link)));
|
||||
|
||||
return Content("CikavaIdeya", "text/html; charset=utf-8");
|
||||
}
|
||||
@ -89,7 +89,7 @@ namespace CikavaIdeya.Controllers
|
||||
foreach(var ep in episodes)
|
||||
{
|
||||
string link = $"{host}/cikavaideya?imdb_id={imdb_id}&kinopoisk_id={kinopoisk_id}&title={HttpUtility.UrlEncode(title)}&original_title={HttpUtility.UrlEncode(original_title)}&year={year}&serial=1&s={s}&e={ep.episode}&play=true";
|
||||
movie_tpl.Append(ep.title, link);
|
||||
movie_tpl.Append(ep.title, accsArgs(link), method: "play");
|
||||
}
|
||||
return rjson ? Content(movie_tpl.ToJson(), "application/json; charset=utf-8") : Content(movie_tpl.ToHtml(), "text/html; charset=utf-8");
|
||||
}
|
||||
@ -97,7 +97,7 @@ namespace CikavaIdeya.Controllers
|
||||
{
|
||||
string link = $"{host}/cikavaideya?imdb_id={imdb_id}&kinopoisk_id={kinopoisk_id}&title={HttpUtility.UrlEncode(title)}&original_title={HttpUtility.UrlEncode(original_title)}&year={year}&play=true";
|
||||
var tpl = new MovieTpl(title, original_title, 1);
|
||||
tpl.Append(title, link);
|
||||
tpl.Append(title, accsArgs(link), method: "play");
|
||||
return rjson ? Content(tpl.ToJson(), "application/json; charset=utf-8") : Content(tpl.ToHtml(), "text/html; charset=utf-8");
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ namespace Uaflix.Controllers
|
||||
}
|
||||
|
||||
if (playResult.streams != null && playResult.streams.Count > 0)
|
||||
return Redirect(HostStreamProxy(init, playResult.streams.First().link));
|
||||
return Redirect(HostStreamProxy(init, accsArgs(playResult.streams.First().link)));
|
||||
|
||||
return Content("Uaflix", "text/html; charset=utf-8");
|
||||
}
|
||||
@ -83,7 +83,7 @@ namespace Uaflix.Controllers
|
||||
foreach(var ep in episodes)
|
||||
{
|
||||
string link = $"{host}/uaflix?imdb_id={imdb_id}&kinopoisk_id={kinopoisk_id}&title={HttpUtility.UrlEncode(title)}&original_title={HttpUtility.UrlEncode(original_title)}&year={year}&serial=1&s={s}&e={ep.episode}&play=true";
|
||||
movie_tpl.Append(ep.title, link);
|
||||
movie_tpl.Append(ep.title, accsArgs(link), method: "play");
|
||||
}
|
||||
return rjson ? Content(movie_tpl.ToJson(), "application/json; charset=utf-8") : Content(movie_tpl.ToHtml(), "text/html; charset=utf-8");
|
||||
}
|
||||
@ -91,7 +91,7 @@ namespace Uaflix.Controllers
|
||||
{
|
||||
string link = $"{host}/uaflix?imdb_id={imdb_id}&kinopoisk_id={kinopoisk_id}&title={HttpUtility.UrlEncode(title)}&original_title={HttpUtility.UrlEncode(original_title)}&year={year}&play=true";
|
||||
var tpl = new MovieTpl(title, original_title, 1);
|
||||
tpl.Append(title, link);
|
||||
tpl.Append(title, accsArgs(link), method: "play");
|
||||
return rjson ? Content(tpl.ToJson(), "application/json; charset=utf-8") : Content(tpl.ToHtml(), "text/html; charset=utf-8");
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,14 +102,14 @@ namespace Unimay.Controllers
|
||||
if (string.IsNullOrEmpty(masterUrl))
|
||||
return OnError("no stream");
|
||||
|
||||
return Redirect(HostStreamProxy(init, masterUrl, proxy: proxyManager.Get()));
|
||||
return Redirect(HostStreamProxy(init, accsArgs(masterUrl), proxy: proxyManager.Get()));
|
||||
}
|
||||
|
||||
if (itemType == "Фільм")
|
||||
{
|
||||
var (movieTitle, movieLink) = invoke.GetMovieResult(host, releaseDetail, title, original_title);
|
||||
var mtpl = new MovieTpl(title, original_title, 1);
|
||||
mtpl.Append(movieTitle, movieLink);
|
||||
mtpl.Append(movieTitle, accsArgs(movieLink), method: "play");
|
||||
return ContentTo(rjson ? mtpl.ToJson() : mtpl.ToHtml());
|
||||
}
|
||||
else if (itemType == "Телесеріал")
|
||||
@ -129,7 +129,7 @@ namespace Unimay.Controllers
|
||||
var mtpl = new MovieTpl(title, original_title, episodes.Count);
|
||||
foreach (var (epTitle, epLink) in episodes)
|
||||
{
|
||||
mtpl.Append(epTitle, epLink);
|
||||
mtpl.Append(epTitle, accsArgs(epLink), method: "play");
|
||||
}
|
||||
return ContentTo(rjson ? mtpl.ToJson() : mtpl.ToHtml());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user