namidaco / namida

A Beautiful and Feature-rich Music & Video Player with Youtube Support, Built in Flutter
Other
2.31k stars 139 forks source link

[FEATURE REQUEST] Allow customization of text in the notification #370

Closed Homebad closed 4 days ago

Homebad commented 1 month ago

Hello, I've recently started using Namida and have been enjoying it, thank you for the work in creating a good open source music player app.

I have mp3 files that do not have album art, but I do have the title of the album saved in the metadata.

I would like to be able to display the name of the album in the notification, so that I can easily check what album a song is from by only looking at my lock screen, without needing to unlock my phone and open the app.

Customization of what metadata displays in the notification seems like a reasonable way to implement this feature.

Thank you!

MSOB7YY commented 1 month ago

hey thanks for liking the app! ur request is actually one of the first features i thought about but abandoned later, bcz by default the title, artist & album fields are all displayed in the notification.

its worth noticing that since android 11-12, it probably ignores the custom text and displays whatever it wants from the metadata we send to the notification

here is a ss of what it looks like in android 10 style notification

photo_2024-10-15_04-52-53

Homebad commented 1 month ago

Ah, I only have the song title and artist on my phone. Do you know if there's anything that can be done about that?

MSOB7YY commented 1 month ago

do u know any other player that displays custom text on ur android version?

Homebad commented 1 month ago

I do not, I'm on Android 14.

MSOB7YY commented 1 month ago

then unfortunately its an android thing. u may try disabling media notification in quick settings (or enable media notification as normal notification, not sure what the setting called and not sure if this will do it lmao)

p.s: this one of the reasons i personally still dont wanna update my android

Homebad commented 1 month ago

Doesn't look like that works. but thanks for trying.

One thing I did remember, for my use case, the file name would also work fine. Occasionally when using VLC on android, the media player notification would show the file name instead of the song name/artist, but I could not figure out when it would do so.

MSOB7YY commented 1 month ago

again they probably send the filename as a "title metadata" what you asking for now is deceiving the android with a custom "title metadata", which is not a good idea

if the android doesnt support custom text then we can do nothing about it 🤷

see here: https://github.com/namidaco/namida/blob/4ec263603dbd9b212c1bab6b829d25693b491927/lib/base/audio_handler.dart#L1919-L1936