2012-07-26 16:35:57 +02:00
|
|
|
#include "googledriveurlhandler.h"
|
|
|
|
|
|
|
|
#include "googledriveservice.h"
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
GoogleDriveUrlHandler::GoogleDriveUrlHandler(GoogleDriveService* service,
|
|
|
|
QObject* parent)
|
|
|
|
: UrlHandler(parent), service_(service) {}
|
2012-07-26 16:35:57 +02:00
|
|
|
|
|
|
|
UrlHandler::LoadResult GoogleDriveUrlHandler::StartLoading(const QUrl& url) {
|
|
|
|
QString file_id = url.path();
|
|
|
|
QUrl real_url = service_->GetStreamingUrlFromSongId(file_id);
|
|
|
|
return LoadResult(url, LoadResult::TrackAvailable, real_url);
|
|
|
|
}
|