CC-2795: Give option to set download flag of recorded shows uploaded

to Soundcloud by default

- fixed name of Soundcloud Model class
This commit is contained in:
James 2011-10-03 18:02:01 -04:00
parent d4063a8234
commit b4d4c54c31
5 changed files with 5 additions and 6 deletions

View File

@ -13,6 +13,7 @@ require_once 'DB.php';
require_once 'Preference.php';
require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php';
require_once 'soundcloud-api/Services/Soundcloud.php';
global $CC_CONFIG, $CC_DBC;
$dsn = $CC_CONFIG['dsn'];

View File

@ -400,7 +400,7 @@ class ApiController extends Zend_Controller_Action
$tags = array_merge($hosts, array($show_name));
try {
$soundcloud = new Application_Model_AtSoundcloud();
$soundcloud = new Application_Model_Soundcloud();
$soundcloud_id = $soundcloud->uploadTrack($file->getFilePath(), $tmpTitle, $description, $tags, $show_start_time, $show_genre);
$file->setSoundCloudFileId($soundcloud_id);
break;

View File

@ -1,8 +1,6 @@
<?php
require_once 'soundcloud-api/Services/Soundcloud.php';
class Application_Model_AtSoundcloud {
class Application_Model_Soundcloud {
private $_soundcloud;

View File

@ -944,7 +944,7 @@ class Application_Model_StoredFile {
$genre = $file->getDbGenre();
$release = $file->getDbYear();
try {
$soundcloud = new Application_Model_AtSoundcloud();
$soundcloud = new Application_Model_Soundcloud();
$soundcloud_id = $soundcloud->uploadTrack($this->getFilePath(), $this->getName(), $description, $tag, $release, $genre);
$this->setSoundCloudFileId($soundcloud_id);
break;

View File

@ -426,8 +426,8 @@ class AirTimeApiClient(ApiClientInterface):
url = "http://%s:%s/%s/%s" % (self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["upload_recorded"])
url = url.replace("%%fileid%%", str(response[u'id']))
url = url.replace("%%showinstanceid%%", str(md['MDATA_KEY_TRACKNUMBER']))
logger.debug(url)
url = url.replace("%%api_key%%", self.config["api_key"])
logger.debug(url)
req = urllib2.Request(url)
response = urllib2.urlopen(req).read()