extragear/multimedia/amarok/src/servicebrowser/mp3tunes
Maximilian Kossick
maximilian.kossick at googlemail.com
Mon Jun 23 17:56:31 CEST 2008
icing on the cake would be to download the remote file to a temporary
location and then upload it to mp3tunes from there if mp3tunes can't
access the file (e.g. because it's a daap share on the local network)
On Mon, Jun 23, 2008 at 4:32 PM, Casey Link <unnamedrambler at gmail.com> wrote:
> SVN commit 823471 by link:
>
> Enable copying of remote tracks to MP3tunes. Woo!
>
>
> M +3 -9 Mp3tunesServiceCollectionLocation.cpp
> M +12 -1 Mp3tunesWorkers.cpp
>
>
> --- trunk/extragear/multimedia/amarok/src/servicebrowser/mp3tunes/Mp3tunesServiceCollectionLocation.cpp #823470:823471
> @@ -75,15 +75,9 @@
> if( supported_types.contains( track->type() ) )
> {
>
> - if( sources[ track ].isLocalFile() ) //TODO Support non local files
> - {
> - debug() << "Added " << sources[ track ].pathOrUrl() << " to queue.";
> - urls.push_back( sources[ track ].pathOrUrl() );
> - }
> - else
> - {
> - debug() << "Track is not a local file.";
> - }
> + debug() << "Added " << sources[ track ].pathOrUrl() << " to queue.";
> + urls.push_back( sources[ track ].pathOrUrl() );
> +
> }
> else
> {
> --- trunk/extragear/multimedia/amarok/src/servicebrowser/mp3tunes/Mp3tunesWorkers.cpp #823470:823471
> @@ -267,11 +267,22 @@
> The::statusBar()->setProgressStatus( this, msg );
> emit ( incrementProgress() );
> debug() << "Uploading: " << track;
> - bool result = m_locker->uploadTrack( track );
> +
> + bool result = false;
> + if( track.startsWith( "http" ) )
> + {
> + debug() << "Remote file.";
> + result = m_locker->lockerLoad( track );
> + } else {
> + debug() << "Local file.";
> + result = m_locker->uploadTrack( track );
> + }
> +
> if(result) {
> debug() << "Uploaded Succeeded.";
> } else {
> debug() << "Uploaded Failed.";
> + debug() << "Error msg: " << m_locker->errorMessage();
> }
> progress++;
> }
>
More information about the Amarok-devel
mailing list