From a5534c4bd242f8275214b6b953a87b667efc7bef Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 13 Oct 2012 21:16:05 +0200 Subject: [PATCH] Create file types on load --- couchpotato/core/plugins/file/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/couchpotato/core/plugins/file/main.py b/couchpotato/core/plugins/file/main.py index 0658911f..49256201 100644 --- a/couchpotato/core/plugins/file/main.py +++ b/couchpotato/core/plugins/file/main.py @@ -5,6 +5,7 @@ from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import md5, getExt from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin +from couchpotato.core.plugins.scanner.main import Scanner from couchpotato.core.settings.model import FileType, File from couchpotato.environment import Env import os.path @@ -30,6 +31,12 @@ class FileManager(Plugin): }) addEvent('app.load', self.cleanup) + addEvent('app.load', self.init) + + def init(self): + + for type_tuple in Scanner.file_types.values(): + self.getType(type_tuple) def cleanup(self):