Skip to content

一分钟搭建影视站,支持Docker等部署方式

Merge branch 'main' of https://github.com/WLongSAMA/LibreTV into pr

WLong84b493f0e845
diff --cc js/app.js
index 5c97d9d,5db054a..c12776b
--- a/js/app.js
+++ b/js/app.js
@@@ -853,18 -853,25 +853,17 @@@ async function showDetails(id, vod_name
episodesReversed = false; // 默认正序
modalContent.innerHTML = `
<div class="flex justify-end mb-2">
- <button onclick="copyLinks()" class="px-4 py-1 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center space-x-1 mr-2">
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
- </svg>
- <span>复制视频链接</span>
- </button>
- <button onclick="toggleEpisodeOrder('${sourceCode}')" class="ml-2 px-4 py-1 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 text-white text-xs font-semibold rounded-lg transition-all duration-300 transform items-center justify-center flex">
- <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
+ <button onclick="toggleEpisodeOrder('${sourceCode}')" class="px-4 py-1 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center space-x-1">
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v3.586L7.707 9.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 10.586V7z" clip-rule="evenodd" />
</svg>
<span>倒序排列</span>
</button>
- <button onclick="copyLinks()" title="批量复制视频链接" class="ml-2 px-2 py-1 bg-[#333] hover:bg-[#444] text-white rounded-full transition">
- <svg viewBox="0 0 32 32" id="copyIcon" class="w-5 h-5" fill="#ffffff" xmlns="http://www.w3.org/2000/svg">
- <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
- <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
- <g id="SVGRepo_iconCarrier">
- <defs> <style> .cls-1 { fill: none; } </style> </defs>
- <path d="M11.9474,19a4.9476,4.9476,0,0,1-3.4991-8.4465l5.1053-5.1043a4.9482,4.9482,0,0,1,6.9981,6.9976l-.5523.5526-1.4158-1.4129.5577-.5579a2.95,2.95,0,0,0-.0039-4.1653,3.02,3.02,0,0,0-4.17,0l-5.1047,5.104a2.9474,2.9474,0,0,0,0,4.1692,3.02,3.02,0,0,0,4.17,0l1.4143,1.4145A4.9176,4.9176,0,0,1,11.9474,19Z"></path>
- <path d="M19.9474,17a4.9476,4.9476,0,0,1-3.4991-8.4465l.5526-.5526,1.4143,1.4146-.5526.5523a2.9476,2.9476,0,0,0,0,4.1689,3.02,3.02,0,0,0,4.17,0c.26-.26,4.7293-4.7293,5.1053-5.1045a2.951,2.951,0,0,0,0-4.1687,3.02,3.02,0,0,0-4.17,0L21.5536,3.449a4.9483,4.9483,0,0,1,6.9981,6.9978c-.3765.376-4.844,4.8428-5.1038,5.1035A4.9193,4.9193,0,0,1,19.9474,17Z"></path>
- <path d="M24,30H4a2.0021,2.0021,0,0,1-2-2V8A2.0021,2.0021,0,0,1,4,6H8V8H4V28H24V18h2V28A2.0021,2.0021,0,0,1,24,30Z"></path>
- <rect id="_Transparent_Rectangle_" data-name="<Transparent Rectangle>" class="cls-1" width="32" height="32"></rect>
- </g>
++ <button title="批量复制播放链接" onclick="copyLinks()" class="ml-2 px-2 py-1 bg-[#222] hover:bg-[#333] border border-[#333] text-white rounded-lg transition">
++ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
++ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
+ </svg>
+ </button>
</div>
<div id="episodesGrid" class="grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-2">
${renderEpisodes(vod_name, sourceCode)}
@@@ -987,7 -994,7 +986,7 @@@ function copyLinks()
const episodes = episodesReversed ? [...currentEpisodes].reverse() : currentEpisodes;
const linkList = episodes.join('\r\n');
navigator.clipboard.writeText(linkList).then(() => {
-- showToast('视频链接列表已复制到剪贴板', 'success');
++ showToast('播放链接已复制', 'success');
}).catch(err => {
showToast('复制失败,请检查浏览器权限', 'error');
});
diff --cc player.html
index d903f28,ede13f1..013addc
--- a/player.html
+++ b/player.html
@@@ -255,44 -238,38 +256,43 @@@
<!-- 添加自动播放开关和排序按钮 -->
<div class="player-container">
- <div class="mb-2 flex justify-end items-center gap-2">
- <span class="text-gray-400 text-sm">自动连播</span>
- <label class="switch">
- <input type="checkbox" id="autoplayToggle">
- <span class="slider"></span>
- </label>
- <button onclick="toggleEpisodeOrder()" class="px-4 py-1 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 text-white text-xs font-semibold rounded-lg transition-all duration-300 transform items-center justify-center flex">
- <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" id="orderIcon" viewBox="0 0 20 20" fill="currentColor">
- <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v3.586L7.707 9.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 10.586V7z" clip-rule="evenodd" />
- </svg>
- <span id="orderText">倒序排列</span>
- </button>
- <button onclick="copyLinks()" title="复制视频链接" class="px-2 py-1 bg-[#333] hover:bg-[#444] text-white rounded-full transition">
- <svg viewBox="0 0 32 32" id="copyIcon" class="w-5 h-5" fill="#ffffff" xmlns="http://www.w3.org/2000/svg">
- <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
- <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
- <g id="SVGRepo_iconCarrier">
- <defs> <style> .cls-1 { fill: none; } </style> </defs>
- <path d="M11.9474,19a4.9476,4.9476,0,0,1-3.4991-8.4465l5.1053-5.1043a4.9482,4.9482,0,0,1,6.9981,6.9976l-.5523.5526-1.4158-1.4129.5577-.5579a2.95,2.95,0,0,0-.0039-4.1653,3.02,3.02,0,0,0-4.17,0l-5.1047,5.104a2.9474,2.9474,0,0,0,0,4.1692,3.02,3.02,0,0,0,4.17,0l1.4143,1.4145A4.9176,4.9176,0,0,1,11.9474,19Z"></path>
- <path d="M19.9474,17a4.9476,4.9476,0,0,1-3.4991-8.4465l.5526-.5526,1.4143,1.4146-.5526.5523a2.9476,2.9476,0,0,0,0,4.1689,3.02,3.02,0,0,0,4.17,0c.26-.26,4.7293-4.7293,5.1053-5.1045a2.951,2.951,0,0,0,0-4.1687,3.02,3.02,0,0,0-4.17,0L21.5536,3.449a4.9483,4.9483,0,0,1,6.9981,6.9978c-.3765.376-4.844,4.8428-5.1038,5.1035A4.9193,4.9193,0,0,1,19.9474,17Z"></path>
- <path d="M24,30H4a2.0021,2.0021,0,0,1-2-2V8A2.0021,2.0021,0,0,1,4,6H8V8H4V28H24V18h2V28A2.0021,2.0021,0,0,1,24,30Z"></path>
- <rect id="_Transparent_Rectangle_" data-name="<Transparent Rectangle>" class="cls-1" width="32" height="32"></rect>
- </g>
- </svg>
- </button>
- <button id="lockToggle" onclick="toggleControlsLock()" title="锁定控制" class="px-2 py-1 bg-[#333] hover:bg-[#444] text-white rounded-full transition">
- <svg id="lockIcon" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
- <!-- 默认状态:未锁图标 -->
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
- d="M15 11V7a3 3 0 00-6 0v4m-3 4h12v6H6v-6z" />
- </svg>
- </button>
+ <div class="flex flex-wrap justify-end items-center gap-2">
+ <!-- 自动连播开关 - 分组到左边 -->
+ <div class="flex items-center gap-1 flex-shrink-0 mr-auto">
+ <span class="text-gray-400 text-sm whitespace-nowrap">自动连播</span>
+ <label class="switch">
+ <input type="checkbox" id="autoplayToggle">
+ <span class="slider"></span>
+ </label>
+ </div>
+
+ <!-- 把各种功能按钮放在右侧 - 在小屏幕上各自占一行 -->
+ <div class="flex flex-wrap justify-end gap-2">
- <!-- 复制链接按钮 -->
- <button onclick="copyLinks()" class="px-3 py-1 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center space-x-1 flex-shrink-0">
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
- </svg>
- <span>复制链接</span>
- </button>
-
+ <!-- 倒序排列按钮 -->
+ <button onclick="toggleEpisodeOrder()" class="px-3 py-1 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center space-x-1 flex-shrink-0">
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" id="orderIcon" viewBox="0 0 20 20" fill="currentColor">
+ <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v3.586L7.707 9.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 10.586V7z" clip-rule="evenodd" />
+ </svg>
+ <span id="orderText">倒序排列</span>
+ </button>
+
++ <!-- 复制链接按钮 -->
++ <button title="复制播放链接" onclick="copyLinks()" class="px-2 py-1 bg-[#222] hover:bg-[#333] border border-[#333] text-white rounded-lg transition">
++ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
++ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
++ </svg>
++ </button>
++
+ <!-- 锁定控制按钮 - 始终显示在最右侧 -->
+ <button id="lockToggle" onclick="toggleControlsLock()" title="锁定控制"
- class="px-2 py-1 bg-[#333] hover:bg-[#444] text-white rounded-full transition flex-shrink-0">
++ class="px-2 py-1 bg-[#222] hover:bg-[#333] border border-[#333] text-white rounded-lg transition flex-shrink-0">
+ <svg id="lockIcon" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
+ <!-- 默认状态:未锁图标 -->
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
+ d="M15 11V7a3 3 0 00-6 0v4m-3 4h12v6H6v-6z" />
+ </svg>
+ </button>
+ </div>
</div>
</div>
@@@ -1136,7 -1113,7 +1136,7 @@@
const urlParams = new URLSearchParams(window.location.search);
const linkUrl = urlParams.get('url') || '';
navigator.clipboard.writeText(linkUrl).then(() => {
-- showToast('视频链接已复制到剪贴板', 'success');
++ showToast('播放链接已复制', 'success');
}).catch(err => {
showToast('复制失败,请检查浏览器权限', 'error');
});