mirror of
https://github.com/NoCrypt/migu.git
synced 2026-03-11 17:45:32 +00:00
fix: ready state
fix: title matching in tosho
This commit is contained in:
parent
09d386818a
commit
d73fe4ccd3
3 changed files with 4 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "4.4.2",
|
||||
"version": "4.4.3",
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
||||
"main": "build/main.js",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class TorrentClient extends WebTorrent {
|
|||
torrentPort: settings.torrentPort || 0,
|
||||
dhtPort: settings.dhtPort || 0
|
||||
})
|
||||
this.ready = new Promise(resolve => {
|
||||
this._ready = new Promise(resolve => {
|
||||
ipcRenderer.on('port', ({ ports }) => {
|
||||
this.message = ports[0].postMessage.bind(ports[0])
|
||||
resolve()
|
||||
|
|
@ -166,7 +166,7 @@ class TorrentClient extends WebTorrent {
|
|||
}
|
||||
|
||||
async dispatch (type, data, transfer) {
|
||||
await this.ready
|
||||
await this._ready
|
||||
this.message?.({ type, data }, transfer)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ function getCourPrequel (media) {
|
|||
|
||||
function isMovie (media) {
|
||||
if (media.format === 'MOVIE') return true
|
||||
if ([...Object.values(media.title), ...media.synonyms].some(title => title.toLowerCase().includes('movie'))) return true
|
||||
if ([...Object.values(media.title), ...media.synonyms].some(title => title?.toLowerCase().includes('movie'))) return true
|
||||
// if (!getParentForSpecial(media)) return true // TODO: this is good for checking movies, but false positives with normal TV shows
|
||||
return media.duration > 80 && media.episodes === 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue