cc-4105: Added a lot of comments.\nFixed encodings
This commit is contained in:
parent
151251dc6e
commit
daee78a3bb
|
@ -6,6 +6,25 @@ import media.monitor.pure as mmp
|
|||
from media.monitor.pure import IncludeOnly
|
||||
from media.monitor.events import OrganizeFile, NewFile, DeleteFile
|
||||
|
||||
# We attempt to document a list of all special cases and hacks that the
|
||||
# following classes should be able to handle.
|
||||
# TODO : implement all of the following special cases
|
||||
# - Recursive directories being added to organized dirs are not handled
|
||||
# properly as they only send a request for the dir and not for every file. Also
|
||||
# more hacks are needed to check that the directory finished moving/copying?
|
||||
#
|
||||
# - In the case when a 'watched' directory's subdirectory is delete we should
|
||||
# send a special request telling ApiController to delete a whole dir. This is
|
||||
# done becasue pyinotify will not send an individual file delete event for
|
||||
# every file in that directory
|
||||
#
|
||||
# - Special move events are required whenever a file is moved from a 'watched'
|
||||
# directory into another 'watched' directory (or subdirectory). In this case we
|
||||
# must identify the file by its md5 signature instead of it's filepath like we
|
||||
# usually do. Maybe it's best to always identify a file based on its md5
|
||||
# signature?. Of course that's not possible for some modification events
|
||||
# because the md5 signature will change...
|
||||
|
||||
|
||||
class BaseListener(object):
|
||||
def my_init(self, signal):
|
||||
|
|
|
@ -24,7 +24,11 @@ class RequestSync(threading.Thread,Loggable):
|
|||
def run(self):
|
||||
# TODO : implement proper request sending
|
||||
self.logger.info("launching request with %d items." % len(self.requests))
|
||||
#self.apiclient.update_media_metadata(
|
||||
# Note that we must attach the appropriate mode to every response. Also
|
||||
# Not forget to attach the 'is_record' to any requests that are related
|
||||
# to recorded shows
|
||||
# A simplistic request would like:
|
||||
# self.apiclient.send_media_monitor_requests(requests)
|
||||
self.watcher.flag_done()
|
||||
|
||||
class TimeoutWatcher(threading.Thread,Loggable):
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
import os
|
||||
|
|
Loading…
Reference in New Issue