From 28f957be928bd9becc3ca43517d6d0d4c577af00 Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 27 May 2013 17:02:34 -0400 Subject: [PATCH] CC-3817 : Should use soundcloud icon for recorded & uploaded shows in timeline for past shows to match calendar --- airtime_mvc/application/models/StoredFile.php | 2 +- utils/soundcloud-uploader.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index ebd235dc6..98f06b16a 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -1255,7 +1255,7 @@ SQL; $description = $file->getDbTrackTitle(); $tag = array(); $genre = $file->getDbGenre(); - $release = $file->getDbYear(); + $release = $file->getDbUtime(); try { $soundcloud = new Application_Model_Soundcloud(); $soundcloud_res = $soundcloud->uploadTrack( diff --git a/utils/soundcloud-uploader.php b/utils/soundcloud-uploader.php index 2b4615a8c..0e1245945 100644 --- a/utils/soundcloud-uploader.php +++ b/utils/soundcloud-uploader.php @@ -32,6 +32,7 @@ set_include_path(implode(PATH_SEPARATOR, array( realpath($CC_CONFIG['phpDir'] . '/library') ))); +require_once($CC_CONFIG['phpDir'].'/application/common/Database.php'); require_once($CC_CONFIG['phpDir'].'/application/models/StoredFile.php'); require_once($CC_CONFIG['phpDir'].'/application/models/Preference.php'); require_once($CC_CONFIG['phpDir'].'/application/models/MusicDir.php'); @@ -52,7 +53,8 @@ if(count($argv) != 2){ } $id = $argv[1]; -$file = Application_Model_StoredFile::Recall($id); + +$file = Application_Model_StoredFile::RecallById($id); // set id with -2 which is indicator for processing $file->setSoundCloudFileId(SOUNDCLOUD_PROGRESS); $file->uploadToSoundCloud();