Fix for bitmetv

This commit is contained in:
zone117x 2015-04-21 12:17:59 -06:00
parent 27ff36a3cc
commit 75f823f671
3 changed files with 9 additions and 4 deletions

View File

@ -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<Group>().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<string>(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"));

View File

@ -37,6 +37,7 @@ namespace Jackett
IsFirstRun = true;
Directory.CreateDirectory(AppConfigDirectory);
}
Console.WriteLine("App config/log directory: " + AppConfigDirectory);
}
catch (Exception ex)
{

View File

@ -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) { }