mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-14 04:50:30 +00:00
playlist button fix
This commit is contained in:
parent
12c3527e01
commit
edfd69b001
3 changed files with 10 additions and 8 deletions
|
|
@ -388,7 +388,7 @@
|
|||
<label for="torrent5">Drive Caching</label>
|
||||
</div>
|
||||
<div class="custom-switch mb-10" data-toggle="tooltip" data-placement="top"
|
||||
data-title="Stores Torrent Data Across Sessions Allowing To Re-Play Torrents Without Re-Downloading Them">
|
||||
data-title="Stores Torrent Data On Drive Across Sessions Allowing To Re-Play Torrents Without Re-Downloading Them, Uses A LOT Of Drive Space">
|
||||
<input type="checkbox" id="torrent8">
|
||||
<label for="torrent8">Persistent Storing</label>
|
||||
</div>
|
||||
|
|
@ -431,7 +431,7 @@
|
|||
Defaults
|
||||
</button>
|
||||
<button class="btn btn-danger" type="button" id="clearRelCache" data-toggle="tooltip"
|
||||
data-placement="top" data-title="Clears Anime Data Cache">Clear Cache
|
||||
data-placement="top" data-title="Clears Anime Names Data Cache">Clear Name Cache
|
||||
</button>
|
||||
<button class="btn btn-success" type="button" id="regProtButton" data-toggle="tooltip"
|
||||
data-placement="top"
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ async function alRequest(searchName, method) {
|
|||
}
|
||||
}
|
||||
}`
|
||||
} else if(method == "SearchName"){
|
||||
} else if (method == "SearchName") {
|
||||
variables.search = searchName
|
||||
variables.sort = "TRENDING_DESC"
|
||||
query = `
|
||||
|
|
@ -156,7 +156,7 @@ async function alRequest(searchName, method) {
|
|||
}
|
||||
}
|
||||
}`
|
||||
} else if (method == "SearchAnySingle"){
|
||||
} else if (method == "SearchAnySingle") {
|
||||
variables.search = searchName
|
||||
variables.perPage = 1
|
||||
variables.sort = "TRENDING_DESC"
|
||||
|
|
@ -450,13 +450,13 @@ async function nyaaRss(media, episode) {
|
|||
})
|
||||
return frag
|
||||
}
|
||||
async function resolveName(name, method){
|
||||
async function resolveName(name, method) {
|
||||
if (!store.hasOwnProperty(name) && !alResponse.data.Page.media.some(media => (Object.values(media.title).concat(media.synonyms).filter(name => name != null).includes(name) && ((store[name] = media) && true)))) {
|
||||
let res = await alRequest(name, method)
|
||||
if (!res.data.Page.media[0]) {
|
||||
res = await alRequest(name.replace(" (TV)", "").replace(` (${new Date().getFullYear()})`, ""), method)
|
||||
}
|
||||
if(settings.torrent7 && !res.data.Page.media[0] && method == "SearchReleasesSingle"){
|
||||
if (settings.torrent7 && !res.data.Page.media[0] && method == "SearchReleasesSingle") {
|
||||
res = await alRequest(name, "SearchAnySingle")
|
||||
}
|
||||
store[name] = res.data.Page.media[0]
|
||||
|
|
@ -509,7 +509,9 @@ clearRelCache.onclick = () => {
|
|||
store = {}
|
||||
}
|
||||
setInterval(() => {
|
||||
releasesRss()
|
||||
if (document.location.hash == "#releases") {
|
||||
releasesRss()
|
||||
}
|
||||
}, 30000);
|
||||
async function loadAnime() {
|
||||
await searchAnime()
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ function btnpl() {
|
|||
let template = document.createElement("a")
|
||||
template.classList.add("dropdown-item", "pointer", "text-capitalize", "text-truncate", "text-white")
|
||||
let regexParse = nameParseRegex.fallback.exec(file.name)
|
||||
template.innerHTML = playerData.nowPlaying[0] ? playerData.nowPlaying.title.userPreferred + " - " + parseInt(regexParse[3]) : regexParse[2] + parseInt(regexParse[3])
|
||||
template.innerHTML = playerData.nowPlaying[0] ? playerData.nowPlaying[0].title.userPreferred + " - " + parseInt(regexParse[3]) : regexParse[2] + parseInt(regexParse[3])
|
||||
template.onclick = () => {
|
||||
cleanupVideo()
|
||||
buildVideo(file, [playerData.nowPlaying ? playerData.nowPlaying[0] : undefined, parseInt(regexParse[3])])
|
||||
|
|
|
|||
Loading…
Reference in a new issue