mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
station summary does something again, at least for stations by artist
This commit is contained in:
@@ -19,7 +19,7 @@ Rectangle {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
icon: "../images/station.svg"
|
icon: "../images/station.svg"
|
||||||
title: mainView.title
|
title: mainView.title
|
||||||
subtitle: ""//generator.summary
|
subtitle: generator.summary
|
||||||
showSearchField: false
|
showSearchField: false
|
||||||
showBackButton: stationListView.currentIndex > 0
|
showBackButton: stationListView.currentIndex > 0
|
||||||
showNextButton: mainView.configured
|
showNextButton: mainView.configured
|
||||||
@@ -29,10 +29,6 @@ Rectangle {
|
|||||||
z: 1 //cover albumcovers that may leave their area
|
z: 1 //cover albumcovers that may leave their area
|
||||||
|
|
||||||
onBackPressed: {
|
onBackPressed: {
|
||||||
if(mainView.configured) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
inputBubble.opacity = 0
|
inputBubble.opacity = 0
|
||||||
stationListView.decrementCurrentIndex()
|
stationListView.decrementCurrentIndex()
|
||||||
if(stationListView.currentIndex == 1) {
|
if(stationListView.currentIndex == 1) {
|
||||||
|
@@ -275,7 +275,7 @@ EchonestGenerator::startFromArtist( const Tomahawk::artist_ptr& artist )
|
|||||||
controlsList[ "selectedType" ] = "echonest";
|
controlsList[ "selectedType" ] = "echonest";
|
||||||
controlsList[ "match" ] = QString::number( data.first );
|
controlsList[ "match" ] = QString::number( data.first );
|
||||||
controlsList[ "input" ] = data.second;
|
controlsList[ "input" ] = data.second;
|
||||||
controlsList[ "summary" ] = "";
|
controlsList[ "summary" ] = tr("Songs from %1").arg(data.second.toString());
|
||||||
setControls( QVariantList() << controlsList );
|
setControls( QVariantList() << controlsList );
|
||||||
|
|
||||||
// params.append( Echonest::DynamicPlaylist::PlaylistParamData( Echonest::DynamicPlaylist::Type, Echonest::DynamicPlaylist::SongRadioType ) );
|
// params.append( Echonest::DynamicPlaylist::PlaylistParamData( Echonest::DynamicPlaylist::Type, Echonest::DynamicPlaylist::SongRadioType ) );
|
||||||
@@ -666,6 +666,9 @@ EchonestGenerator::sentenceSummary()
|
|||||||
* NOTE / TODO: In order for the sentence to be grammatically correct, we must follow the EN API rules. That means we can't have multiple of some types of filters,
|
* NOTE / TODO: In order for the sentence to be grammatically correct, we must follow the EN API rules. That means we can't have multiple of some types of filters,
|
||||||
* and all Artist types must be the same. The filters aren't checked at the moment until Generate / Play is pressed. Consider doing a check on hide as well.
|
* and all Artist types must be the same. The filters aren't checked at the moment until Generate / Play is pressed. Consider doing a check on hide as well.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Keeping this for now to make stuff backwards compatible
|
||||||
|
|
||||||
/* QList< dyncontrol_ptr > allcontrols = m_controls;
|
/* QList< dyncontrol_ptr > allcontrols = m_controls;
|
||||||
QString sentence = "Songs ";
|
QString sentence = "Songs ";
|
||||||
|
|
||||||
@@ -751,7 +754,10 @@ EchonestGenerator::sentenceSummary()
|
|||||||
|
|
||||||
return sentence;*/
|
return sentence;*/
|
||||||
|
|
||||||
return "This is a station!";
|
if (m_controls.isEmpty()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return m_controls.first().toMap().value("summary").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user