adds handling of m3u files to the file browser and allows to load the playlist from within the file browser
Details
loading of playlist via Files tab works
Diff Detail
- Repository
- R255 Elisa
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
One more comment I had forgotten.
src/qml/FileBrowserDelegate.qml | ||
---|---|---|
46 | This change and later in the same file introduce too much special and different code paths where another solution could avoid that. |
src/qml/FileBrowserDelegate.qml | ||
---|---|---|
46 | What solution do you have in mind? Would you like to get rid of the "isPlaylist" variable altogether? The problem with the playlist is that it is just a simple file url like every music file, so the alternative would be to check the mimetype in replaceAndPlay() etc. and call the loadPlayList function there. If you prefer that, I can change it. |
src/qml/FileBrowserDelegate.qml | ||
---|---|---|
46 | I believe that handling the playlist like any other files has the advantage of simplifying the qml files and should not be too hard to do in c++. |
In order to avoid polluting the mediaplaylist with a QMimeDataBase, I decided to move the handling to the proxy model. Let me know what you think.
Sorry for the delay. I am fine with your proposed solution. Thanks
Please fix my comments and this can soon land on master.
src/models/filebrowsermodel.cpp | ||
---|---|---|
73–74 | idem | |
src/models/filebrowsermodel.h | ||
38–39 | Please push this refactoring to a later patch. | |
src/models/filebrowserproxymodel.cpp | ||
129 | Please remove this debug print | |
130 | I believe that it would be more robust to only go to the playlist code if the mimetype matches the one of m3u playlists. Currently Elisa only supports them so that would be the best way to ensure that it will never fail. |
src/models/filebrowserproxymodel.cpp | ||
---|---|---|
130 | Sorry, I did not knew that. I trust you. |