fix: title parsing

This commit is contained in:
ThaUnknown 2022-08-20 06:34:39 +02:00
parent 304e8fc284
commit 92af79f01b
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{
"name": "Miru",
"version": "3.1.1",
"version": "3.1.2",
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
"description": "Stream anime torrents, real-time with no waiting for downloads.",
"main": "src/index.js",

View file

@ -146,7 +146,6 @@ async function resolveTitle (name) {
}
function getParseObjTitle (obj) {
if (obj.anime_year) obj.anime_title += ` ${obj.anime_year}`
let title = obj.anime_title
const match = title.match(/ S(\d{1,2})E(\d{1,2})v\d/)
@ -156,6 +155,7 @@ function getParseObjTitle (obj) {
obj.anime_title = title.replace(/ S(\d{1,2})E(\d{1,2})v\d/, '')
title = obj.anime_title
}
if (obj.anime_year) title += ` ${obj.anime_year}`
if (obj.anime_season > 1) title += ' S' + obj.anime_season
return title
}