A dotnet library for extracting basic information from a movie file name.
You can install this package via the Package Manager Console
in Visual Studio.
Install-Package MovieFileLibrary
Create a new instance of the MovieDetector
class.
// using MovieFileLibrary;
var detector = new MovieDetector();
You can get the Title
and Year
of a movie via the GetInfo
method:
var movieFile = detector.GetInfo("D:\\Oppenheimer.2023.1080p.mkv");
// Title: Oppenheimer
// Year: 2023
You can also get the Season
and Episode
of a tv show:
var movieFile = detector.GetInfo("D:\\Frasier.S06E22.1080p.mp4");
// Title: Frasier
// Year: null
// IsSeries: True
// Season: 6
// Episode: 22
You can also get the ImdbId
of a movie:
var movieFile = detector.GetInfo("D:\\Amelie.2001.1080p.{imdb-tt0211915}.mkv");
// Title: Amelie
// Year: 2001
// ImdbId: tt0211915
Other styles are also supported:
var movieFile = detector.GetInfo("D:\\No.Time.to.Die.2021.1080p.[imdbid-tt2382320].mkv");
// Title: No Time to Die
// Year: 2021
// ImdbId: tt2382320
Please see the demo project for more examples.
Please visit the releases for more information.
This project is licensed under the MIT License.