mirror of
https://github.com/Jackett/Jackett
synced 2024-12-25 09:20:37 +00:00
LostFilm: fix date parsing
This commit is contained in:
parent
34fc2a0d15
commit
b6692a7dab
1 changed files with 9 additions and 1 deletions
|
@ -389,7 +389,15 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
var dateString = document.QuerySelector("div.title-block > div.details-pane > div.left-box").TextContent;
|
||||
dateString = TrimString(dateString, "eng: ", " г."); // '... Дата выхода eng: 09 марта 2012 г. ...' -> '09 марта 2012'
|
||||
var date = DateTime.Parse(dateString, new CultureInfo(Language)); // dd mmmm yyyy
|
||||
DateTime date;
|
||||
if (dateString.Length == 4) //dateString might be just a year, e.g. https://www.lostfilm.tv/series/Ghosted/season_1/episode_14/
|
||||
{
|
||||
date = DateTime.ParseExact(dateString, "yyyy", CultureInfo.InvariantCulture).ToLocalTime();
|
||||
}
|
||||
else
|
||||
{
|
||||
date = DateTime.Parse(dateString, new CultureInfo(Language)); // dd mmmm yyyy
|
||||
}
|
||||
|
||||
var urlDetails = new TrackerUrlDetails(playButton);
|
||||
var episodeReleases = await FetchTrackerReleases(urlDetails);
|
||||
|
|
Loading…
Reference in a new issue