enhance Ordered Chapter detection against chapters starting at the same time, ordered chapters are always placed on first entry

This commit is contained in:
DataHoarder 2022-04-24 16:05:21 +02:00
parent 01b5ee77df
commit cca5d411a8
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name AnimeBytes Mediainfo Improvements
// @author WeebDataHoarder
// @version 1.26.3
// @version 1.26.4
// @downloadURL https://git.gammaspectra.live/WeebDataHoarder/userscripts/raw/branch/master/AnimeBytes/ab-mediainfo.user.js
// @updateURL https://git.gammaspectra.live/WeebDataHoarder/userscripts/raw/branch/master/AnimeBytes/ab-mediainfo.user.js
// @description AnimeBytes Mediainfo Improvements. Adds several listing and matching releases against mediainfo utilities. MIT license
@ -854,7 +854,7 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou
}
});
if(entryCount > 1 && !("chapters" in tags)){
if(chapterCount === 0 && entryCount > 1 && !("chapters" in tags)){
tags.chapters = "ordered";
if(settings.getSetting("warning_orderedChapters")){
warnings.general.push(["warning", "Found Ordered Chapters"]);