mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #2855 from Delgan/improve-movie-resolver
Improve movie resolver if space precedes the year
This commit is contained in:
commit
d7df890017
@ -22,6 +22,7 @@
|
|||||||
- [cvium](https://github.com/cvium)
|
- [cvium](https://github.com/cvium)
|
||||||
- [dannymichel](https://github.com/dannymichel)
|
- [dannymichel](https://github.com/dannymichel)
|
||||||
- [DaveChild](https://github.com/DaveChild)
|
- [DaveChild](https://github.com/DaveChild)
|
||||||
|
- [Delgan](https://github.com/Delgan)
|
||||||
- [dcrdev](https://github.com/dcrdev)
|
- [dcrdev](https://github.com/dcrdev)
|
||||||
- [dhartung](https://github.com/dhartung)
|
- [dhartung](https://github.com/dhartung)
|
||||||
- [dinki](https://github.com/dinki)
|
- [dinki](https://github.com/dinki)
|
||||||
|
@ -136,7 +136,8 @@ namespace Emby.Naming.Common
|
|||||||
|
|
||||||
CleanDateTimes = new[]
|
CleanDateTimes = new[]
|
||||||
{
|
{
|
||||||
@"(.+[^_\,\.\(\)\[\]\-])[_\.\(\)\[\]\-](19\d{2}|20\d{2})([ _\,\.\(\)\[\]\-][^0-9]|).*(19\d{2}|20\d{2})*"
|
@"(.+[^_\,\.\(\)\[\]\-])[_\.\(\)\[\]\-](19\d{2}|20\d{2})([ _\,\.\(\)\[\]\-][^0-9]|).*(19\d{2}|20\d{2})*",
|
||||||
|
@"(.+[^_\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19\d{2}|20\d{2})([ _\,\.\(\)\[\]\-][^0-9]|).*(19\d{2}|20\d{2})*"
|
||||||
};
|
};
|
||||||
|
|
||||||
CleanStrings = new[]
|
CleanStrings = new[]
|
||||||
|
@ -39,11 +39,11 @@ namespace Jellyfin.Naming.Tests.Video
|
|||||||
[InlineData(@"[rec].mkv", "[rec].mkv", null)]
|
[InlineData(@"[rec].mkv", "[rec].mkv", null)]
|
||||||
[InlineData(@"St. Vincent (2014)", "St. Vincent", 2014)]
|
[InlineData(@"St. Vincent (2014)", "St. Vincent", 2014)]
|
||||||
[InlineData("Super movie(2009).mp4", "Super movie", 2009)]
|
[InlineData("Super movie(2009).mp4", "Super movie", 2009)]
|
||||||
// FIXME: [InlineData("Drug War 2013.mp4", "Drug War", 2013)]
|
[InlineData("Drug War 2013.mp4", "Drug War", 2013)]
|
||||||
[InlineData("My Movie (1997) - GreatestReleaseGroup 2019.mp4", "My Movie", 1997)]
|
[InlineData("My Movie (1997) - GreatestReleaseGroup 2019.mp4", "My Movie", 1997)]
|
||||||
// FIXME: [InlineData("First Man 2018 1080p.mkv", "First Man", 2018)]
|
[InlineData("First Man 2018 1080p.mkv", "First Man", 2018)]
|
||||||
[InlineData("First Man (2018) 1080p.mkv", "First Man", 2018)]
|
[InlineData("First Man (2018) 1080p.mkv", "First Man", 2018)]
|
||||||
// FIXME: [InlineData("Maximum Ride - 2016 - WEBDL-1080p - x264 AC3.mkv", "Maximum Ride", 2016)]
|
[InlineData("Maximum Ride - 2016 - WEBDL-1080p - x264 AC3.mkv", "Maximum Ride", 2016)]
|
||||||
// FIXME: [InlineData("Robin Hood [Multi-Subs] [2018].mkv", "Robin Hood", 2018)]
|
// FIXME: [InlineData("Robin Hood [Multi-Subs] [2018].mkv", "Robin Hood", 2018)]
|
||||||
[InlineData(@"3.Days.to.Kill.2014.720p.BluRay.x264.YIFY.mkv", "3.Days.to.Kill", 2014)] // In this test case, running CleanDateTime first produces no date, so it will attempt to run CleanString first and then CleanDateTime again
|
[InlineData(@"3.Days.to.Kill.2014.720p.BluRay.x264.YIFY.mkv", "3.Days.to.Kill", 2014)] // In this test case, running CleanDateTime first produces no date, so it will attempt to run CleanString first and then CleanDateTime again
|
||||||
public void CleanDateTimeTest(string input, string expectedName, int? expectedYear)
|
public void CleanDateTimeTest(string input, string expectedName, int? expectedYear)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user