mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Remove the http iofactory. AudioEngine handles http:// urls by giving them to phonon directly. Lets not download an mp3 twice.
This commit is contained in:
@@ -80,12 +80,6 @@ Servent::Servent( QObject* parent )
|
|||||||
boost::bind( &Servent::remoteIODeviceFactory, this, _1 );
|
boost::bind( &Servent::remoteIODeviceFactory, this, _1 );
|
||||||
this->registerIODeviceFactory( "servent", fac );
|
this->registerIODeviceFactory( "servent", fac );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
boost::function<QSharedPointer<QIODevice>(result_ptr)> fac =
|
|
||||||
boost::bind( &Servent::httpIODeviceFactory, this, _1 );
|
|
||||||
this->registerIODeviceFactory( "http", fac );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -880,12 +874,3 @@ Servent::localFileIODeviceFactory( const Tomahawk::result_ptr& result )
|
|||||||
|
|
||||||
return QSharedPointer<QIODevice>( io );
|
return QSharedPointer<QIODevice>( io );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QSharedPointer<QIODevice>
|
|
||||||
Servent::httpIODeviceFactory( const Tomahawk::result_ptr& result )
|
|
||||||
{
|
|
||||||
QNetworkRequest req( result->url() );
|
|
||||||
QNetworkReply* reply = TomahawkUtils::nam()->get( req );
|
|
||||||
return QSharedPointer<QIODevice>( reply, &QObject::deleteLater );
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user