feat: Senzuri/TXXX/HClips/Upornia/YouJizzのインライン公式embed埋め込みプレイヤー対応およびURL自動判定
This commit is contained in:
1 parent
3a57902569
commit
4211d6f907
2 files changed
+50
-4
No files matched your search
@@ -1823,6 +1823,7 @@ public static class HtmlRenderer
|
|||||||
accentPrimary = "#f10048";
|
accentPrimary = "#f10048";
|
||||||
glowColor = "rgba(241, 0, 72, 0.3)";
|
glowColor = "rgba(241, 0, 72, 0.3)";
|
||||||
defaultOrigUrl = $"https://upornia.com/videos/{safeId}/";
|
defaultOrigUrl = $"https://upornia.com/videos/{safeId}/";
|
||||||
|
playerUrl ??= $"https://upornia.com/embed/{safeId}/";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "xvideos":
|
case "xvideos":
|
||||||
@@ -1832,6 +1833,17 @@ public static class HtmlRenderer
|
|||||||
accentPrimary = "#dc2626";
|
accentPrimary = "#dc2626";
|
||||||
glowColor = "rgba(220, 38, 38, 0.3)";
|
glowColor = "rgba(220, 38, 38, 0.3)";
|
||||||
defaultOrigUrl = $"https://www.xvideos.com/video.{safeId}/";
|
defaultOrigUrl = $"https://www.xvideos.com/video.{safeId}/";
|
||||||
|
playerUrl ??= $"https://www.xvideos.com/embedframe/{safeId}";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "youjizz":
|
||||||
|
siteDisplayName = "YouJizz";
|
||||||
|
badgeText = "YOUJIZZ VIDEO";
|
||||||
|
accentGradient = "linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%)";
|
||||||
|
accentPrimary = "#0ea5e9";
|
||||||
|
glowColor = "rgba(14, 165, 233, 0.3)";
|
||||||
|
defaultOrigUrl = $"https://www.youjizz.com/videos/{safeId}.html";
|
||||||
|
playerUrl ??= $"https://www.youjizz.com/embed/{safeId}";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "eroterest":
|
case "eroterest":
|
||||||
@@ -1882,19 +1894,23 @@ public static class HtmlRenderer
|
|||||||
accentPrimary = "#8b5cf6";
|
accentPrimary = "#8b5cf6";
|
||||||
glowColor = "rgba(139, 92, 246, 0.3)";
|
glowColor = "rgba(139, 92, 246, 0.3)";
|
||||||
defaultOrigUrl = originalUrl ?? $"https://senzuri.tube/videos/{safeId}/";
|
defaultOrigUrl = originalUrl ?? $"https://senzuri.tube/videos/{safeId}/";
|
||||||
|
playerUrl ??= $"https://senzuri.tube/embed/{safeId}/";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "txxx":
|
case "txxx":
|
||||||
case "txxx.com":
|
case "txxx.com":
|
||||||
case "hclips":
|
case "hclips":
|
||||||
case "hclips.com":
|
case "hclips.com":
|
||||||
siteDisplayName = "TXXX";
|
case "hdzog":
|
||||||
badgeText = "TXXX VIDEO";
|
case "hdzog.com":
|
||||||
|
bool isHclips = normalizedSite.Contains("hclips") || (originalUrl != null && originalUrl.Contains("hclips.com", StringComparison.OrdinalIgnoreCase));
|
||||||
|
siteDisplayName = isHclips ? "HClips" : "TXXX";
|
||||||
|
badgeText = isHclips ? "HCLIPS VIDEO" : "TXXX VIDEO";
|
||||||
accentGradient = "linear-gradient(135deg, #ef4444 0%, #f97316 100%)";
|
accentGradient = "linear-gradient(135deg, #ef4444 0%, #f97316 100%)";
|
||||||
accentPrimary = "#ef4444";
|
accentPrimary = "#ef4444";
|
||||||
glowColor = "rgba(239, 68, 68, 0.3)";
|
glowColor = "rgba(239, 68, 68, 0.3)";
|
||||||
defaultOrigUrl = originalUrl ?? $"https://www.txxx.com/videos/{safeId}/";
|
defaultOrigUrl = originalUrl ?? (isHclips ? $"https://www.hclips.com/videos/{safeId}/" : $"https://www.txxx.com/videos/{safeId}/");
|
||||||
playerUrl ??= $"https://www.txxx.com/embed/{safeId}/";
|
playerUrl ??= isHclips ? $"https://www.hclips.com/embed/{safeId}/" : $"https://www.txxx.com/embed/{safeId}/";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "fc2":
|
case "fc2":
|
||||||
|
|||||||
@@ -152,6 +152,36 @@ app.MapGet("/video", (string? url, string? id, string? site, string? play, strin
|
|||||||
return Results.Content(HtmlRenderer.RenderVideoPlayer("doga", vId, play, stream, orig, title ?? $"エロタレドーガ ({vId})"), "text/html; charset=utf-8");
|
return Results.Content(HtmlRenderer.RenderVideoPlayer("doga", vId, play, stream, orig, title ?? $"エロタレドーガ ({vId})"), "text/html; charset=utf-8");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// target が URL で site 未指定の場合のドメイン自動判定
|
||||||
|
if (string.IsNullOrWhiteSpace(site) && target != null)
|
||||||
|
{
|
||||||
|
if (target.Contains("senzuri.tube", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
site = "senzuri";
|
||||||
|
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||||
|
}
|
||||||
|
else if (target.Contains("txxx.com", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
site = "txxx";
|
||||||
|
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||||
|
}
|
||||||
|
else if (target.Contains("hclips.com", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
site = "hclips";
|
||||||
|
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||||
|
}
|
||||||
|
else if (target.Contains("upornia.com", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
site = "upornia";
|
||||||
|
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||||
|
}
|
||||||
|
else if (target.Contains("youjizz.com", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
site = "youjizz";
|
||||||
|
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// stream (HLS m3u8 / MP4 等) または play (iframe player) が渡されている場合、または site が指定されている場合
|
// stream (HLS m3u8 / MP4 等) または play (iframe player) が渡されている場合、または site が指定されている場合
|
||||||
if (!string.IsNullOrWhiteSpace(stream) || !string.IsNullOrWhiteSpace(play) || !string.IsNullOrWhiteSpace(site))
|
if (!string.IsNullOrWhiteSpace(stream) || !string.IsNullOrWhiteSpace(play) || !string.IsNullOrWhiteSpace(site))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user