Closed parkmino closed 6 years ago
I'm not 100% convinced about this. I guess to be useful it would need to parse the song files, and show meta data. This could slow it down. To be honest, what does it gain over drag'n'drop? A file manager is going to have a much better interface for this than Cantata.
I think that the internal file manager in Cantata would have full screen access and more consistent user interface. Simple music file name browsing would be good enough for me. As you said, Cantata already provide decent ways to add local files, and definitely it is up to you whether to implement this or not.
I have an initial stab at this in the 1180-local-fs-browsing
branch. This works, as in allows you to branch and drag'n'drop. Note that dragging of folders will only add songs in the direct folder.
TODO:
Great! I'll look forward to see this feature soon.
FYI, I cannot build 1180-local-fs-browsing branch with following errors.
[ 59%] Building CXX object CMakeFiles/cantata.dir/devices/deviceoptions.cpp.o /home/parkmino/Downloads/mpd/cantata-1180-local-fs-browsing/gui/localfolderpage.cpp: In member function ‘void LocalFolderBrowsePage::itemDoubleClicked(const QModelIndex&)’: /home/parkmino/Downloads/mpd/cantata-1180-local-fs-browsing/gui/localfolderpage.cpp:83:22: error: ‘BrowseModel’ does not name a type if (!static_cast<BrowseModel::Item >(selected.at(0).internalPointer())->isFolder()) { ^ /home/parkmino/Downloads/mpd/cantata-1180-local-fs-browsing/gui/localfolderpage.cpp:83:33: error: expected ‘>’ before ‘::’ token if (!static_cast<BrowseModel::Item >(selected.at(0).internalPointer())->isFolder()) { ^ /home/parkmino/Downloads/mpd/cantata-1180-local-fs-browsing/gui/localfolderpage.cpp:83:33: error: expected ‘(’ before ‘::’ token /home/parkmino/Downloads/mpd/cantata-1180-local-fs-browsing/gui/localfolderpage.cpp:83:33: error: ‘::Item’ has not been declared /home/parkmino/Downloads/mpd/cantata-1180-local-fs-browsing/gui/localfolderpage.cpp:83:41: error: expected primary-expression before ‘>’ token if (!static_cast<BrowseModel::Item >(selected.at(0).internalPointer())->isFolder()) { ^ /home/parkmino/Downloads/mpd/cantata-1180-local-fs-browsing/gui/localfolderpage.cpp:83:76: error: ‘void’ is not a pointer-to-object type if (!static_cast<BrowseModel::Item >(selected.at(0).internalPointer())->isFolder()) { ^ /home/parkmino/Downloads/mpd/cantata-1180-local-fs-browsing/gui/localfolderpage.cpp:83:90: error: expected ‘)’ before ‘{’ token if (!static_cast<BrowseModel::Item >(selected.at(0).internalPointer())->isFolder()) { ^ /home/parkmino/Downloads/mpd/cantata-1180-local-fs-browsing/gui/localfolderpage.cpp:86:1: error: expected primary-expression before ‘}’ token } ^ CMakeFiles/cantata.dir/build.make:1526: recipe for target 'CMakeFiles/cantata.dir/gui/localfolderpage.cpp.o' failed make[2]: [CMakeFiles/cantata.dir/gui/localfolderpage.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:103: recipe for target 'CMakeFiles/cantata.dir/all' failed make[1]: [CMakeFiles/cantata.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: [all] Error 2
Branch should compile now. Please update, and let me know your thoughts.
Wow, 'Home' and 'Root' local files are seamlessly integrated into 'Folders'! ;-)
Here's my quick reviews. 1) Some embedded covers are not shown in play queue I do not know the reason or pattern. Let me know if you need more debug. 2) Clicking '<' to go back to folders not responsive sometimes. 3) Add Menu for trees and list view, same as 'Server Folders'. 4) External covers(png, jpg, ...) can be supported? Another enhancement. 5) Playlists(m3u8, cue, ...) can be visible and supported? Another enhancement. Overall, this feature seems to quite mature and ready for beta review. I will look into this for more.
Now I see most of issues are resolved. However, how about adding 'Menu' for basic/simple/detailed trees and list as well as 'Server Folders'
Merged into master now.
I really appreciate your hard work and wonderful results! Now I can see the whole tags in 'Home' and 'Root' under 'Folders', though metadata is disabled in mpd.conf ;-)
I'd like to know what you think about adding sidebar to browse local files as well as drag-and-drop and context menu. Cantata would provide most convenient way to add local files to play queue in this way. It will work like other music players and make up for the MPD's weak points e.g. mounting huge music library, the need of Upmpdcli and DLNA/UPnP server.