Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show preview of folder content when browsing songs by folder #453

Open
achimmihca opened this issue Jun 28, 2024 · 2 comments
Open

Show preview of folder content when browsing songs by folder #453

achimmihca opened this issue Jun 28, 2024 · 2 comments

Comments

@achimmihca
Copy link
Collaborator

achimmihca commented Jun 28, 2024

Actual behaviour

The same folder icon is used when browsing by folder.

Expected behaviour

A preview of the folder content is shown in addition to the folder icon, similar to how Windows shows a preview of folder content.

This could include the covers of songs inside the folder.
Further, looking for a dedicated preview.png or preview.jpg as folder icon might be a good addition.

See also original question on Discord

How it was done in related UltraStar games

The following presents how it was done in previous UltraStar games for some inspiration. Keep in mind though that their approach might not be the best solution to the problem.

UltraStar Deluxe
USDX themes come with a set of common language flags, which get shown when folder view + sorting by language is enabled.
Besides that, there exists a txt file where custom image file names can be set for category names, which get shown when sorting by tags and folder view are enabled.

Vocaluxe
There is a folder called "Covers" in the game directory. The game looks for images with matching names as folder icon.

For example, if you sort games by folder name and have a folder name called "Party_Hits" containing your song folders, the game is looking for an image called "Party_Hits.jpg" in the "Covers" folder. If you order by artist and have songs for the artist "Linkin Park", it is looking for an image called "Linkin Park.jpg".

@ProsciaN
Copy link

ProsciaN commented Dec 21, 2024

Appending to this based on reply to #511

Actual behaviour

When sorting with folders, the images of the folders is just a folder.

Expected behaviour

Allow the image to be changed, or grab an existing image from the folder.

Implementation hints

My suggestion would be:
If an image exists in the root of the selected folder, use that image as the folder image
else if there exists subfolders, use the first image found in a subfolder, alphabetically.
else use the generic folder icon used now.

Ex:
Path is ./All_Songs/Artist_Folders/Song_Folders
Enter the All_Songs directory to show a list of Artist_Folders.
If there is an image in Artist_Folder, use that image as the icon for the Artist_Folder
else if there is no image in the Artist folder, check the Song_Folder in Artist_Folder for an image and use that as the image for Artist_Folder.
else use the default folder icon.

@achimmihca
Copy link
Collaborator Author

If an image exists in the root of the selected folder, use that image as the folder image

This has been implemented in Melody Mania v1.4.4-beta2.
Let me know if this works for you.

if there exists subfolders, use the first image found in a subfolder, alphabetically.

I think this is not desirable in general because

  • searching through all subfolders can have bad performance
  • multiple folders would show the same preview image, which is confusing.

Instead, I suggest to only show a preview image if it is directly in the folder. I think this is also what Windows does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants