Remove history table
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
from .main import History
|
||||
|
||||
def start():
|
||||
return History()
|
||||
|
||||
config = []
|
||||
@@ -1,27 +0,0 @@
|
||||
from couchpotato import get_session
|
||||
from couchpotato.core.helpers.encoding import toUnicode
|
||||
from couchpotato.core.logger import CPLog
|
||||
from couchpotato.core.notifications.base import Notification
|
||||
from couchpotato.core.settings.model import History as Hist
|
||||
import time
|
||||
|
||||
log = CPLog(__name__)
|
||||
|
||||
|
||||
class History(Notification):
|
||||
|
||||
listen_to = ['movie.downloaded', 'movie.snatched', 'renamer.canceled']
|
||||
|
||||
def notify(self, message = '', data = {}, listener = None):
|
||||
|
||||
db = get_session()
|
||||
history = Hist(
|
||||
added = int(time.time()),
|
||||
message = toUnicode(message),
|
||||
release_id = data.get('id', 0)
|
||||
)
|
||||
db.add(history)
|
||||
db.commit()
|
||||
#db.close()
|
||||
|
||||
return True
|
||||
Reference in New Issue
Block a user