SAAS-772: Send metadata to Tunein
This is pretty much working for scheduled metadata - just to need to test with a TuneIn account.
This commit is contained in:
parent
77241bb6fc
commit
cf24c141fd
10 changed files with 179 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
require_once('TuneIn.php');
|
||||
|
||||
class ApiController extends Zend_Controller_Action
|
||||
{
|
||||
|
@ -615,6 +616,14 @@ class ApiController extends Zend_Controller_Action
|
|||
$file = Application_Model_StoredFile::RecallById($file_id);
|
||||
$now = new DateTime("now", new DateTimeZone("UTC"));
|
||||
$file->setLastPlayedTime($now);
|
||||
|
||||
// Push metadata to TuneIn
|
||||
if (Application_Model_Preference::getTuneinEnabled()) {
|
||||
$filePropelOrm = $file->getPropelOrm();
|
||||
$title = urlencode($filePropelOrm->getDbTrackTitle());
|
||||
$artist = urlencode($filePropelOrm->getDbArtistName());
|
||||
Application_Common_TuneIn::sendMetadataToTunein($title, $artist);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// webstream
|
||||
|
|
|
@ -56,14 +56,19 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_Preference::SetStationLogo($imagePath);
|
||||
}
|
||||
|
||||
Application_Model_Preference::SetUploadToSoundcloudOption($values["UploadToSoundcloudOption"]);
|
||||
Application_Model_Preference::setTuneinEnabled($values["enable_tunein"]);
|
||||
Application_Model_Preference::setTuneinStationId($values["tunein_station_id"]);
|
||||
Application_Model_Preference::setTuneinPartnerKey($values["tunein_partner_key"]);
|
||||
Application_Model_Preference::setTuneinPartnerId($values["tunein_partner_id"]);
|
||||
|
||||
/*Application_Model_Preference::SetUploadToSoundcloudOption($values["UploadToSoundcloudOption"]);
|
||||
Application_Model_Preference::SetSoundCloudDownloadbleOption($values["SoundCloudDownloadbleOption"]);
|
||||
Application_Model_Preference::SetSoundCloudUser($values["SoundCloudUser"]);
|
||||
Application_Model_Preference::SetSoundCloudPassword($values["SoundCloudPassword"]);
|
||||
Application_Model_Preference::SetSoundCloudTags($values["SoundCloudTags"]);
|
||||
Application_Model_Preference::SetSoundCloudGenre($values["SoundCloudGenre"]);
|
||||
Application_Model_Preference::SetSoundCloudTrackType($values["SoundCloudTrackType"]);
|
||||
Application_Model_Preference::SetSoundCloudLicense($values["SoundCloudLicense"]);
|
||||
Application_Model_Preference::SetSoundCloudLicense($values["SoundCloudLicense"]);*/
|
||||
|
||||
$this->view->statusMsg = "<div class='success'>". _("Preferences updated.")."</div>";
|
||||
$this->view->form = $form;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue