回覆 觀星是答案
己經係咁~
andrew 發表於 2022-5-10 04:52 PM 
雖然我無用Jellyfin,但各軟件裡scraper的regular expression都適應不同naming convention, 間間廠唔同,
但一般準則, 方括號係特指一些罕有意思
我無睇source code,若跟官方說明文件,你呢種寫法係錯的。方括號會被它當成db ID,搵鬼ar ?
https://jellyfin.org/docs/general/server/media/shows.html
自己搵搵, 改改
例子
kodi呢d大路野,一般預設格式係 https://kodi.wiki/view/Naming_video_files/Episodes
(有時改版後, 預設規則偶然會微調 / 兼容)- (?:\bS(?:eason ?)?(\d{1,3})[\s_.-]*)?
- -- Season number identification.
- (?:(?:\b|_)(?:ep?[ .]?)?(\d{1,3})(-\d{1,3})?(?:[_ ]?v\d)?[\s_.-]+)
- -- An episode number (captured) (and possible number range), with optional version. Requires word break beforehand.
- (?![^([{]*\b\d{1,3}(?:[_\s]?v\d+)?\b)
- -- Negative lookahead, so that the matched episode number is the last number in the name prior to any bracketed content.
- (?:\w+[\s_.-]*)*?
- -- Any number of unbracketed words with separators.
- (?:(?:\[[^]]+\]|\([^)]+\)|\{[^}]+\})(?:[\s_]*))*
- -- Any number of bracketed data, such as (DVD), [720p], {FLAC}, etc, with 0 or more spaces or underscores in between. Brackets have to match.
- (?:[[({][\da-f]{8}[])}])?
- -- Closing checksum.
- (?:[^\\/]*$)
- -- Make sure this is not part of a directory.
複製代碼 當然你可以自己加各式樣的regx例子 (\d{8} \d{4} -.*?- ?(.*)\.ts$) |