This commit is contained in:
Duncan Sommerville 2014-11-19 15:21:14 -05:00
commit c627342e28
104 changed files with 31315 additions and 20071 deletions

View File

@ -1112,9 +1112,12 @@ class Application_Model_Scheduler
$removedItems = CcScheduleQuery::create()->findPks($scheduledIds); $removedItems = CcScheduleQuery::create()->findPks($scheduledIds);
//check to make sure all items selected are up to date // This array is used to keep track of every show instance that was
foreach ($removedItems as $removedItem) { // effected by the track deletion. It will be used later on to
// remove gaps in the schedule and adjust crossfade times.
$effectedInstanceIds = array();
foreach ($removedItems as $removedItem) {
$instance = $removedItem->getCcShowInstances($this->con); $instance = $removedItem->getCcShowInstances($this->con);
//check if instance is linked and if so get the schedule items //check if instance is linked and if so get the schedule items
@ -1122,25 +1125,22 @@ class Application_Model_Scheduler
if (!$cancelShow && $instance->getCcShow()->isLinked()) { if (!$cancelShow && $instance->getCcShow()->isLinked()) {
//returns all linked instances if linked //returns all linked instances if linked
$ccShowInstances = $this->getInstances($instance->getDbId()); $ccShowInstances = $this->getInstances($instance->getDbId());
$instanceIds = array(); $instanceIds = array();
foreach ($ccShowInstances as $ccShowInstance) { foreach ($ccShowInstances as $ccShowInstance) {
$instanceIds[] = $ccShowInstance->getDbId(); $instanceIds[] = $ccShowInstance->getDbId();
} }
/* $effectedInstanceIds = array_merge($effectedInstanceIds, $instanceIds);
* Find all the schedule items that are in the same position
* as the selected item by the user. // Delete the same track, represented by $removedItem, in
* The position of each track is the same across each linked instance // each linked show instance.
*/
$itemsToDelete = CcScheduleQuery::create() $itemsToDelete = CcScheduleQuery::create()
->filterByDbPosition($removedItem->getDbPosition()) ->filterByDbPosition($removedItem->getDbPosition())
->filterByDbInstanceId($instanceIds, Criteria::IN) ->filterByDbInstanceId($instanceIds, Criteria::IN)
->find(); ->filterByDbId($removedItem->getDbId(), Criteria::NOT_EQUAL)
foreach ($itemsToDelete as $item) { ->delete($this->con);
if (!$removedItems->contains($item)) {
$removedItems->append($item);
}
}
} }
//check to truncate the currently playing item instead of deleting it. //check to truncate the currently playing item instead of deleting it.
if ($removedItem->isCurrentItem($this->epochNow)) { if ($removedItem->isCurrentItem($this->epochNow)) {
@ -1165,29 +1165,11 @@ class Application_Model_Scheduler
} else { } else {
$removedItem->delete($this->con); $removedItem->delete($this->con);
} }
// update is_scheduled in cc_files but only if
// the file is not scheduled somewhere else
$fileId = $removedItem->getDbFileId();
// check if the removed item is scheduled somewhere else
$futureScheduledFiles = Application_Model_Schedule::getAllFutureScheduledFiles();
if (!is_null($fileId) && !in_array($fileId, $futureScheduledFiles)) {
$db_file = CcFilesQuery::create()->findPk($fileId, $this->con);
$db_file->setDbIsScheduled(false)->save($this->con);
}
} }
Application_Model_StoredFile::updatePastFilesIsScheduled();
if ($adjustSched === true) { if ($adjustSched === true) {
//get the show instances of the shows we must adjust times for. foreach ($effectedInstanceIds as $instance) {
foreach ($removedItems as $item) {
$instance = $item->getDBInstanceId();
if (!in_array($instance, $showInstances)) {
$showInstances[] = $instance;
}
}
foreach ($showInstances as $instance) {
$this->removeGaps($instance); $this->removeGaps($instance);
$this->calculateCrossfades($instance); $this->calculateCrossfades($instance);
} }
@ -1195,7 +1177,7 @@ class Application_Model_Scheduler
//update the status flag in cc_schedule. //update the status flag in cc_schedule.
$instances = CcShowInstancesQuery::create() $instances = CcShowInstancesQuery::create()
->filterByPrimaryKeys($showInstances) ->filterByPrimaryKeys($effectedInstanceIds)
->find($this->con); ->find($this->con);
foreach ($instances as $instance) { foreach ($instances as $instance) {

View File

@ -1137,7 +1137,6 @@ SELECT s.name,
s.genre, s.genre,
s.id, s.id,
si.id AS instance_id, si.id AS instance_id,
si.description AS instance_description,
si.record, si.record,
s.url, s.url,
s.image_path, s.image_path,
@ -1226,7 +1225,6 @@ SELECT si.starts AS start_timestamp,
s.description, s.description,
s.id, s.id,
si.id AS instance_id, si.id AS instance_id,
si.description AS instance_description,
si.record, si.record,
s.url, s.url,
s.image_path, s.image_path,
@ -1273,7 +1271,6 @@ SQL;
$results['previousShow'][0] = array( $results['previousShow'][0] = array(
"id" => $rows[$i-1]['id'], "id" => $rows[$i-1]['id'],
"instance_id" => $rows[$i-1]['instance_id'], "instance_id" => $rows[$i-1]['instance_id'],
"instance_description" => $rows[$i-1]['instance_description'],
"name" => $rows[$i-1]['name'], "name" => $rows[$i-1]['name'],
"description" => $rows[$i-1]['description'], "description" => $rows[$i-1]['description'],
"url" => $rows[$i-1]['url'], "url" => $rows[$i-1]['url'],
@ -1292,7 +1289,6 @@ SQL;
$results['nextShow'][0] = array( $results['nextShow'][0] = array(
"id" => $rows[$i+1]['id'], "id" => $rows[$i+1]['id'],
"instance_id" => $rows[$i+1]['instance_id'], "instance_id" => $rows[$i+1]['instance_id'],
"instance_description" => $rows[$i+1]['instance_description'],
"name" => $rows[$i+1]['name'], "name" => $rows[$i+1]['name'],
"description" => $rows[$i+1]['description'], "description" => $rows[$i+1]['description'],
"url" => $rows[$i+1]['url'], "url" => $rows[$i+1]['url'],
@ -1335,7 +1331,6 @@ SQL;
$results['previousShow'][0] = array( $results['previousShow'][0] = array(
"id" => $rows[$previousShowIndex]['id'], "id" => $rows[$previousShowIndex]['id'],
"instance_id" => $rows[$previousShowIndex]['instance_id'], "instance_id" => $rows[$previousShowIndex]['instance_id'],
"instance_description" => $rows[$previousShowIndex]['instance_description'],
"name" => $rows[$previousShowIndex]['name'], "name" => $rows[$previousShowIndex]['name'],
"description" => $rows[$previousShowIndex]['description'], "description" => $rows[$previousShowIndex]['description'],
"start_timestamp" => $rows[$previousShowIndex]['start_timestamp'], "start_timestamp" => $rows[$previousShowIndex]['start_timestamp'],

View File

@ -355,7 +355,8 @@ SQL;
{ {
$exists = false; $exists = false;
try { try {
$exists = file_exists($this->getFilePath()); $filePath = $this->getFilePath();
$exists = (file_exists($this->getFilePath()) && !is_dir($filePath));
} catch (Exception $e) { } catch (Exception $e) {
return false; return false;
} }
@ -369,9 +370,7 @@ SQL;
* *
*/ */
public function delete() public function delete()
{ {
$filepath = $this->getFilePath();
// Check if the file is scheduled to be played in the future // Check if the file is scheduled to be played in the future
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) { if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
throw new DeleteScheduledFileException(); throw new DeleteScheduledFileException();
@ -389,20 +388,21 @@ SQL;
assert($music_dir); assert($music_dir);
$type = $music_dir->getType(); $type = $music_dir->getType();
if (file_exists($filepath) && $type == "stor") {
try {
//Update the user's disk usage
Application_Model_Preference::updateDiskUsage(-1 * abs(filesize($filepath)));
unlink($filepath);
} catch (Exception $e) {
Logging::error($e->getMessage());
return;
}
}
Logging::info($_SERVER["HTTP_HOST"].": User ".$user->getLogin()." is deleting file: ".$this->_file->getDbTrackTitle()." - file id: ".$this->_file->getDbId()); Logging::info($_SERVER["HTTP_HOST"].": User ".$user->getLogin()." is deleting file: ".$this->_file->getDbTrackTitle()." - file id: ".$this->_file->getDbId());
try {
if ($this->existsOnDisk() && $type == "stor") {
$filepath = $this->getFilePath();
//Update the user's disk usage
Application_Model_Preference::updateDiskUsage(-1 * abs(filesize($filepath)));
unlink($filepath);
}
} catch (Exception $e) {
Logging::warning($e->getMessage());
//If the file didn't exist on disk, that's fine, we still want to
//remove it from the database, so we continue here.
}
// need to explicitly update any playlist's and block's length // need to explicitly update any playlist's and block's length
// that contains the file getting deleted // that contains the file getting deleted
$fileId = $this->_file->getDbId(); $fileId = $this->_file->getDbId();
@ -420,8 +420,7 @@ SQL;
$bl->save(); $bl->save();
} }
// We were setting file_exists to false and leaving it at that //We actually do want to delete the file from the database here
// but we should actually delete the file
$this->_file->delete(); $this->_file->delete();
} }
@ -498,11 +497,15 @@ SQL;
$music_dir = Application_Model_MusicDir::getDirByPK($this-> $music_dir = Application_Model_MusicDir::getDirByPK($this->
_file->getDbDirectory()); _file->getDbDirectory());
if (!$music_dir) { if (!$music_dir) {
throw new Exception("Invalid music_dir for file in database."); throw new Exception(_("Invalid music_dir for file in database."));
} }
$directory = $music_dir->getDirectory(); $directory = $music_dir->getDirectory();
$filepath = $this->_file->getDbFilepath(); $filepath = $this->_file->getDbFilepath();
if (!$filepath) {
throw new Exception(sprintf(_("Blank file path for file %s (id: %s) in database."), $this->_file->getDbTrackTitle(), $this->getId()));
}
return Application_Common_OsPath::join($directory, $filepath); return Application_Common_OsPath::join($directory, $filepath);
} }

View File

@ -237,7 +237,7 @@ class Rest_MediaController extends Zend_Rest_Controller
//as a foreign key to cc_music_dirs. //as a foreign key to cc_music_dirs.
if (isset($requestData["full_path"])) { if (isset($requestData["full_path"])) {
$fileSizeBytes = filesize($requestData["full_path"]); $fileSizeBytes = filesize($requestData["full_path"]);
if ($fileSizeBytes === false) if (!isset($fileSizeBytes) || $fileSizeBytes === false)
{ {
$file->setDbImportStatus(self::IMPORT_STATUS_FAILED)->save(); $file->setDbImportStatus(self::IMPORT_STATUS_FAILED)->save();
$this->fileNotFoundResponse(); $this->fileNotFoundResponse();
@ -280,8 +280,7 @@ class Rest_MediaController extends Zend_Rest_Controller
{ {
return; return;
} }
$id = $this->getId(); $id = $this->getId();
if (!$id) { if (!$id) {
return; return;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
# LANGUAGE (xx_XX) translation for Airtime.
# Copyright (C) 2012 Sourcefabric
# This file is distributed under the same license as the Airtime package.
# Sourcefabric <contact@sourcefabric.org>, 2012.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Airtime 2.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-11-11 18:14-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:7
msgid "<b>Thank you!</b> Your plan has been updated and you will be invoiced during your next billing cycle."
msgstr ""
#: airtime_mvc/application/views/scripts/billing/invoices.phtml:11
msgid "Tip: To pay an invoice, click \"View Invoice\"<br> and look for the \"Checkout\" button."
msgstr ""

View File

@ -52,7 +52,7 @@ class AnalyzerPipeline:
metadata = dict() metadata = dict()
metadata = MetadataAnalyzer.analyze(audio_file_path, metadata) metadata = MetadataAnalyzer.analyze(audio_file_path, metadata)
metadata = FileMoverAnalyzer.move(audio_file_path, import_directory, original_filename, 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 # Note that the queue we're putting the results into is our interprocess communication
# back to the main process. # back to the main process.

View File

@ -26,7 +26,7 @@ QUEUE = "airtime-uploads"
Airtime's music library directory. Lastly, the extracted metadata is Airtime's music library directory. Lastly, the extracted metadata is
reported back to the Airtime web application. 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: 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 1) airtime_analyzer is designed so it doesn't have to run on the same

View File

@ -85,6 +85,7 @@ def process_http_requests(ipc_queue, http_retry_queue_path):
# while the web server is down or unreachable. # while the web server is down or unreachable.
with open(http_retry_queue_path, 'wb') as pickle_file: with open(http_retry_queue_path, 'wb') as pickle_file:
pickle.dump(retry_queue, pickle_file) pickle.dump(retry_queue, pickle_file)
return
except Exception as e: # Terrible top-level exception handler to prevent the thread from dying, just in case. except Exception as e: # Terrible top-level exception handler to prevent the thread from dying, just in case.
if shutdown: if shutdown:
return return
@ -98,13 +99,13 @@ def send_http_request(picklable_request, retry_queue):
if not isinstance(picklable_request, PicklableHttpRequest): if not isinstance(picklable_request, PicklableHttpRequest):
raise TypeError("picklable_request must be a PicklableHttpRequest. Was of type " + type(picklable_request).__name__) raise TypeError("picklable_request must be a PicklableHttpRequest. Was of type " + type(picklable_request).__name__)
try: try:
t = threading.Timer(60, alert_hung_request) #t = threading.Timer(60, alert_hung_request)
t.start() #t.start()
bare_request = picklable_request.create_request() bare_request = picklable_request.create_request()
s = requests.Session() s = requests.Session()
prepared_request = s.prepare_request(bare_request) prepared_request = s.prepare_request(bare_request)
r = s.send(prepared_request, timeout=StatusReporter._HTTP_REQUEST_TIMEOUT) r = s.send(prepared_request, timeout=StatusReporter._HTTP_REQUEST_TIMEOUT, verify=False) # SNI is a pain in the ass
t.cancel() # Watchdog no longer needed. #t.cancel() # Watchdog no longer needed.
r.raise_for_status() # Raise an exception if there was an http error code returned r.raise_for_status() # Raise an exception if there was an http error code returned
logging.info("HTTP request sent successfully.") logging.info("HTTP request sent successfully.")
except requests.exceptions.HTTPError as e: except requests.exceptions.HTTPError as e:
@ -140,7 +141,7 @@ def is_web_server_broken(url):
caused by Airtime or the webserver itself being broken temporarily. caused by Airtime or the webserver itself being broken temporarily.
''' '''
try: try:
test_req = requests.get(url) test_req = requests.get(url, verify=False)
test_req.raise_for_status() test_req.raise_for_status()
except Exception as e: except Exception as e:
return True return True

View File

@ -29,6 +29,11 @@ setup(name='airtime_analyzer',
'mock', 'mock',
'python-daemon', 'python-daemon',
'requests', 'requests',
# These next 3 are required for requests to support SSL with SNI. Learned this the hard way...
# What sucks is that GCC is required to pip install these.
#'ndg-httpsclient',
#'pyasn1',
#'pyopenssl'
], ],
zip_safe=False, zip_safe=False,
data_files=data_files) data_files=data_files)

View File

@ -18,7 +18,7 @@ post_file() {
airtime_conf_path=/etc/airtime/airtime.conf airtime_conf_path=/etc/airtime/airtime.conf
#maps the instance_path to the url #maps the instance_path to the url
vhost_file=/mnt/airtimepro/system/vhost.map vhost_file=/etc/apache2/airtime/vhost.map
#instance_path will look like 1/1384, for example #instance_path will look like 1/1384, for example
instance_path=$(echo ${file_path} | grep -Po "(?<=($base_instance_path)).*?(?=/srv)") instance_path=$(echo ${file_path} | grep -Po "(?<=($base_instance_path)).*?(?=/srv)")

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Account Plans</title> <title>Account Plans</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Add Media Skeleton Present</title> <title>Add Media Skeleton Present</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Billing Account Details</title> <title>Billing Account Details</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Billing Menu Contents</title> <title>Billing Menu Contents</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Calendar Add Show Skeleton</title> <title>Calendar Add Show Skeleton</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Calendar Day Week Month Views</title> <title>Calendar Day Week Month Views</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Calendar Skeleton Present</title> <title>Calendar Skeleton Present</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Invoices Skeleton</title> <title>Invoices Skeleton</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Library Skeleton Present</title> <title>Library Skeleton Present</title>
</head> </head>
<body> <body>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> <head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://bananas.airtime.pro/" />
<title>Listen Button Skeleton</title> <title>Listen Button Skeleton</title>
</head> </head>
<body> <body>

Some files were not shown because too many files have changed in this diff Show More