mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
Doing so for now. Need to create ui for specific albums
This commit is contained in:
parent
fb8a761278
commit
2ee085d13d
@ -265,7 +265,7 @@ ChartsPlugin::chartResources()
|
||||
foreach(QVariant resource, m_chartResources){
|
||||
tDebug() << "ChartsPlugin: InfoChart fetching possible types for "<< resource.toString();
|
||||
|
||||
QUrl url = QUrl( QString( CHART_URL "/source/%1" ).arg(resource.toString() ) );
|
||||
QUrl url = QUrl( QString( CHART_URL "source/%1" ).arg(resource.toString() ) );
|
||||
qDebug() << "Getting types from " << url;
|
||||
|
||||
QNetworkReply* reply = lastfm::nam()->get( QNetworkRequest( url ) );
|
||||
@ -298,8 +298,10 @@ ChartsPlugin::chartTypes()
|
||||
return;
|
||||
}
|
||||
|
||||
foreach(QVariant chart, res.value( "charts" ).toMap() )
|
||||
foreach(QVariant chart, res.value( "charts" ).toMap() ){
|
||||
m_chartTypes.append(chart);
|
||||
qDebug() << "Chart types" << chart;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -78,8 +78,11 @@ WhatsHotWidget::WhatsHotWidget( QWidget* parent )
|
||||
ui->breadCrumbRight->setModel(m_crumbModelLeft);
|
||||
ui->breadCrumbRight->setUseAnimation(true);*/
|
||||
|
||||
m_tracksModel = new PlaylistModel( ui->tracksViewLeft );
|
||||
m_tracksModel->setStyle( TrackModel::Short );
|
||||
|
||||
m_tracksModel = new TreeModel( ui->tracksViewLeft );
|
||||
ui->tracksViewLeft->setTreeModel( m_tracksModel );
|
||||
|
||||
|
||||
|
||||
ui->tracksViewLeft->setFrameShape( QFrame::NoFrame );
|
||||
ui->tracksViewLeft->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||
@ -207,17 +210,20 @@ WhatsHotWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestDat
|
||||
}
|
||||
else if( type == "albums" )
|
||||
{
|
||||
|
||||
setLeftViewTracks();
|
||||
m_tracksModel->clear();
|
||||
setLeftViewArtists();
|
||||
m_artistsModel->clear();
|
||||
|
||||
const QList<Tomahawk::InfoSystem::ArtistAlbumPair> albums = returnedData["albums"].value<QList<Tomahawk::InfoSystem::ArtistAlbumPair> >();
|
||||
tDebug( LOGVERBOSE ) << "WhatsHot: got albums! " << albums.size();
|
||||
|
||||
foreach ( const Tomahawk::InfoSystem::ArtistAlbumPair& album, albums )
|
||||
{
|
||||
query_ptr query = Query::get( album.artist, QString(), album.album, uuid() );
|
||||
m_tracksModel->append( query );
|
||||
//query_ptr query = Query::get( album.artist, QString(), album.album, uuid() );
|
||||
artist_ptr artistPtr = Artist::get( album.artist );
|
||||
//album_ptr albumPtr = Album::get( 0, album.album, artistPtr );
|
||||
|
||||
m_artistsModel->addArtists( artistPtr );
|
||||
//m_albumsModel->append( query );
|
||||
}
|
||||
}
|
||||
else if( type == "tracks" )
|
||||
@ -255,9 +261,7 @@ WhatsHotWidget::infoSystemFinished( QString target )
|
||||
void
|
||||
WhatsHotWidget::leftCrumbIndexChanged( QModelIndex index )
|
||||
{
|
||||
|
||||
|
||||
tDebug( LOGVERBOSE ) << "WhatsHot:: left crumb current changed" << index.data();
|
||||
tDebug( LOGVERBOSE ) << "WhatsHot:: left crumb changed" << index.data();
|
||||
QStandardItem* item = m_crumbModelLeft->itemFromIndex(index);
|
||||
if( !item )
|
||||
return;
|
||||
@ -265,7 +269,6 @@ WhatsHotWidget::leftCrumbIndexChanged( QModelIndex index )
|
||||
return;
|
||||
|
||||
|
||||
// Get the base eg. source identifier
|
||||
QList<QModelIndex> indexes;
|
||||
while (index.parent().isValid())
|
||||
{
|
||||
@ -288,9 +291,6 @@ WhatsHotWidget::leftCrumbIndexChanged( QModelIndex index )
|
||||
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( criteria );
|
||||
|
||||
requestData.type = Tomahawk::InfoSystem::InfoChart;
|
||||
qDebug() << Q_FUNC_INFO << "RequestData custom" << requestData.customData;
|
||||
qDebug() << Q_FUNC_INFO << "RequestData caller" << requestData.caller;
|
||||
qDebug() << Q_FUNC_INFO << "RequestData input" << requestData.input;
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
||||
}
|
||||
|
||||
|
@ -30,30 +30,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page3">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QListView" name="albumViewLeft">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>9</x>
|
||||
<y>9</y>
|
||||
<width>839</width>
|
||||
<height>471</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@ -81,7 +57,7 @@
|
||||
<customwidget>
|
||||
<class>ArtistView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header>artistview.h</header>
|
||||
<header location="global">artistview.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HeaderBreadCrumb</class>
|
||||
|
Loading…
x
Reference in New Issue
Block a user