diff --git a/couchpotato/core/notifications/history/__init__.py b/couchpotato/core/notifications/history/__init__.py deleted file mode 100644 index f4c53efa..00000000 --- a/couchpotato/core/notifications/history/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from .main import History - -def start(): - return History() - -config = [] diff --git a/couchpotato/core/notifications/history/main.py b/couchpotato/core/notifications/history/main.py deleted file mode 100644 index cdd46a41..00000000 --- a/couchpotato/core/notifications/history/main.py +++ /dev/null @@ -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 diff --git a/couchpotato/core/notifications/history/static/history.js b/couchpotato/core/notifications/history/static/history.js deleted file mode 100644 index e69de29b..00000000 diff --git a/couchpotato/core/settings/model.py b/couchpotato/core/settings/model.py index 950a67a5..c1251dfb 100644 --- a/couchpotato/core/settings/model.py +++ b/couchpotato/core/settings/model.py @@ -95,7 +95,6 @@ class Release(Entity): status = ManyToOne('Status') quality = ManyToOne('Quality') files = ManyToMany('File', cascade = 'all, delete-orphan', single_parent = True) - history = OneToMany('History', cascade = 'all, delete-orphan') info = OneToMany('ReleaseInfo', cascade = 'all, delete-orphan') @@ -193,17 +192,6 @@ class FileProperty(Entity): file = ManyToOne('File') -class History(Entity): - """History of actions that are connected to a certain release, - such as, renamed to, downloaded, deleted, download subtitles etc""" - - added = Field(Integer, default = lambda: int(time.time())) - message = Field(UnicodeText) - type = Field(Unicode(50)) - - release = ManyToOne('Release') - - class RenameHistory(Entity): """Remembers from where to where files have been moved."""