Skip to content

Commit 0ea5f62

Browse files
committed
fix
1 parent f026161 commit 0ea5f62

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Controllers/ApiController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public JsonResult JacRedConf(string apikey)
3737
[Route("/api/v2.0/indexers/{status}/results")]
3838
public ActionResult Jackett(string apikey, string query, string title, string title_original, int year, Dictionary<string, string> category, int is_serial = -1)
3939
{
40+
//Console.WriteLine(HttpContext.Request.Path + HttpContext.Request.QueryString.Value);
41+
4042
var fastdb = getFastdb();
4143
var torrents = new Dictionary<string, TorrentDetails>();
4244
bool rqnum = !HttpContext.Request.QueryString.Value.Contains("&is_serial=") && HttpContext.Request.Headers.UserAgent.ToString() == "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36";

Engine/FileDB/staticDB.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public static IReadOnlyDictionary<string, TorrentDetails> OpenRead(string key, b
126126

127127
var fdb = new FileDB(key);
128128

129-
if (cache && AppInit.conf.evercache.enable)
129+
if (AppInit.conf.evercache.enable && (cache || AppInit.conf.evercache.validHour == 0))
130130
{
131131
var wtm = new WriteTaskModel() { db = fdb, openconnection = 1 };
132132
if (update_lastread)

Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ public static void Main(string[] args)
1717
{
1818
ThreadPool.QueueUserWorkItem(async _ =>
1919
{
20-
await Task.Delay(TimeSpan.FromMinutes(10));
21-
ApiController.getFastdb(update: true);
20+
while (true)
21+
{
22+
await Task.Delay(TimeSpan.FromMinutes(10));
23+
try { ApiController.getFastdb(update: true); } catch { }
24+
}
2225
});
2326

2427
ThreadPool.QueueUserWorkItem(async _ => await SyncCron.Torrents());

0 commit comments

Comments
 (0)