Summary: | "Add to Playlist" doesn't add playlist file from filebrowser to playlist | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Kostya Sha <gentoo.integer> |
Component: | File Browser | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nhn |
Priority: | NOR | ||
Version: | 2.3-GIT | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Kostya Sha
2010-03-03 19:53:55 UTC
Confirmed on current git. commit cb3e070f4030836f963bdfba8a4498008003f4d1 Author: Jakub Wieczorek <faw217@gmail.com> Date: Mon Mar 15 00:02:10 2010 +0100 File browser: "Add to Playlist" doesn't add playlist files to the playlist. BUG: 229290 diff --git a/ChangeLog b/ChangeLog index 43dc098..c9f960b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,8 @@ VERSION 2.3.1-Beta 1 * Cover fetcher: Fixed a crash involving reappearing cover found dialogs and pending cover fetches. (BR 230215) * Display tooltips with applet names in the context toolbar. (BR 230736) + * File browser: "Add to Playlist" doesn't add playlist files to the playlist. + (BR 229290) VERSION 2.3 diff --git a/src/browsers/filebrowser/FileView.cpp b/src/browsers/filebrowser/FileView.cpp index 3b144b3..312e7b2 100644 --- a/src/browsers/filebrowser/FileView.cpp +++ b/src/browsers/filebrowser/FileView.cpp @@ -27,6 +27,7 @@ #include "DirectoryLoader.h" #include "EngineController.h" #include "MainWindow.h" +#include "meta/PlaylistFileSupport.h" #include "PaletteHandler.h" #include "playlist/PlaylistModelStack.h" #include "PopupDropperFactory.h" @@ -332,11 +333,11 @@ void FileView::addSelectionToPlaylist( bool replace ) return; QList<KUrl> urls; - foreach( QModelIndex index, indices ) + foreach( const QModelIndex& index, indices ) { KFileItem file = index.data( KDirModel::FileItemRole ).value<KFileItem>(); debug() << "file path: " << file.url(); - if( EngineController::canDecode( file.url() ) || file.isDir() ) + if( EngineController::canDecode( file.url() ) || Meta::isPlaylist( file.url() ) || file.isDir() ) { urls << file.url(); } |