更新: ダウンロードリンクの通常aタグ化および日本語・英語タイトル直下への配置移動
This commit is contained in:
1 parent
62738928fd
commit
2eb067ff8f
1 file changed
+63
-52
@@ -207,6 +207,21 @@ internal class ryuugames
|
|||||||
/// リンクキー (link_key) を取得または設定します。
|
/// リンクキー (link_key) を取得または設定します。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string LinkKey { get; set; } = string.Empty;
|
public string LinkKey { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 直接開くことが可能なダウンロード処理ページの URL を取得します。
|
||||||
|
/// </summary>
|
||||||
|
public string DownloadUrl
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(this.PostId) || string.IsNullOrWhiteSpace(this.LinkKey))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
return $"https://www.ryuugames.com/processing/?ryuu_sl_action=process&post_id={Uri.EscapeDataString(this.PostId)}&shortcode_id={Uri.EscapeDataString(this.ShortcodeId)}&link_key={Uri.EscapeDataString(this.LinkKey)}";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -257,10 +272,10 @@ internal class ryuugames
|
|||||||
|
|
||||||
LanguageType langType;
|
LanguageType langType;
|
||||||
|
|
||||||
// 最新フォーマット(ダウンロードセクション、英語タイトル、およびフォルダ名タイトル表示 v5)が含まれているキャッシュのみ再利用
|
// 最新フォーマット(ダウンロードセクション直下配置、aタグリンク、およびフォルダ名タイトル表示 v6)が含まれているキャッシュのみ再利用
|
||||||
bool isLatestFormat = prevEntry != null &&
|
bool isLatestFormat = prevEntry != null &&
|
||||||
prevEntry.SummaryHtml.Contains("ryuu-dl-section") &&
|
prevEntry.SummaryHtml.Contains("ryuu-dl-section") &&
|
||||||
prevEntry.SummaryHtml.Contains("ryuu-format-v5");
|
prevEntry.SummaryHtml.Contains("ryuu-format-v6");
|
||||||
|
|
||||||
if (prevEntry != null && !string.IsNullOrEmpty(prevEntry.SummaryHtml) && isLatestFormat)
|
if (prevEntry != null && !string.IsNullOrEmpty(prevEntry.SummaryHtml) && isLatestFormat)
|
||||||
{
|
{
|
||||||
@@ -996,7 +1011,7 @@ internal class ryuugames
|
|||||||
sb.Append("</div>");
|
sb.Append("</div>");
|
||||||
|
|
||||||
// 1.3. フォルダ名用タイトル (Folder Name) の明記(本文直下・テキストコピー用)
|
// 1.3. フォルダ名用タイトル (Folder Name) の明記(本文直下・テキストコピー用)
|
||||||
sb.Append("<div class=\"ryuu-folder-title ryuu-format-v5\" style=\"background-color: #f3f4f6; border-left: 4px solid #374151; padding: 10px 14px; margin-bottom: 12px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; border-radius: 0 4px 4px 0;\">");
|
sb.Append("<div class=\"ryuu-folder-title ryuu-format-v6\" style=\"background-color: #f3f4f6; border-left: 4px solid #374151; padding: 10px 14px; margin-bottom: 12px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; border-radius: 0 4px 4px 0;\">");
|
||||||
sb.Append("<div style=\"font-size: 11px; font-weight: bold; color: #4b5563; margin-bottom: 4px;\">📁 フォルダ名用タイトル (コピー用):</div>");
|
sb.Append("<div style=\"font-size: 11px; font-weight: bold; color: #4b5563; margin-bottom: 4px;\">📁 フォルダ名用タイトル (コピー用):</div>");
|
||||||
sb.Append($"<div style=\"font-size: 15px; font-weight: bold; color: #111827; user-select: all; -webkit-user-select: all;\">{WebUtility.HtmlEncode(folderTitle)}</div>");
|
sb.Append($"<div style=\"font-size: 15px; font-weight: bold; color: #111827; user-select: all; -webkit-user-select: all;\">{WebUtility.HtmlEncode(folderTitle)}</div>");
|
||||||
sb.Append("</div>");
|
sb.Append("</div>");
|
||||||
@@ -1023,6 +1038,50 @@ internal class ryuugames
|
|||||||
sb.Append("</div>");
|
sb.Append("</div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 1.6. ダウンロードセクション (ryuu-dl-section) - 日本語・英語タイトルの直下に配置
|
||||||
|
sb.Append("<div class=\"ryuu-dl-section\" style=\"background-color: #f7f9fa; border: 1px solid #cfd8dc; border-radius: 6px; padding: 14px; margin-top: 10px; margin-bottom: 14px;\">");
|
||||||
|
sb.Append("<h4 style=\"margin: 0 0 10px 0; font-size: 16px; border-bottom: 2px solid #e53935; padding-bottom: 6px; color: #c62828;\">");
|
||||||
|
sb.Append("📥 ダウンロード (LINK DOWNLOAD)");
|
||||||
|
if (!string.IsNullOrWhiteSpace(info.DownloadSize))
|
||||||
|
{
|
||||||
|
sb.Append($" <span style=\"font-size: 13px; color: #555; font-weight: normal;\">[{info.DownloadSize}]</span>");
|
||||||
|
}
|
||||||
|
sb.Append("</h4>");
|
||||||
|
|
||||||
|
// (A) RyuuCloud (Direct Link)
|
||||||
|
if (!string.IsNullOrWhiteSpace(info.DirectDownloadUrl))
|
||||||
|
{
|
||||||
|
sb.Append("<div style=\"margin-bottom: 12px;\">");
|
||||||
|
sb.Append("<div style=\"font-size: 12px; font-weight: bold; color: #2e7d32; margin-bottom: 6px;\">⚡ DIRECT LINK (RyuuCloud / VIP):</div>");
|
||||||
|
sb.Append($"<a href=\"{info.DirectDownloadUrl}\" target=\"_blank\" rel=\"noopener noreferrer\" referrerpolicy=\"no-referrer\" style=\"display: inline-block; background-color: #2e7d32; color: #ffffff; padding: 7px 16px; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,0.15);\">RyuuCloud Direct Download</a>");
|
||||||
|
sb.Append("</div>");
|
||||||
|
}
|
||||||
|
|
||||||
|
// (B) 各ストレージサーバーリンク (Mediafire, MegaNZ, PixelDrain, Buzzheavier等) - 通常の a タグとして出力
|
||||||
|
if (info.DownloadButtons.Any())
|
||||||
|
{
|
||||||
|
sb.Append("<div style=\"margin-bottom: 12px;\">");
|
||||||
|
sb.Append("<div style=\"font-size: 12px; font-weight: bold; color: #1565c0; margin-bottom: 6px;\">☁️ アップローダー・無料サーバー:</div>");
|
||||||
|
sb.Append("<div style=\"display: flex; flex-wrap: wrap; gap: 8px;\">");
|
||||||
|
|
||||||
|
foreach (var btn in info.DownloadButtons)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(btn.DownloadUrl))
|
||||||
|
{
|
||||||
|
sb.Append($"<a href=\"{btn.DownloadUrl}\" target=\"_blank\" rel=\"noopener noreferrer\" referrerpolicy=\"no-referrer\" style=\"display: inline-block; background-color: #1976d2; color: #ffffff; padding: 6px 14px; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,0.12);\">⬇️ {btn.ProviderName}</a>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sb.Append("</div>");
|
||||||
|
sb.Append("</div>");
|
||||||
|
}
|
||||||
|
|
||||||
|
// (C) 解凍パスワード
|
||||||
|
sb.Append("<div style=\"font-size: 13px; color: #424242; border-top: 1px dashed #b0bec5; padding-top: 8px; margin-top: 10px;\">");
|
||||||
|
sb.Append("🔑 <strong>解凍パスワード (Password):</strong> <code style=\"background-color: #eceff1; padding: 2px 6px; border-radius: 3px; font-weight: bold;\">ryuugames.com or ryuublogger.com</code>");
|
||||||
|
sb.Append("</div>");
|
||||||
|
|
||||||
|
sb.Append("</div>");
|
||||||
|
|
||||||
// 2. メインカバー画像
|
// 2. メインカバー画像
|
||||||
if (!string.IsNullOrWhiteSpace(info.MainImageUrl))
|
if (!string.IsNullOrWhiteSpace(info.MainImageUrl))
|
||||||
{
|
{
|
||||||
@@ -1088,55 +1147,7 @@ internal class ryuugames
|
|||||||
sb.Append("</div>");
|
sb.Append("</div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6. ダウンロードセクション (ryuu-dl-section)
|
// 6. 記事リンク
|
||||||
sb.Append("<div class=\"ryuu-dl-section\" style=\"background-color: #f7f9fa; border: 1px solid #cfd8dc; border-radius: 6px; padding: 14px; margin-top: 16px; margin-bottom: 14px;\">");
|
|
||||||
sb.Append("<h4 style=\"margin: 0 0 10px 0; font-size: 16px; border-bottom: 2px solid #e53935; padding-bottom: 6px; color: #c62828;\">");
|
|
||||||
sb.Append("📥 ダウンロード (LINK DOWNLOAD)");
|
|
||||||
if (!string.IsNullOrWhiteSpace(info.DownloadSize))
|
|
||||||
{
|
|
||||||
sb.Append($" <span style=\"font-size: 13px; color: #555; font-weight: normal;\">[{info.DownloadSize}]</span>");
|
|
||||||
}
|
|
||||||
sb.Append("</h4>");
|
|
||||||
|
|
||||||
// (A) RyuuCloud (Direct Link)
|
|
||||||
if (!string.IsNullOrWhiteSpace(info.DirectDownloadUrl))
|
|
||||||
{
|
|
||||||
sb.Append("<div style=\"margin-bottom: 12px;\">");
|
|
||||||
sb.Append("<div style=\"font-size: 12px; font-weight: bold; color: #2e7d32; margin-bottom: 4px;\">⚡ DIRECT LINK (RyuuCloud / VIP):</div>");
|
|
||||||
sb.Append($"<a href=\"{info.DirectDownloadUrl}\" target=\"_blank\" rel=\"noopener noreferrer\" referrerpolicy=\"no-referrer\" style=\"display: inline-block; background-color: #2e7d32; color: #ffffff; padding: 7px 14px; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 13px;\">RyuuCloud Direct Download</a>");
|
|
||||||
sb.Append("</div>");
|
|
||||||
}
|
|
||||||
|
|
||||||
// (B) 各ストレージサーバーボタン (Mediafire, MegaNZ, PixelDrain, Buzzheavier等)
|
|
||||||
if (info.DownloadButtons.Any())
|
|
||||||
{
|
|
||||||
sb.Append("<div style=\"margin-bottom: 12px;\">");
|
|
||||||
sb.Append("<div style=\"font-size: 12px; font-weight: bold; color: #1565c0; margin-bottom: 6px;\">☁️ アップローダー・無料サーバー:</div>");
|
|
||||||
sb.Append("<div style=\"display: flex; flex-wrap: wrap; gap: 8px;\">");
|
|
||||||
|
|
||||||
foreach (var btn in info.DownloadButtons)
|
|
||||||
{
|
|
||||||
// Safelink POSTフォームを生成して、ボタンクリックで即座に対象アップローダーへリダイレクト
|
|
||||||
sb.Append("<form method=\"POST\" action=\"https://www.ryuugames.com/processing/\" target=\"_blank\" style=\"display: inline; margin: 0;\">");
|
|
||||||
sb.Append("<input type=\"hidden\" name=\"ryuu_sl_action\" value=\"process\" />");
|
|
||||||
sb.Append($"<input type=\"hidden\" name=\"post_id\" value=\"{btn.PostId}\" />");
|
|
||||||
sb.Append($"<input type=\"hidden\" name=\"shortcode_id\" value=\"{btn.ShortcodeId}\" />");
|
|
||||||
sb.Append($"<input type=\"hidden\" name=\"link_key\" value=\"{btn.LinkKey}\" />");
|
|
||||||
sb.Append($"<button type=\"submit\" style=\"cursor: pointer; background-color: #1976d2; color: #ffffff; border: none; padding: 6px 12px; border-radius: 4px; font-weight: bold; font-size: 13px;\">⬇️ {btn.ProviderName}</button>");
|
|
||||||
sb.Append("</form>");
|
|
||||||
}
|
|
||||||
sb.Append("</div>");
|
|
||||||
sb.Append("</div>");
|
|
||||||
}
|
|
||||||
|
|
||||||
// (C) 解凍パスワード
|
|
||||||
sb.Append("<div style=\"font-size: 13px; color: #424242; border-top: 1px dashed #b0bec5; padding-top: 8px; margin-top: 10px;\">");
|
|
||||||
sb.Append("🔑 <strong>解凍パスワード (Password):</strong> <code style=\"background-color: #eceff1; padding: 2px 6px; border-radius: 3px; font-weight: bold;\">ryuugames.com or ryuublogger.com</code>");
|
|
||||||
sb.Append("</div>");
|
|
||||||
|
|
||||||
sb.Append("</div>");
|
|
||||||
|
|
||||||
// 7. 記事リンク
|
|
||||||
sb.Append("<div style=\"margin-top: 12px;\">");
|
sb.Append("<div style=\"margin-top: 12px;\">");
|
||||||
sb.Append($"<a href=\"{articleUrl}\" target=\"_blank\" rel=\"noopener noreferrer\" referrerpolicy=\"no-referrer\" style=\"display: inline-block; background-color: #0288d1; color: #ffffff; padding: 7px 16px; border-radius: 4px; text-decoration: none; font-weight: bold;\">🔗 Ryuugames 記事ページを開く</a>");
|
sb.Append($"<a href=\"{articleUrl}\" target=\"_blank\" rel=\"noopener noreferrer\" referrerpolicy=\"no-referrer\" style=\"display: inline-block; background-color: #0288d1; color: #ffffff; padding: 7px 16px; border-radius: 4px; text-decoration: none; font-weight: bold;\">🔗 Ryuugames 記事ページを開く</a>");
|
||||||
sb.Append("</div>");
|
sb.Append("</div>");
|
||||||
|
|||||||
Reference in new issue
Block a user