CC-3561: Add button to automatically rescan watched folders.

-done
This commit is contained in:
denise 2012-06-15 12:16:19 -04:00
parent 70bfe031ef
commit d02607ed94
6 changed files with 32 additions and 11 deletions

View file

@ -109,9 +109,9 @@ class AirtimeMediaMonitorBootstrap():
if os.path.exists(self.mmc.timestamp_file):
"""find files that have been modified since the last time media-monitor process started."""
time_diff_sec = time.time() - os.path.getmtime(self.mmc.timestamp_file)
command = "find %s -iname '*.ogg' -o -iname '*.mp3' -type f -readable -mmin -%d" % (dir, time_diff_sec/60+1)
command = "find '%s' -iname '*.ogg' -o -iname '*.mp3' -type f -readable -mmin -%d" % (dir, time_diff_sec/60+1)
else:
command = "find %s -iname '*.ogg' -o -iname '*.mp3' -type f -readable" % dir
command = "find '%s' -iname '*.ogg' -o -iname '*.mp3' -type f -readable" % dir
self.logger.debug(command)
stdout = self.mmc.exec_command(command)