Changeset View
Changeset View
Standalone View
Standalone View
src/services/magnatune/MagnatuneDownloadHandler.cpp
Show All 10 Lines | |||||
11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. * | 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. * | ||
12 | * * | 12 | * * | ||
13 | * You should have received a copy of the GNU General Public License along with * | 13 | * You should have received a copy of the GNU General Public License along with * | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. * | 14 | * this program. If not, see <http://www.gnu.org/licenses/>. * | ||
15 | ****************************************************************************************/ | 15 | ****************************************************************************************/ | ||
16 | 16 | | |||
17 | #include "MagnatuneDownloadHandler.h" | 17 | #include "MagnatuneDownloadHandler.h" | ||
18 | 18 | | |||
19 | #include "core/interfaces/Logger.h" | 19 | #include "core/logger/Logger.h" | ||
20 | #include "core/support/Amarok.h" | 20 | #include "core/support/Amarok.h" | ||
21 | #include "core/support/Components.h" | 21 | #include "core/support/Components.h" | ||
22 | #include "core/support/Debug.h" | 22 | #include "core/support/Debug.h" | ||
23 | #include "MagnatuneDatabaseHandler.h" | 23 | #include "MagnatuneDatabaseHandler.h" | ||
24 | #include "MagnatuneConfig.h" | 24 | #include "MagnatuneConfig.h" | ||
25 | 25 | | |||
26 | #include <KMessageBox> | 26 | #include <KMessageBox> | ||
27 | 27 | | |||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 70 | { | |||
74 | else | 74 | else | ||
75 | type = "download"; | 75 | type = "download"; | ||
76 | 76 | | |||
77 | QUrl purchaseURL = QUrl::fromUserInput( "http://" + username + ":" + password + "@" + type + ".magnatune.com/buy/membership_free_dl_xml?sku=" + m_currentAlbum->albumCode() + "&id=amarok" ); | 77 | QUrl purchaseURL = QUrl::fromUserInput( "http://" + username + ":" + password + "@" + type + ".magnatune.com/buy/membership_free_dl_xml?sku=" + m_currentAlbum->albumCode() + "&id=amarok" ); | ||
78 | 78 | | |||
79 | m_membershipDownload = true; | 79 | m_membershipDownload = true; | ||
80 | 80 | | |||
81 | m_resultDownloadJob = KIO::storedGet( purchaseURL, KIO::NoReload, KIO::HideProgressInfo ); | 81 | m_resultDownloadJob = KIO::storedGet( purchaseURL, KIO::NoReload, KIO::HideProgressInfo ); | ||
82 | Amarok::Components::logger()->newProgressOperation( m_resultDownloadJob, | 82 | Amarok::Logger::newProgressOperation( m_resultDownloadJob, | ||
83 | i18n( "Processing download" ) ); | 83 | i18n( "Processing download" ) ); | ||
84 | connect( m_resultDownloadJob, &KJob::result, this, &MagnatuneDownloadHandler::xmlDownloadComplete ); | 84 | connect( m_resultDownloadJob, &KJob::result, this, &MagnatuneDownloadHandler::xmlDownloadComplete ); | ||
85 | } | 85 | } | ||
86 | 86 | | |||
87 | void MagnatuneDownloadHandler::xmlDownloadComplete( KJob * downloadJob ) | 87 | void MagnatuneDownloadHandler::xmlDownloadComplete( KJob * downloadJob ) | ||
88 | { | 88 | { | ||
89 | 89 | | |||
90 | debug() << "xml download complete"; | 90 | debug() << "xml download complete"; | ||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |