Bug 492353 - Display only genres that are *currently* present in music library
Summary: Display only genres that are *currently* present in music library
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: 23.08.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-08-29 08:08 UTC by Nikolai Försterling
Modified: 2024-11-27 03:07 UTC (History)
1 user (show)

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


Attachments
example for an empty genre that doesn't need to be shown in the genre list (58.90 KB, image/png)
2024-08-29 08:08 UTC, Nikolai Försterling
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolai Försterling 2024-08-29 08:08:13 UTC
Created attachment 173079 [details]
example for an empty genre that doesn't need to be shown in the genre list

This is a feature request, not really a bug.
While you can select (in the settings for left sidebar) to display the genre, it is a bit annoying, not particularly clear and effective, that there are all genres being shown and not just the genres that are present in my library 

So i suggest to display (or make that configurable) only genres that are set for at least one file in the music collection.
That would even be helpful to get rid of wrong genres when you see them

STEPS TO REPRODUCE
1. go to settings in the first drop-down menu (category to embed in the sidebar)
2. select "genres", apply and click "ok"
3. see the list of genres on the left side and click on some of them, many will show no result

OBSERVED RESULT
Many genres do not have files associated because they are not set im my library

EXPECTED RESULT
that overview should just display the genres i use

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 24.04
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13

Similar to #150510 for amarok
https://bugs.kde.org/show_bug.cgi?id=150510
Comment 1 Nikolai Försterling 2024-08-29 09:56:03 UTC
Right now i'm not sure whether that request is valid.
I have to clear all previous databases of Eliza and scan my collection again, it is possible that those empty genres are remains from former parts of my music.
Comment 2 Nikolai Försterling 2024-08-29 11:33:30 UTC
Ok, confirmed (test database from scratch) that every genre that is ever discovered in a collection is listet, regardless if currently used.
Shouldn't they be hidden anyway when there're no songs related to them anymore?
Comment 3 Nate Graham 2024-08-30 16:32:00 UTC
Yeah, the issue is that we don't clean the database of old genres that don't have any music in them anymore.
Comment 4 Bug Janitor Service 2024-11-24 17:37:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/642
Comment 5 Jack Hill 2024-11-26 20:18:22 UTC
Git commit 53eb7b14ff6d4a920fd20f4f0dc80ad934acfe19 by Jack Hill.
Committed on 26/11/2024 at 20:12.
Pushed by jackh into branch 'master'.

Database: remove artists after removing last associated track

M  +142  -87   autotests/databaseinterfacetest.cpp
M  +191  -76   src/databaseinterface.cpp
M  +11   -0    src/databaseinterface.h

https://invent.kde.org/multimedia/elisa/-/commit/53eb7b14ff6d4a920fd20f4f0dc80ad934acfe19
Comment 6 Jack Hill 2024-11-26 20:18:24 UTC
Git commit cea8246671abefbf6239bee48d488b428e1acc25 by Jack Hill.
Committed on 26/11/2024 at 20:12.
Pushed by jackh into branch 'master'.

Database: remove genres after removing last associated track

M  +111  -0    autotests/databaseinterfacetest.cpp
M  +137  -25   src/databaseinterface.cpp
M  +13   -1    src/databaseinterface.h

https://invent.kde.org/multimedia/elisa/-/commit/cea8246671abefbf6239bee48d488b428e1acc25
Comment 7 Jack Hill 2024-11-26 20:18:25 UTC
Git commit a9a8469e708acdf7edcee24865dca88d33caef9c by Jack Hill.
Committed on 26/11/2024 at 20:12.
Pushed by jackh into branch 'master'.

Connect genreRemoved signal to data models

M  +6    -7    autotests/viewsmodeltest.cpp
M  +1    -0    src/modeldataloader.cpp
M  +2    -0    src/modeldataloader.h
M  +24   -0    src/models/datamodel.cpp
M  +2    -0    src/models/datamodel.h
M  +19   -0    src/viewslistdata.cpp
M  +2    -0    src/viewslistdata.h

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