CC-2505: Media monitor doesn't delete some tracks
from the Airtime server due character encoding -fixed
This commit is contained in:
parent
ba4733ceb6
commit
73da294089
4 changed files with 8 additions and 27 deletions
|
@ -118,7 +118,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
//make sure to exit here so that no other output is sent.
|
//make sure to exit here so that no other output is sent.
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
$logger->err('Resource in database, but not in storage: '.$filepath.' '.is_file($filepath));
|
$logger->err('Resource in database, but not in storage: "'.$filepath.'"');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$logger->err('$media != null && !PEAR::isError($media)');
|
$logger->err('$media != null && !PEAR::isError($media)');
|
||||||
|
|
|
@ -207,25 +207,4 @@ class LibraryController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -839,6 +839,5 @@ class StoredFile {
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,9 @@ class AirtimeMediaMonitorBootstrap():
|
||||||
|
|
||||||
command = "find %s -type f -iname '*.ogg' -o -iname '*.mp3' -readable" % dir
|
command = "find %s -type f -iname '*.ogg' -o -iname '*.mp3' -readable" % dir
|
||||||
stdout = self.execCommandAndReturnStdOut(command)
|
stdout = self.execCommandAndReturnStdOut(command)
|
||||||
new_files = stdout.split('\n')
|
stdout = unicode(stdout, "utf_8")
|
||||||
|
|
||||||
|
new_files = stdout.splitlines()
|
||||||
all_files_set = set()
|
all_files_set = set()
|
||||||
for file_path in new_files:
|
for file_path in new_files:
|
||||||
if len(file_path.strip(" \n")) > 0:
|
if len(file_path.strip(" \n")) > 0:
|
||||||
|
@ -65,8 +67,9 @@ class AirtimeMediaMonitorBootstrap():
|
||||||
command = "find %s -type f -iname '*.ogg' -o -iname '*.mp3' -readable" % dir
|
command = "find %s -type f -iname '*.ogg' -o -iname '*.mp3' -readable" % dir
|
||||||
|
|
||||||
stdout = self.execCommandAndReturnStdOut(command)
|
stdout = self.execCommandAndReturnStdOut(command)
|
||||||
|
stdout = unicode(stdout, "utf_8")
|
||||||
|
|
||||||
new_files = stdout.split('\n')
|
new_files = stdout.splitlines()
|
||||||
|
|
||||||
for file_path in new_files:
|
for file_path in new_files:
|
||||||
if len(file_path.strip(" \n")) > 0:
|
if len(file_path.strip(" \n")) > 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue