mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 13:21:52 +02:00
Fixed enqueuing of urls without metadata.
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright (C) 2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
* Copyright (C) 2011-2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
* Copyright (C) 2011-2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
* Copyright (C) 2013, Uwe L. Korn <uwelk@xhochy.com>
|
* Copyright (C) 2013, Uwe L. Korn <uwelk@xhochy.com>
|
||||||
|
* Copyright (C) 2013, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -767,7 +768,14 @@ GlobalActionManager::doQueueAdd( const QStringList& parts, const QList< QPair< Q
|
|||||||
else
|
else
|
||||||
{ // give it a web result hint
|
{ // give it a web result hint
|
||||||
QFileInfo info( track.path() );
|
QFileInfo info( track.path() );
|
||||||
query_ptr q = Query::get( QString(), info.baseName(), QString(), uuid(), false );
|
|
||||||
|
QString artistText = track.host();
|
||||||
|
if ( artistText.isEmpty() )
|
||||||
|
artistText = info.absolutePath();
|
||||||
|
if ( artistText.isEmpty() )
|
||||||
|
artistText = track.toString();
|
||||||
|
|
||||||
|
query_ptr q = Query::get( artistText, info.baseName(), QString(), uuid(), false );
|
||||||
|
|
||||||
if ( q.isNull() )
|
if ( q.isNull() )
|
||||||
continue;
|
continue;
|
||||||
@@ -775,8 +783,6 @@ GlobalActionManager::doQueueAdd( const QStringList& parts, const QList< QPair< Q
|
|||||||
q->setResultHint( track.toString() );
|
q->setResultHint( track.toString() );
|
||||||
q->setSaveHTTPResultHint( true );
|
q->setSaveHTTPResultHint( true );
|
||||||
|
|
||||||
|
|
||||||
q->setResultHint( track.toString() );
|
|
||||||
Pipeline::instance()->resolve( q );
|
Pipeline::instance()->resolve( q );
|
||||||
|
|
||||||
ViewManager::instance()->queue()->model()->appendQuery( q );
|
ViewManager::instance()->queue()->model()->appendQuery( q );
|
||||||
|
Reference in New Issue
Block a user