iSub-old-swift-port
iSub-old-swift-port copied to clipboard
iTunes File Sharing
I know that this might be a long shot. Is there any chance to allow users access the iSub cache through iTunes file sharing? It would be very useful for adding songs to the cache on the case that the respective subsonic server is down/innaccessible.
Unfortunately iSub's data model doesn't allow for this. It needs metadata about each song and assume all songs have a metadata entry from the server (track name, artist, etc)
I'm currently reworking the whole data model, but it still makes similar assumptions. I can look into adding special support for this, but it's honestly not very high on my priority list as there is a lot of code to write first for the new rewrite.
I'll keep this issue open though in case I find time for it.
Now that the new data model is done, this is actually pretty doable, but would have to wait until after this release at minimum as there's a bit to it and there's no time for now.
Note to self on implementation: What I'd likely do is have a separate database with the same format as the current one for songs/artists/albums that would be used for these songs. When songs are copied over they would be scanned locally and info added to that DB from the file tags. Likely using item IDs auto incrementing from a very large value in the 64bit integer space to avoid conflicting with Subsonic and other server item IDs. Then have another tab for local items (or mix them in the current tabs) and just pull their info from the other DB. Any item with an ID above the minimum would be read from that DB.
Everything should pretty much just work, except for adding to playlists (because they get synced) and other potential gotchas with having local files in a server based music player.
I'd personally like this feature as I do sometimes want to quickly sync local songs from my laptop and I loathe the official Music app (even more so now with the latest version), so it's something I'd like to investigate in the future. But while the general implementation is fairly trivial, I'm sure there will be more edge cases than just the playlist case that will make it more difficult.
This is in the after iSub 4 milestone as that release is feature frozen to ensure it gets finished, but I like this idea.