css optimizations, erai switch, thumbnails fixes, subtitle spacing settings, tracker cleanup, img optimizations
|
|
@ -12,8 +12,6 @@
|
|||
--miniplayer-display: flex;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* NAVBAR */
|
||||
.page-wrapper.with-sidebar[data-sidebar-hidden]>.sidebar {
|
||||
left: calc(-1 *var(--sidebar-width));
|
||||
|
|
@ -50,10 +48,6 @@
|
|||
z-index: 10
|
||||
}
|
||||
|
||||
#player:target>a {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#player>a {
|
||||
position: absolute;
|
||||
z-index: 10
|
||||
|
|
@ -63,25 +57,6 @@
|
|||
display: flex !important
|
||||
}
|
||||
|
||||
video[src=""] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
video::cue {
|
||||
background: none !important;
|
||||
font-family: var(--sub-font);
|
||||
color: #fff !important;
|
||||
text-shadow: 2px 2px 0 #000,
|
||||
2px -2px 0 #000,
|
||||
-2px 2px 0 #000,
|
||||
-2px -2px 0 #000,
|
||||
2px 0px 0 #000,
|
||||
0px 2px 0 #000,
|
||||
-2px 0px 0 #000,
|
||||
0px -2px 0 #000,
|
||||
2px 2px 2px #000;
|
||||
}
|
||||
|
||||
.controls {
|
||||
background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .4) 25%, rgba(0, 0, 0, .2) 50%, rgba(0, 0, 0, .1) 75%, transparent);
|
||||
transition: .5s opacity ease;
|
||||
|
|
@ -158,36 +133,47 @@ video::cue {
|
|||
.volume>input[type=range] {
|
||||
width: 0;
|
||||
transition: all .1s ease;
|
||||
margin-right: 0
|
||||
}
|
||||
|
||||
.controls input[type=range] {
|
||||
-webkit-appearance: none;
|
||||
background: transparent;
|
||||
margin: 0
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.controls input[type=range]:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
input#volume[type=range]::-webkit-slider-runnable-track {
|
||||
width: 50%;
|
||||
#volume::-webkit-slider-runnable-track {
|
||||
height: 3px;
|
||||
cursor: pointer;
|
||||
background: linear-gradient(90deg, #e5204c var(--volume-level), rgba(255, 255, 255, .2) var(--volume-level))
|
||||
}
|
||||
|
||||
input#progress[type=range]::-webkit-slider-runnable-track {
|
||||
width: 50%;
|
||||
#progress::-webkit-slider-runnable-track {
|
||||
height: 3px;
|
||||
cursor: pointer;
|
||||
background: linear-gradient(90deg, #e5204c var(--progress), rgba(255, 255, 255, .4) var(--progress), rgba(255, 255, 255, .4) var(--buffer), rgba(255, 255, 255, .2) var(--buffer))
|
||||
}
|
||||
|
||||
.controls input[type=range]:hover::-webkit-slider-thumb {
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
margin-top: -4px
|
||||
}
|
||||
|
||||
input#progress[type=range] ~ img,
|
||||
input#progress[type=range]::before {
|
||||
.controls input[type=range]::-webkit-slider-thumb {
|
||||
height: 0;
|
||||
width: 0;
|
||||
border-radius: 50%;
|
||||
background: var(--accent-color);
|
||||
-webkit-appearance: none;
|
||||
margin-top: 2px;
|
||||
transition: all .1s ease
|
||||
}
|
||||
|
||||
#progress+img,
|
||||
#progress::before {
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
|
|
@ -198,21 +184,48 @@ input#progress[type=range]::before {
|
|||
align-self: center;
|
||||
left: var(--progress);
|
||||
font-weight: 600;
|
||||
transition: .2s opacity ease;
|
||||
transition: .2s opacity ease
|
||||
}
|
||||
|
||||
input#progress[type=range] ~ img {
|
||||
#progress+img {
|
||||
content: "";
|
||||
height: var(--height);
|
||||
top: -2rem;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#progress::before {
|
||||
top: .5rem;
|
||||
content: attr(data-ts)
|
||||
}
|
||||
|
||||
#progress:active~img,
|
||||
#progress:active::before {
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
.ctrl[disabled],
|
||||
#player:fullscreen #bpip,
|
||||
#player:fullscreen #btheatre {
|
||||
display: none;
|
||||
#player:fullscreen #btheatre,
|
||||
#player:target>a,
|
||||
#progress+img[src=" "],
|
||||
video[src=""] {
|
||||
display: none
|
||||
}
|
||||
|
||||
video::cue {
|
||||
background: none !important;
|
||||
font-family: var(--sub-font);
|
||||
color: #fff !important;
|
||||
text-shadow: 2px 2px 0 #000,
|
||||
2px -2px 0 #000,
|
||||
-2px 2px 0 #000,
|
||||
-2px -2px 0 #000,
|
||||
2px 0px 0 #000,
|
||||
0px 2px 0 #000,
|
||||
-2px 0px 0 #000,
|
||||
0px -2px 0 #000,
|
||||
2px 2px 2px #000;
|
||||
}
|
||||
|
||||
#dl:not([download])>span {
|
||||
|
|
@ -220,33 +233,6 @@ input#progress[type=range] ~ img {
|
|||
color: rgba(255, 255, 255, .4);
|
||||
}
|
||||
|
||||
input#progress[type=range]::before {
|
||||
top: .5rem;
|
||||
content: attr(data-ts);
|
||||
}
|
||||
|
||||
input#progress[type=range]:active ~ img,
|
||||
input#progress[type=range]:active::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
input[type=range]:hover::-webkit-slider-thumb {
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
margin-top: -4px
|
||||
}
|
||||
|
||||
input[type=range]::-webkit-slider-thumb {
|
||||
height: 0;
|
||||
width: 0;
|
||||
border-radius: 50%;
|
||||
background: var(--accent-color);
|
||||
cursor: pointer;
|
||||
-webkit-appearance: none;
|
||||
margin-top: 2px;
|
||||
transition: all .1s ease;
|
||||
}
|
||||
|
||||
#nowPlayingDisplay {
|
||||
padding-left: 1.2rem !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@
|
|||
<span class="input-group-text">Feed</span>
|
||||
</div>
|
||||
<select class="form-control" disabled>
|
||||
<option value="HS" selected="selected">HorribleSubs</option>
|
||||
<option value="HS" selected="selected">Erai Raws</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -295,7 +295,7 @@
|
|||
<h1 class="content-title font-size-22">
|
||||
Subtitle Settings
|
||||
</h1>
|
||||
<div class="input-group w-200 mb-20">
|
||||
<div class="input-group w-200 mb-10">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Font</span>
|
||||
</div>
|
||||
|
|
@ -304,6 +304,10 @@
|
|||
<option value="Roboto,Arial,Helvetica,sans-serif">Roboto</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="custom-switch mb-20">
|
||||
<input type="checkbox" id="subtitle2">
|
||||
<label for="subtitle2">Edge Spacing [Has Issues With Displaying Multiple Subtitles At Once]</label>
|
||||
</div>
|
||||
|
||||
|
||||
<h1 class="content-title font-size-22">
|
||||
|
|
|
|||
|
|
@ -338,8 +338,10 @@ async function hsRss(url) {
|
|||
for (let item of items) {
|
||||
let i = item.querySelector.bind(item),
|
||||
regexParse = regex.exec(i("title").textContent)
|
||||
if (regexParse[2].endsWith(" - ")) {
|
||||
regexParse[2] = regexParse[2].slice(0, -3)
|
||||
if (regexParse[2]) {
|
||||
if (regexParse[2].endsWith(" - ")) {
|
||||
regexParse[2] = regexParse[2].slice(0, -3)
|
||||
}
|
||||
}
|
||||
if (!store[regexParse[2]] && !alResponse.data.Page.media.some(media => (Object.values(media.title).concat(media.synonyms).filter(name => name != null).includes(regexParse[2]) && ((store[regexParse[2]] = media) && true)))) {
|
||||
//shit not found, lookup
|
||||
|
|
@ -363,13 +365,13 @@ async function hsRss(url) {
|
|||
}
|
||||
}
|
||||
refRel.onclick = function () {
|
||||
hsRss(`https://miru.kirdow.com/request/?url=http://www.horriblesubs.info/rss.php?res=${settings.torrent1}`)
|
||||
hsRss(`https://www.erai-rss.info/rss-${settings.torrent1}`)
|
||||
}
|
||||
setInterval(() => {
|
||||
hsRss(`https://miru.kirdow.com/request/?url=http://www.horriblesubs.info/rss.php?res=${settings.torrent1}`)
|
||||
hsRss(`https://www.erai-rss.info/rss-${settings.torrent1}`)
|
||||
}, 30000);
|
||||
async function loadAnime() {
|
||||
await searchAnime()
|
||||
hsRss(`https://miru.kirdow.com/request/?url=http://www.horriblesubs.info/rss.php?res=${settings.torrent1}`)
|
||||
hsRss(`https://www.erai-rss.info/rss-${settings.torrent1}`)
|
||||
}
|
||||
loadAnime()
|
||||
1
app/js/bundle.min.js
vendored
|
|
@ -58,8 +58,8 @@ function updateDisplay() {
|
|||
function dragBar() {
|
||||
video.pause()
|
||||
updateBar(progress.value / 10)
|
||||
let bg = thumbnails.length == 0 ? "" : thumbnails[Math.floor(currentTime / 5) || 0]
|
||||
thumb.src = bg || ""
|
||||
let bg = thumbnails[Math.floor(currentTime / 5)]
|
||||
thumb.src = bg || " "
|
||||
}
|
||||
|
||||
function dragBarEnd() {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ const settingsElements = {
|
|||
player6: player6,
|
||||
player7: player7,
|
||||
subtitle1: subtitle1,
|
||||
subtitle2: subtitle2,
|
||||
torrent1: torrent1,
|
||||
torrent2: torrent2,
|
||||
torrent3: torrent3
|
||||
|
|
@ -23,6 +24,7 @@ function restoreDefaults() {
|
|||
player6: false,
|
||||
player7: true,
|
||||
subtitle1: "'Open Sans', sans-serif",
|
||||
subtitle2: true,
|
||||
torrent1: "1080",
|
||||
torrent2: false,
|
||||
torrent3: true
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ function subConvt(result, trackNumber) {
|
|||
cue.line = 0.5;
|
||||
} else if (Math.floor((posNum - 1) / 3) == 2) {
|
||||
cue.line = 0;
|
||||
cue.text = " \r\n"
|
||||
settings.subtitle2 ? cue.text = " \r\n" : cue.text = ""
|
||||
}
|
||||
if (posNum % 3 == 1) {
|
||||
cue.align = "start";
|
||||
|
|
@ -67,7 +67,7 @@ function subConvt(result, trackNumber) {
|
|||
cue.line = 0.5;
|
||||
} else if (posNum > 4) {
|
||||
cue.line = 0;
|
||||
cue.text = " \r\n"
|
||||
settings.subtitle2 ? cue.text = " \r\n" : cue.text = ""
|
||||
}
|
||||
if ((posNum - 1) % 4 == 0) {
|
||||
cue.align = "start";
|
||||
|
|
@ -132,9 +132,9 @@ function subConvt(result, trackNumber) {
|
|||
while (tagsToClose.length > 0) {
|
||||
content += '</' + tagsToClose.pop() + '>';
|
||||
}
|
||||
cue.text += `${content}\r\n `
|
||||
settings.subtitle2 ? cue.text += `${content}\r\n ` : cue.text += content
|
||||
} else {
|
||||
cue.text = `${text}\r\n `
|
||||
settings.subtitle2 ? cue.text = `${text}\r\n ` : cue.text = text
|
||||
}
|
||||
if (!Object.values(tracks[trackNumber].cues).some(c => c.text == cue.text && c.startTime == cue.startTime && c.endTime == cue.endTime)) {
|
||||
tracks[trackNumber].addCue(cue)
|
||||
|
|
|
|||
|
|
@ -7,22 +7,22 @@ window.onbeforeunload = () => {
|
|||
|
||||
const announceList = [
|
||||
['wss://tracker.openwebtorrent.com'],
|
||||
['wss://tracker.btorrent.xyz'],
|
||||
['wss://tracker.btorrent.xyz']
|
||||
// ['wss://tracker.webtorrent.io'],
|
||||
// ['wss://tracker.fastcast.nz'],
|
||||
// ['wss://video.blender.org:443/tracker/socket'],
|
||||
// ['wss://tube.privacytools.io:443/tracker/socket'],
|
||||
['wss://tracker.sloppyta.co:443/announce'],
|
||||
['wss://tracker.lab.vvc.niif.hu:443/announce'],
|
||||
['wss://tracker.files.fm:7073/announce'],
|
||||
['wss://open.tube:443/tracker/socket'],
|
||||
['wss://hub.bugout.link:443/announce'],
|
||||
// ['wss://tracker.sloppyta.co:443/announce'],
|
||||
// ['wss://tracker.lab.vvc.niif.hu:443/announce'],
|
||||
// ['wss://tracker.files.fm:7073/announce'],
|
||||
// ['wss://open.tube:443/tracker/socket'],
|
||||
// ['wss://hub.bugout.link:443/announce'],
|
||||
// ['wss://peertube.cpy.re:443/tracker/socket'],
|
||||
['ws://tracker.sloppyta.co:80/announce'],
|
||||
['ws://tracker.lab.vvc.niif.hu:80/announce'],
|
||||
['ws://tracker.files.fm:7072/announce'],
|
||||
['ws://tracker.btsync.cf:6969/announce'],
|
||||
['ws://hub.bugout.link:80/announce']
|
||||
// ['ws://tracker.sloppyta.co:80/announce'],
|
||||
// ['ws://tracker.lab.vvc.niif.hu:80/announce'],
|
||||
// ['ws://tracker.files.fm:7072/announce'],
|
||||
// ['ws://tracker.btsync.cf:6969/announce'],
|
||||
// ['ws://hub.bugout.link:80/announce']
|
||||
],
|
||||
videoExtensions = [
|
||||
'.avi', '.mp4', '.m4v', '.webm', '.mov', '.mkv', '.mpg', '.mpeg', '.ogv', '.webm', '.wmv', '.m2ts'
|
||||
|
|
@ -65,12 +65,14 @@ async function addTorrent(magnet) {
|
|||
await sw
|
||||
client.add(magnet, async function (torrent) {
|
||||
torrent.on('noPeers', function () {
|
||||
halfmoon.initStickyAlert({
|
||||
content: `Couldn't find peers for <span class="text-break">${torrent.infoHash}</span>! Try a torrent with more seeders.`,
|
||||
title: "Search Failed",
|
||||
alertType: "alert-danger",
|
||||
fillType: ""
|
||||
});
|
||||
if (selectedTorrent.progress != 1) {
|
||||
halfmoon.initStickyAlert({
|
||||
content: `Couldn't find peers for <span class="text-break">${torrent.infoHash}</span>! Try a torrent with more seeders.`,
|
||||
title: "Search Failed",
|
||||
alertType: "alert-danger",
|
||||
fillType: ""
|
||||
});
|
||||
}
|
||||
})
|
||||
let videoFile = torrent.files[0]
|
||||
torrent.files.forEach(file => {
|
||||
|
|
@ -170,7 +172,7 @@ navigator.serviceWorker.addEventListener('message', evt => {
|
|||
}
|
||||
|
||||
port.onmessage = pull
|
||||
|
||||
|
||||
// hack: stop hiding the old stream somewhere in memory land
|
||||
if (lastport) lastport.onmessage = null
|
||||
lastport = port
|
||||
|
|
|
|||
BIN
app/logo.png
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 14 KiB |
BIN
char.webp
Normal file
|
After Width: | Height: | Size: 29 KiB |
71
css.css
BIN
ico-256x256.png
|
Before Width: | Height: | Size: 5.5 KiB |
11
index.html
|
|
@ -1,6 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
|
@ -17,7 +16,6 @@
|
|||
|
||||
<link rel="icon" href="logo.png">
|
||||
<title>Miru - Torrent streaming made simple!</title>
|
||||
<link href="css.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/halfmoon@1.1.0/css/halfmoon-variables.min.css" rel="stylesheet" />
|
||||
<script>
|
||||
window.onload = () => {
|
||||
|
|
@ -38,13 +36,8 @@
|
|||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="with-custom-webkit-scrollbars with-custom-css-scrollbars">
|
||||
<div class="page-wrapper with-navbar-fixed-bottom">
|
||||
<div class="par particle-1"></div>
|
||||
<div class="par particle-2"></div>
|
||||
<div class="par particle-3"></div>
|
||||
<div class="par particle-4"></div>
|
||||
<div class="content-wrapper d-lg-flex align-items-lg-center">
|
||||
<div class="container-lg">
|
||||
<div class="row">
|
||||
|
|
@ -71,12 +64,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 d-flex align-items-center justify-content-center">
|
||||
<img class="w-400" alt="char" src="/char.png">
|
||||
<img class="w-400" alt="char" src="/char.webp">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="navbar navbar-fixed-bottom justify-content-center">
|
||||
<a href="/faq.html">
|
||||
FAQ
|
||||
|
|
@ -88,5 +80,4 @@
|
|||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/halfmoon@1.1.0/js/halfmoon.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
logo.png
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 613 KiB After Width: | Height: | Size: 613 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
|
@ -1,31 +1,45 @@
|
|||
<?php
|
||||
$url = str_replace("$", "&", $_GET['url']);
|
||||
$query = explode("?", $url) [1];
|
||||
if (strpos($query, '/') === false)
|
||||
{
|
||||
$cache_file = './cache/' . $query;
|
||||
if (substr($url, 0, 25) === "https://nyaa.si/?page=rss") {
|
||||
if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 60 * 1))) {
|
||||
$file = file_get_contents($cache_file);
|
||||
header('Content-Type: text/xml');
|
||||
echo $file;
|
||||
} else {
|
||||
$file = file_get_contents(str_replace(" ", "+", $url));
|
||||
file_put_contents($cache_file, $file, LOCK_EX);
|
||||
header('Content-Type: text/xml');
|
||||
echo $file;
|
||||
}
|
||||
} elseif (substr($url, 0, 41) === "http://www.horriblesubs.info/rss.php?res="){
|
||||
if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 60 * 0.5))) {
|
||||
$file = file_get_contents($cache_file);
|
||||
header('Content-Type: text/xml');
|
||||
echo $file;
|
||||
} else {
|
||||
$file = file_get_contents(str_replace(" ", "+", $url));
|
||||
file_put_contents($cache_file, $file, LOCK_EX);
|
||||
header('Content-Type: text/xml');
|
||||
echo $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
if (substr($url, 0, 25) === "https://nyaa.si/?page=rss")
|
||||
{
|
||||
$query = explode("?page=rss", $url) [1];
|
||||
if (strpos($query, '/') === false)
|
||||
{
|
||||
$cache_file = './cache_nyaa/' . $query;
|
||||
if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 60 * 1)))
|
||||
{
|
||||
$file = file_get_contents($cache_file);
|
||||
header('Content-Type: text/xml');
|
||||
echo $file;
|
||||
}
|
||||
else
|
||||
{
|
||||
$file = file_get_contents(str_replace(" ", "+", $url));
|
||||
file_put_contents($cache_file, $file, LOCK_EX);
|
||||
header('Content-Type: text/xml');
|
||||
echo $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (substr($url, 0, 30) === "https://www.erai-rss.info/rss-")
|
||||
{
|
||||
$query = explode("https://www.erai-rss.info/", $url) [1];
|
||||
if (strpos($query, '/') === false)
|
||||
{
|
||||
$cache_file = './cache_erai/' . $query;
|
||||
if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 60 * 1)))
|
||||
{
|
||||
$file = file_get_contents($cache_file);
|
||||
header('Content-Type: text/xml');
|
||||
echo $file;
|
||||
}
|
||||
else
|
||||
{
|
||||
$file = file_get_contents(str_replace(" ", "+", $url));
|
||||
file_put_contents($cache_file, $file, LOCK_EX);
|
||||
header('Content-Type: text/xml');
|
||||
echo $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||