diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 4e03eba07..39731756b 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -355,7 +355,13 @@ SQL; { $exists = false; try { - $exists = file_exists($this->getFilePath()); + //Explicitly check filepath because if it's blank, getFilePath() can + //still return a directory that exists. + if (!$this->_file->getDbFilepath()) { + $exists = false; + } else { + $exists = file_exists($this->getFilePath()); + } } catch (Exception $e) { return false; } diff --git a/python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py b/python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py index 39c558bac..e36c03688 100644 --- a/python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py +++ b/python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py @@ -52,7 +52,7 @@ class AnalyzerPipeline: metadata = dict() metadata = MetadataAnalyzer.analyze(audio_file_path, metadata) metadata = FileMoverAnalyzer.move(audio_file_path, import_directory, original_filename, metadata) - metadata["import_status"] = 0 # imported + metadata["import_status"] = 0 # Successfully imported # Note that the queue we're putting the results into is our interprocess communication # back to the main process. diff --git a/python_apps/airtime_analyzer/airtime_analyzer/message_listener.py b/python_apps/airtime_analyzer/airtime_analyzer/message_listener.py index 9b890321c..495682d7b 100644 --- a/python_apps/airtime_analyzer/airtime_analyzer/message_listener.py +++ b/python_apps/airtime_analyzer/airtime_analyzer/message_listener.py @@ -26,7 +26,7 @@ QUEUE = "airtime-uploads" Airtime's music library directory. Lastly, the extracted metadata is reported back to the Airtime web application. - There's a couple of Very Important technical details and contraints that you + There's a couple of Very Important technical details and constraints that you need to know if you're going to work on this code: 1) airtime_analyzer is designed so it doesn't have to run on the same