mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-07 12:29:24 +00:00
settings finished
This commit is contained in:
parent
80265b53e8
commit
1e1ace94e4
4 changed files with 43 additions and 16 deletions
|
|
@ -129,7 +129,7 @@
|
|||
<div class="overflow-y-hidden content-wrapper">
|
||||
<section id="player">
|
||||
<a href="#player" class="w-full h-full"></a>
|
||||
<video id="video" class="w-full" autoPictureInPicture src="">
|
||||
<video id="video" class="w-full" src="">
|
||||
</video>
|
||||
<div class="player d-none flex-column justify-content-between w-full h-full">
|
||||
<div class="h-full w-full d-flex flex-column justify-content-between" id="ptoggle">
|
||||
|
|
@ -219,7 +219,7 @@
|
|||
<div class="gallery releases h-full overflow-y-scroll">
|
||||
</div>
|
||||
</section>
|
||||
<section id="settings" >
|
||||
<section id="settings">
|
||||
<div class="content">
|
||||
|
||||
|
||||
|
|
@ -309,7 +309,10 @@
|
|||
<div class="btn-group" role="group">
|
||||
<button class="btn btn-primary" type="button" id="setApply">Apply Settings</button>
|
||||
<button class="btn btn-danger" type="button" id="setRes">Restore Defaults</button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-muted">
|
||||
Restart may be required for some settings to take effect.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
color: #b6b6b6;
|
||||
--sidebar-width: 19rem;
|
||||
--ts: "";
|
||||
--miniplayer-display: flex;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -39,7 +40,7 @@
|
|||
|
||||
#player {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
display: var(--miniplayer-display);
|
||||
bottom: 2rem;
|
||||
right: 2rem;
|
||||
width: 25%;
|
||||
|
|
@ -66,7 +67,7 @@ video[src=""] {
|
|||
|
||||
video::cue {
|
||||
background: none;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-family: var(--sub-font);
|
||||
color: #fff;
|
||||
text-shadow: 2px 2px 0 #000,
|
||||
2px -2px 0 #000,
|
||||
|
|
@ -196,7 +197,9 @@ video::cue {
|
|||
height: var(--height);
|
||||
top: -2rem;
|
||||
}
|
||||
|
||||
.ctrl[disabled]{
|
||||
display: none;
|
||||
}
|
||||
.controls input#prog[type=range]::before {
|
||||
top: 0rem;
|
||||
content: attr(data-ts);
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ async function nyaaSearch(media, episode) {
|
|||
for (let title of titles) {
|
||||
if (results.children.length == 0) {
|
||||
title = title.replace(/ /g, "+")
|
||||
let url = new URL(`https://nyaa.si/?page=rss&c=1_2&f=2&s=seeders&o=desc&q=${title}"+${episode}+"`)
|
||||
let url = new URL(`https://nyaa.si/?page=rss&c=1_2&f=${settings.torrent3 == true ? 2 : 0}&s=seeders&o=desc&q=${title}"+${episode}+"+${settings.torrent1}`)
|
||||
results = await nyaaRss(url)
|
||||
}
|
||||
}
|
||||
|
|
@ -271,19 +271,24 @@ async function nyaaRss(url) {
|
|||
await res.text().then((xmlTxt) => {
|
||||
try {
|
||||
let doc = DOMPARSER(xmlTxt, "text/xml")
|
||||
if (settings.torrent2 && doc.querySelectorAll("infoHash")[0]) {
|
||||
addTorrent(doc.querySelectorAll("infoHash")[0].textContent)
|
||||
halfmoon.toggleModal("tsearch")
|
||||
}
|
||||
doc.querySelectorAll("item").forEach((item, index) => {
|
||||
let i = item.querySelector.bind(item)
|
||||
let template = document.createElement("tr")
|
||||
template.innerHTML += `
|
||||
<th>${(index + 1)}</th>
|
||||
<td>${i("title").textContent}</td>
|
||||
<td>${i("size").textContent}</td>
|
||||
<td>${i("seeders").textContent}</td>
|
||||
<td>${i("leechers").textContent}</td>
|
||||
<td>${i("downloads").textContent}</td>
|
||||
<td onclick="addTorrent('${i('infoHash').textContent}')" class="pointer">Play</td>`
|
||||
<th>${(index + 1)}</th>
|
||||
<td>${i("title").textContent}</td>
|
||||
<td>${i("size").textContent}</td>
|
||||
<td>${i("seeders").textContent}</td>
|
||||
<td>${i("leechers").textContent}</td>
|
||||
<td>${i("downloads").textContent}</td>
|
||||
<td onclick="addTorrent('${i('infoHash').textContent}')" class="pointer">Play</td>`
|
||||
frag.appendChild(template)
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
|
|
@ -386,6 +391,6 @@ async function hsRss(url) {
|
|||
}
|
||||
})
|
||||
}
|
||||
document.querySelector("#refRel").onclick = function(){
|
||||
document.querySelector("#refRel").onclick = function () {
|
||||
hsRss(`http://www.horriblesubs.info/rss.php?res=${settings.torrent1}`)
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@ const controls = document.getElementsByClassName('ctrl'),
|
|||
btnpp = document.querySelector('#bpp'),
|
||||
btnm = document.querySelector("#bmute"),
|
||||
btnfull = document.querySelector('#bfull'),
|
||||
btnpip = document.querySelector('#bpip'),
|
||||
elapsed = document.querySelector("#elapsed"),
|
||||
remaining = document.querySelector("#remaining"),
|
||||
buffering = document.querySelector("#buffering"),
|
||||
|
|
@ -256,6 +257,17 @@ async function bpip() {
|
|||
}
|
||||
}
|
||||
|
||||
if (settings.player7){
|
||||
video.setAttribute("autoPictureInPicture", "");
|
||||
} else {
|
||||
video.setAttribute("disablePictureInPicture", "");
|
||||
btnpip.setAttribute("disabled", "");
|
||||
}
|
||||
|
||||
//miniplayer
|
||||
if (!settings.player4){
|
||||
document.documentElement.style.setProperty("--miniplayer-display", "none");
|
||||
}
|
||||
// theathe mode
|
||||
|
||||
function btheatre() {
|
||||
|
|
@ -279,7 +291,9 @@ function seek(a) {
|
|||
video.currentTime += a;
|
||||
updateDisplay()
|
||||
}
|
||||
// subtitles button, generates content every single time its opened because fuck knows when the parser will find new shit
|
||||
|
||||
// subtitles, generates content every single time its opened because fuck knows when the parser will find new shit
|
||||
|
||||
let off
|
||||
function bcap() {
|
||||
let frag = document.createDocumentFragment()
|
||||
|
|
@ -322,6 +336,8 @@ function selectLang(lang) {
|
|||
}
|
||||
bcap()
|
||||
}
|
||||
|
||||
document.documentElement.style.setProperty("--sub-font", `"${settings.subtitle1}"`);
|
||||
// keybinds
|
||||
|
||||
document.onkeydown = function (a) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue