-remove useless to utf8 conversions
This commit is contained in:
parent
6bfb0078b9
commit
b677d2985b
2 changed files with 6 additions and 6 deletions
|
@ -77,7 +77,7 @@ class AirtimeNotifier(Notifier):
|
||||||
self.watch_directory(m['directory'])
|
self.watch_directory(m['directory'])
|
||||||
|
|
||||||
elif m['event_type'] == "remove_watch":
|
elif m['event_type'] == "remove_watch":
|
||||||
watched_directory = api_client.encode_to(m['directory'], 'utf-8')
|
watched_directory = m['directory']
|
||||||
|
|
||||||
mm = self.proc_fun()
|
mm = self.proc_fun()
|
||||||
wd = mm.wm.get_wd(watched_directory)
|
wd = mm.wm.get_wd(watched_directory)
|
||||||
|
@ -86,8 +86,8 @@ class AirtimeNotifier(Notifier):
|
||||||
|
|
||||||
elif m['event_type'] == "change_stor":
|
elif m['event_type'] == "change_stor":
|
||||||
storage_directory = self.config.storage_directory
|
storage_directory = self.config.storage_directory
|
||||||
new_storage_directory = api_client.encode_to(m['directory'], 'utf-8')
|
new_storage_directory = m['directory']
|
||||||
new_storage_directory_id = api_client.encode_to(str(m['dir_id']), 'utf-8')
|
new_storage_directory_id = str(m['dir_id'])
|
||||||
|
|
||||||
mm = self.proc_fun()
|
mm = self.proc_fun()
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ class AirtimeNotifier(Notifier):
|
||||||
|
|
||||||
self.watch_directory(new_storage_directory)
|
self.watch_directory(new_storage_directory)
|
||||||
elif m['event_type'] == "file_delete":
|
elif m['event_type'] == "file_delete":
|
||||||
filepath = api_client.encode_to(m['filepath'], 'utf-8')
|
filepath = m['filepath']
|
||||||
|
|
||||||
mm = self.proc_fun()
|
mm = self.proc_fun()
|
||||||
self.logger.info("Adding file to ignore: %s ", filepath)
|
self.logger.info("Adding file to ignore: %s ", filepath)
|
||||||
|
|
|
@ -91,8 +91,8 @@ try:
|
||||||
response = api_client.setup_media_monitor()
|
response = api_client.setup_media_monitor()
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
storage_directory = apc.encode_to(response["stor"], 'utf-8')
|
storage_directory = response["stor"]
|
||||||
watched_dirs = apc.encode_to(response["watched_dirs"], 'utf-8')
|
watched_dirs = response["watched_dirs"]
|
||||||
logger.info("Storage Directory is: %s", storage_directory)
|
logger.info("Storage Directory is: %s", storage_directory)
|
||||||
config.storage_directory = os.path.normpath(storage_directory)
|
config.storage_directory = os.path.normpath(storage_directory)
|
||||||
config.imported_directory = os.path.normpath(os.path.join(storage_directory, 'imported'))
|
config.imported_directory = os.path.normpath(os.path.join(storage_directory, 'imported'))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue