From 75f823f67140c2f19418ef7d323e84edff8f20b7 Mon Sep 17 00:00:00 2001 From: zone117x Date: Tue, 21 Apr 2015 12:17:59 -0600 Subject: [PATCH] Fix for bitmetv --- src/Jackett/Indexers/BitMeTV.cs | 9 +++++---- src/Jackett/Program.cs | 1 + src/Jackett/Server.cs | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Jackett/Indexers/BitMeTV.cs b/src/Jackett/Indexers/BitMeTV.cs index ebcd31ef2..f4fb222c7 100644 --- a/src/Jackett/Indexers/BitMeTV.cs +++ b/src/Jackett/Indexers/BitMeTV.cs @@ -155,11 +155,12 @@ namespace Jackett release.Description = release.Title; //"Tuesday, June 11th 2013 at 03:52:53 AM" to... - //"Tuesday June 11 2013 03 52 53 AM" + //"Tuesday June 11 2013 03:52:53 AM" var timestamp = qDetailsCol.Children("font").Text().Trim() + " "; - var groups = new Regex(@"(.*?), (.*?) (.*?)th (.*?) at (.*?):(.*?):(.*?) (.*?) ").Match(timestamp).Groups; - var str = string.Join(" ", groups.Cast().Skip(1).Select(g => g.Value)); - release.PublishDate = DateTime.ParseExact(str, "dddd MMMM d yyyy hh mm ss tt", CultureInfo.InvariantCulture); + var timeParts = new List(timestamp.Replace(" at", "").Replace(",", "").Split(' ')); + timeParts[2] = Regex.Replace(timeParts[2], "[^0-9.]", ""); + var formattedTimeString = string.Join(" ", timeParts.ToArray()).Trim(); + release.PublishDate = DateTime.ParseExact(formattedTimeString, "dddd MMMM d yyyy hh:mm:ss tt", CultureInfo.InvariantCulture); release.Link = new Uri(BaseUrl + "/" + row.ChildElements.ElementAt(2).Cq().Children("a.index").Attr("href")); diff --git a/src/Jackett/Program.cs b/src/Jackett/Program.cs index 7ad00e6df..f70ccdb84 100644 --- a/src/Jackett/Program.cs +++ b/src/Jackett/Program.cs @@ -37,6 +37,7 @@ namespace Jackett IsFirstRun = true; Directory.CreateDirectory(AppConfigDirectory); } + Console.WriteLine("App config/log directory: " + AppConfigDirectory); } catch (Exception ex) { diff --git a/src/Jackett/Server.cs b/src/Jackett/Server.cs index 91c7da803..6d3f898fe 100644 --- a/src/Jackett/Server.cs +++ b/src/Jackett/Server.cs @@ -22,6 +22,7 @@ namespace Jackett WebApi webApi; SonarrApi sonarrApi; + public Server() { LoadApiKey(); @@ -83,7 +84,9 @@ namespace Jackett try { +#if !DEBUG Process.Start("http://127.0.0.1:" + Port); +#endif } catch (Exception) { }