cc-3936: added owner recognition to organizer.

This commit is contained in:
Rudi Grinberg 2012-08-24 18:20:29 -04:00
parent ad4cc7bdaf
commit 517fa705bc
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import media.monitor.pure as mmp import media.monitor.pure as mmp
import media.monitor.owners as owners
from media.monitor.handler import ReportHandler from media.monitor.handler import ReportHandler
from media.monitor.log import Loggable from media.monitor.log import Loggable
from media.monitor.exceptions import BadSongFile from media.monitor.exceptions import BadSongFile
@ -47,6 +48,7 @@ class Organizer(ReportHandler,Loggable):
new_path = mmp.organized_path(event.path, target_path, new_path = mmp.organized_path(event.path, target_path,
event.metadata.extract()) event.metadata.extract())
mmp.magic_move(event.path, new_path) mmp.magic_move(event.path, new_path)
owners.add_file_owner(event.path, mmp.owner_id(event.path) )
self.logger.info('Organized: "%s" into "%s"' % self.logger.info('Organized: "%s" into "%s"' %
(event.path, new_path)) (event.path, new_path))
except BadSongFile as e: except BadSongFile as e: