rasmuslos / AmpFin

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

feat: Save audio type on download #30

Closed gnattu closed 3 months ago

gnattu commented 3 months ago

This will save file mime-type on download into the offlineTrack model, and infer the file url from that key.

To keep backward compatibility it will use flac when this key is missing which is the same as the old behavior, so that media is playable in the old version will continue to work.

To workaround a SwiftData migration bug, it renamed the ReducedAlbum's name key to albumName, because SwiftData will attempt to create two ZNAME column if we don't rename this. Ask Apple for why, but to make it work we have to perform such rename for now.

This also contains a small fix for the container matching. For aiff, it should be aiff,aif, and not aiff, aif|aiff as the aiff encoding is treated as PCM on server, so we only need to match the container not the encoding.

gnattu commented 3 months ago

Closed as the migration issue is still not resolved.

gnattu commented 3 months ago

The migration issue is more severe than I previously thought. It seems like any change to the schema used in persistence manager would cause this error and I have not find any way to solve this yet.