Bug 484972 - Files tab is empty and it closes itself after clicking on Add to playlist
Summary: Files tab is empty and it closes itself after clicking on Add to playlist
Status: REPORTED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: 24.02.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-03 10:39 UTC by medin
Modified: 2024-06-30 17:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Files tab empty (611.11 KB, video/mp4)
2024-05-13 20:37 UTC, medin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2024-04-03 10:39:44 UTC
When you launch a fresh Elisa instance, and select Files category, it's shown empty and if you try to click on that "Add to playlist" button Elisa will close itself.

Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.2-2-MANJARO (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-05-12 07:55:52 UTC
Where is all your music located?
Comment 2 medin 2024-05-12 20:55:12 UTC
(In reply to Nate Graham from comment #1)
> Where is all your music located?

My whole music library is on a separate NTFS partition where it can be used both from Manjaro and Windows10. 
But this problem happens with fresh Elisa without any added music library.
Comment 3 Jack Hill 2024-05-13 19:56:22 UTC
What path is the files tab showing when you click the Add to Playlist button? And are there any music files, or subdirectories in this folder?
Comment 4 medin 2024-05-13 20:37:42 UTC
Created attachment 169459 [details]
Files tab empty

(In reply to Jack Hill from comment #3)
> What path is the files tab showing when you click the Add to Playlist
> button? 

Nothing appears in Files tab.

> And are there any music files, or subdirectories in this folder?

I didn't add yet any music.

See my attached video for more info.
Comment 5 Bug Janitor Service 2024-05-14 12:25:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/579
Comment 6 Jack Hill 2024-05-14 12:34:01 UTC
Thank you for the video. I think this is two issues in one:

1. Clicking the play button on an empty files tab crashes Elisa. This should be fixed in the above merge request.
2. The files tab is displaying files from `~/Music` but this is not made obvious to the user.

I think the Files tab should (1) display the current file path to the user, and maybe (2) have a button for navigating to the parent directory for easier navigation.

Btw it is possible to change the default file path of the Files tab in the config window.
Comment 7 medin 2024-05-14 13:38:18 UTC
Browsing music files by using the structure of system files is an essential tool for many users, because when you import a big list of songs from multiple parts, it gets difficult to tag all of them using special tools like kid3, so some users simply organize them inside named folders.

It would be great if file browser inside Elisa first starts pointing to that initial folder set in settings, then it will remember the last visited location upon each start, and if it's lost then reset it to that initial folder. 

And it would awesome if even those music folders added in settings appears at top inside a combobox to make it easy to navigate inside them.
Comment 8 medin 2024-05-14 13:41:37 UTC
And like you said the current opened folder path should be made visible at top like in Dolphin, with "go back", "go forward" and "go up" buttons to get full browsing capabilities.
Comment 9 Bug Janitor Service 2024-05-16 13:50:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/580
Comment 10 Jack Hill 2024-06-07 20:05:16 UTC
Git commit 87ef42ed7864582c7c9899def66ab56d656aa8a3 by Jack Hill.
Committed on 07/06/2024 at 19:58.
Pushed by jackh into branch 'master'.

Fix potential crash when enqueueing from empty files view

If the current folder is empty, then mPendingEntries will be empty. Calling
front on an empty queue is undefined behaviour, and can result in a crash.

Test-plan: added an autotest
Related: bug 441525

M  +11   -0    autotests/CMakeLists.txt
A  +86   -0    autotests/filebrowserproxymodeltest.cpp     [License: LGPL(v3.0+)]
M  +6    -7    src/models/filebrowserproxymodel.cpp

https://invent.kde.org/multimedia/elisa/-/commit/87ef42ed7864582c7c9899def66ab56d656aa8a3
Comment 11 Jack Hill 2024-06-08 13:25:25 UTC
Git commit 246178d77c77f89a430829e5113ffd20805acb54 by Jack Hill.
Committed on 08/06/2024 at 11:10.
Pushed by ngraham into branch 'release/24.05'.

Fix potential crash when enqueueing from empty files view

If the current folder is empty, then mPendingEntries will be empty. Calling
front on an empty queue is undefined behaviour, and can result in a crash.

Test-plan: added an autotest
Related: bug 441525
(cherry picked from commit 87ef42ed7864582c7c9899def66ab56d656aa8a3)

M  +11   -0    autotests/CMakeLists.txt
A  +86   -0    autotests/filebrowserproxymodeltest.cpp     [License: LGPL(v3.0+)]
M  +6    -7    src/models/filebrowserproxymodel.cpp

https://invent.kde.org/multimedia/elisa/-/commit/246178d77c77f89a430829e5113ffd20805acb54
Comment 12 Nate Graham 2024-06-30 17:04:11 UTC
Git commit fdd903291bc8e14aa3ac92f6d6afea67f316a44e by Nate Graham, on behalf of Jack Hill.
Committed on 30/06/2024 at 16:39.
Pushed by ngraham into branch 'master'.

Don't allow enqueueing all items in a view if the view is empty

Prevents the user from triggering a crash when enqueueing in an empty
Files view.

Test-plan:
- Set Elisa to index an empty directory, go into albums view, try to
  enqueue all items
- Use the Files view to navigate into an empty directory, try to enqueue
  all items

Before: crash when enqueuing from files, nothing happens when enqueuing
from albums view

Now: buttons to enqueue are disabled
Related: bug 484665

M  +1    -0    src/qml/AbstractDataView.qml
M  +3    -0    src/qml/NavigationActionBar.qml

https://invent.kde.org/multimedia/elisa/-/commit/fdd903291bc8e14aa3ac92f6d6afea67f316a44e