minor changes
This commit is contained in:
parent
72096bf1c8
commit
677a93b359
|
@ -554,11 +554,11 @@ QString LibraryView::GetNameForNewPlaylist(const SongList& songs) {
|
|||
if(various_artists) {
|
||||
result = tr("Various artists");
|
||||
} else {
|
||||
result = artists.values().at(0);
|
||||
result = artists.values().first();
|
||||
}
|
||||
|
||||
if(!various_artists && albums.size() == 1) {
|
||||
result += " - " + albums.toList()[0];
|
||||
result += " - " + albums.toList().first();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -68,9 +68,9 @@ MimeData* FileViewList::MimeDataFromSelection() const {
|
|||
data->setUrls(UrlListFromSelection());
|
||||
|
||||
QList<QString> filenames = FilenamesFromSelection();
|
||||
// if just one file / folder selected - use it's path as the new playlist's name
|
||||
if(filenames.size() == 1) {
|
||||
data->name_for_new_playlist_ = filenames[0];
|
||||
// if just one folder selected - use it's path as the new playlist's name
|
||||
if(filenames.size() == 1 && QFileInfo(filenames.first()).isDir()) {
|
||||
data->name_for_new_playlist_ = filenames.first();
|
||||
// otherwise, use the current root path
|
||||
} else {
|
||||
data->name_for_new_playlist_ = static_cast<QFileSystemModel*>(model())->rootPath();
|
||||
|
|
Loading…
Reference in New Issue