yoheimuta / RxMusicPlayer

A reactive library to make it easy for audio playbacks using RxSwift.
MIT License
58 stars 8 forks source link

Feature Request: Set metadata to default properties in case of empty or missing original download #39

Closed rastaman111 closed 2 years ago

rastaman111 commented 2 years ago

I can use any audio files in the application. When the file has a complete metadata, then in MPMediaItemPropertyTitle, MPMediaItemPropertyArtist, MPMediaItemPropertyArtwork, and if something is missing then an empty line in this place, how can I substitute my values if empty?

found that this function is updating data private func updateNowPlayingInfo () -> Observable <()> {

yoheimuta commented 2 years ago

how can I substitute my values if empty?

@rastaman111 Not really. You can set an item to your complete metadata, but it also skips downloading metadata. Your request needs a small change on the library. What do you think?

rastaman111 commented 2 years ago

how can I substitute my values if empty?

@rastaman111 Not really. You can set an item to your complete metadata, but it also skips downloading metadata.

Your request needs a small change on the library. What do you think?

I think it is necessary to do it by default so that when there is no metadata, then by default substitute the values ​​that are on the player's screen, these are: title, artist and picture

image image

yoheimuta commented 2 years ago

@rastaman111 I added the feature by #42. Can you give it a try https://github.com/yoheimuta/RxMusicPlayer/releases/tag/2.2.0?

rastaman111 commented 2 years ago
Снимок экрана 2021-10-10 в 21 39 49

I am using SPM and I get this error

rastaman111 commented 2 years ago

I solved this problem and tested the new version. Everything works!