rasmuslos / AmpFin

Native Jellyfin music player for iOS & iPadOS
Other
107 stars 10 forks source link

FR: Add Support for Music Haptics (iOS 18) #50

Open jackgraddon opened 3 weeks ago

jackgraddon commented 3 weeks ago

"Music Haptics is an accessibility feature that allows a person to indicate that they want to play haptic tracks along with known music tracks." - Apple Developer Documentation*

This is a brand new feature, and I am sure it is not high up on the list of things that should be done, but I think it would be cool to add support for. Based on my limited knowledge of how this feature works, I believe it shouldn't be too hard of an implementation. One concern is the requirement for an ISRC, as I do not know if Jellyfin has a way to push this as part of song info, or if it is possible to use the ISRC Search** database via HTTP requests or similar.

I am also not sure if you plan on using the iOS 18 Beta, but I am currently running it on an iPhone 13 Pro Max and can provide help when possible if requested.

Related Information:

rasmuslos commented 3 weeks ago

This seems really interesting but I could find a free API to resolve the ISRC id of a given song. Web scrapping is an option though, just a bad one

jackgraddon commented 3 days ago

Thought I'd take a look and see what is out there, and found a few things.

Looks like there is a MusicBrainz API that can return an ISRC, which might be worth taking a look at. You could structure an API query with the artist name, song name, and album name (provided those are set properly in the song's metadata). I am not sure if you get the MusicBrainz ID for songs from Jellyfin API queries, but if you do, I would think that would be more accurate than searching by song name.

There is also an Apple Music API that you might be able to use as well. You could try to get a "best guess" with it, but it would probably be worse than using MusicBrainz. Could be used as a backup though, if MusicBrainz fails in some way.

I think the best solution really is for Jellyfin to store ISRC in the server metadata so MusicBrainz can return one when it searches on its own, but I guess there wasn't much demand for it. Put this in their feature requests.