Skip to content

Commit

Permalink
1.0.2 国际CDN上线试运行
Browse files Browse the repository at this point in the history
  • Loading branch information
qinlili23333 committed May 24, 2022
1 parent ef9c5e0 commit 4a2012e
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 70 deletions.
139 changes: 92 additions & 47 deletions audioInfo.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,7 @@ <H3>去全部歌单里添加一些吧</H3>
}
</script>
<script>
//日后实现CDN切换
const cdn = "yuketang";
const cdn = localStorage.preferCDN ? localStorage.preferCDN : "yuketang";
window.repeatSwitch = localStorage.repeat ? JSON.parse(localStorage.repeat) : false;
window.shuffleSwitch = localStorage.shuffle ? JSON.parse(localStorage.shuffle) : false;
window.codecBoost = localStorage.codecBoost ? JSON.parse(localStorage.codecBoost) : false;
Expand Down
6 changes: 0 additions & 6 deletions public.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
user-select: none;
}

html,
body {
width: 100%;
height: 100%;
}

.mdc-card {
margin: 20px;
}
Expand Down
2 changes: 1 addition & 1 deletion settingFrame/cache.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <H4 style="padding:16px;">请选择你需要清理的部分</H4>
});
};
//https://stackoverflow.com/questions/10420352/converting-file-size-in-bytes-to-human-readable-string
const humanFileSize = (bytes, si = false, dp = 1) => {
const humanFileSize = (bytes, si = true, dp = 1) => {
const thresh = si ? 1000 : 1024;

if (Math.abs(bytes) < thresh) {
Expand Down
4 changes: 2 additions & 2 deletions settingFrame/import.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <H4 style="padding:16px;">下方文本框内容即为你的播放列表信息</H
<span class="mdc-text-field__ripple"></span>
<span class="mdc-text-field__resizer" style="width:100%;">
<textarea class="mdc-text-field__input" rows="8" cols="40" aria-label="Label" id="playList"
style="resize:none;"></textarea>
style="resize:none;overflow-x: hidden;"></textarea>
</span>
<span class="mdc-line-ripple"></span>
</label>
Expand Down Expand Up @@ -72,7 +72,7 @@ <H4 style="padding:16px;">下方文本框内容即为你的播放列表信息</H
alert("解析播放列表失败,请检查你的输入!");
}
});
const cdn = "yuketang"
const cdn = localStorage.preferCDN ? localStorage.preferCDN : "yuketang";
document.getElementById("downBtn").addEventListener("click", () => {
document.getElementById("downBtn").disabled = true;
document.getElementById("downBtnLabel").innerText = "正在缓存...";
Expand Down
28 changes: 23 additions & 5 deletions settingFrame/sortcdn/sortcdn.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,49 @@

<head>
<meta charset="utf-8">
<meta name="description" content="545在线,随时补充塔能量!笙歌牌播放器,支持智能缓存本地播放,由琴梨梨驱动" />
<meta name="robots" content="noindex">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<title>CDN排序</title>

<link href="../../public.css" rel="stylesheet">
<!-- (A) LOAD CSS + JS -->
<link rel="stylesheet" href="sort-list.css" />
<script src="sort-list.js"></script>
<script src="../../lib/DragDropTouch.js"></script>
<link crossorigin="anonymous"
integrity="sha512-tH5CEoO7QorGJK5RZrcKozo5xe0qC0UgOhjkIoqXNVe9ApFAjJRbVFzDfVvdRUSOJ5g2Pw9VzzOBguouzhLoIQ=="
href="https://lib.baomitu.com/material-components-web/6.0.0/material-components-web.min.css" rel="stylesheet">
<script crossorigin="anonymous"
integrity="sha512-5zCl3JhN4Fqq6+irTX1v8J+77hwL54zTbrdl2Dl8YHe+KGcuV14C01u/uWFrSg+kZgOfGMneoUySVHqEgdRaPQ=="
src="https://lib.baomitu.com/material-components-web/6.0.0/material-components-web.min.js"></script>
<link crossorigin="anonymous"
href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/material-design-icons/3.0.2/iconfont/material-icons.min.css"
rel="stylesheet">
</head>

<body>
<!-- (B) THE LIST -->
<ul id="sortlist">
<li key="yuketang">雨课堂</li>
<li key="cloudflare">Cloudflare(尚未开放)</li>
<li key="chaoxing">超星(尚未开放)</li>
<li key="github">Github(尚未开放)</li>
<li key="cloudflare">Cloudflare</li>
</ul>

<div style="text-align:center;">
<H5>上下拖动排序,优先使用排在第一位的CDN</H5>
<button class="mdc-button mdc-button--raised mdc-button--leading" style="width:80%;margin:16px;" id="saveBtn">
<span class="mdc-button__ripple"></span>
<i class="material-icons mdc-button__icon" aria-hidden="true">save</i>
<span class="mdc-button__label">保存</span>
</button>
</div>
<!-- (C) INIT ON PAGE LOAD -->
<script>
window.addEventListener("DOMContentLoaded", () => {
slist(document.getElementById("sortlist"));
});
document.getElementById("saveBtn").addEventListener("click", () => {
localStorage.preferCDN = document.getElementById("sortlist").firstElementChild.getAttribute("key");
window.parent.postMessage("close");
});
</script>
</body>

Expand Down
5 changes: 5 additions & 0 deletions settingFrame/speedtest.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ <H4>音频节点</H4>
domain: "bj.bcebos.com",
file: "https://bj.bcebos.com/yunpanx/%E6%B5%B7%E6%B5%B7%E6%B5%B7_20220415194656_23666.ogg",
length: 5892464
}, {
name: "Cloudflare",
domain: "cdn-cf.545.qinlili.bid",
file: "https://cdn-cf.545.qinlili.bid/%E8%87%AA%E4%BC%A0/%E5%A4%A7%E5%96%9C.ogg",
length: 4674297
}];
for (let i = 0; domains[i]; i++) {
let info = document.createElement("p");
Expand Down
4 changes: 2 additions & 2 deletions settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ <H3 style="margin:auto;" id="titleText">设置</H3>
<span class="mdc-list-item__secondary-text">你的建议可以帮助545在线做得更好</span>
</span>
</li>
<li class="mdc-list-item" onclick="showFrameSet('settingFrame/sortcdn/sortcdn')" style="display:none;">
<li class="mdc-list-item" onclick="showFrameSet('settingFrame/sortcdn/sortcdn')">
<span class="mdc-list-item__ripple"></span>
<span class="mdc-list-item__text">
<span class="mdc-list-item__primary-text">CDN设置(暂未开放)</span>
<span class="mdc-list-item__primary-text">CDN设置</span>
<span class="mdc-list-item__secondary-text">修改CDN优先级</span>
</span>
</li>
Expand Down
4 changes: 2 additions & 2 deletions sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var APP_PREFIX = '545在线'
var VERSION = '1.0.1.20220524'
var VERSION_AZUSA_PATCH_USE = '1.0.0.20220522'
var VERSION = '1.0.2.20220525'
var VERSION_AZUSA_PATCH_USE = '1.0.1.20220524'
var AZUSA_PATCH_SKIP_LIST = [
'./img/bai.png',
'./img/wanan.png',
Expand Down
2 changes: 1 addition & 1 deletion toolFrame/audioCutter/dist/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"success": true,
"latest": "1.0.1.20220524",
"azusa_patch_avaliable": "1.0.0.20220522"
"latest": "1.0.2.20220525",
"azusa_patch_avaliable": "1.0.1.20220524"
}

1 comment on commit 4a2012e

@vercel
Copy link

@vercel vercel bot commented on 4a2012e May 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.