mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #5043] [MERGED] adjust episode path expression to allow digits in series names #10376
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/5043
Author: @senritsu
Created: 1/17/2021
Status: ✅ Merged
Merged: 2/5/2021
Merged by: @dkanada
Base:
master← Head:improve-episode-number-parsing-with-digits-in-names📝 Commits (1)
4e21b49adjust episode path expression to allow digits in series names📊 Changes
2 files changed (+12 additions, -7 deletions)
View changed files
📝
Emby.Naming/Common/NamingOptions.cs(+7 -6)📝
tests/Jellyfin.Naming.Tests/TV/EpisodeNumberTests.cs(+5 -1)📄 Description
Changes
The previous expression was too greedy to consume digits, because the hyphen was optional. This lead to incorrect episode numbers for certain series with digits in their names, in those cases each episode was recognized as the same episode number (the digit from the series name).
The rule, which matches most standard anime filenames, also had a lower priority than one of the Kodi rules, leading to incorrect recognition for absolute numbered episodes with triple digits and higher (first digit was used as season number, rest of digits as episode number). This also resolves one of the TODO test cases.
Additional test cases were added to ensure that both hyphens in different parts of the filename, as well as names without hyphens, still work correctly. All previous test cases still pass.
Unfortunately another TODO (EpisodeNumberTests.cs@L76, Uchuu Senkan Yamato 2199) with the same issue (digits in the series name) could not be trivially fixed in the same change, due to the significantly different formatting. Attempts to resolve this case did not work out for now.
Issues
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.