From 9981df48af2ac42e9dc722c9a3e1e163d68f2e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 28 Oct 2019 20:53:32 -0400 Subject: [PATCH] WIP --- bazarr/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bazarr/utils.py b/bazarr/utils.py index 225b3ff48..f256812fc 100644 --- a/bazarr/utils.py +++ b/bazarr/utils.py @@ -11,7 +11,6 @@ import requests from whichcraft import which from get_args import args from config import settings, url_sonarr, url_radarr -from database import database from subliminal import region as subliminal_cache_region import datetime @@ -20,6 +19,7 @@ import glob def history_log(action, sonarrSeriesId, sonarrEpisodeId, description, video_path=None, language=None, provider=None, score=None, forced=False): + from database import database database.execute("INSERT INTO table_history (action, sonarrSeriesId, sonarrEpisodeId, timestamp, description," "video_path, language, provider, score) VALUES (?,?,?,?,?,?,?,?,?)", (action, sonarrSeriesId, sonarrEpisodeId, time.time(), @@ -29,6 +29,7 @@ def history_log(action, sonarrSeriesId, sonarrEpisodeId, description, video_path def history_log_movie(action, radarrId, description, video_path=None, language=None, provider=None, score=None, forced=False): + from database import database database.execute("INSERT INTO table_history_movie (action, radarrId, timestamp, description, video_path, language, " "provider, score) VALUES (?,?,?,?,?,?,?,?)", (action, radarrId, time.time(), description, video_path, language, provider, score))