Experimenting with Tuniac: WIP Subsonic support

The Tuniac forum.
Post Reply
Harteex
Posts: 100
Joined: Tue Mar 30, 2010 7:23 pm

Experimenting with Tuniac: WIP Subsonic support

Post by Harteex »

I recently installed an Airsonic (open source Subsonic) server, and thought it would be nice to be able to use Tuniac with it.
So I hacked in very basic support.

Image

As said, it's all just hacked in. But so far it connects to my server, parses some songs (too lazy to loop albums so I just get a list of 10 random songs atm), and plays them :)
For some reason it refuses to switch to the next song, but that's something for later.

Now I need to figure out how I would do this properly. I guess the best thing would be to make this some kind of plugin.
I've mostly been coding games, low level C stuff, mobile apps and various .NET programs before, so I have no experience with Win32, sockets etc. So this might take a while before I get anywhere with it :P
Brett
Site Admin
Posts: 302
Joined: Sun Mar 28, 2010 12:36 am

Re: Experimenting with Tuniac: WIP Subsonic support

Post by Brett »

Oh wow! New code to Tuniac!

In my mind all streaming services etc would be a new playlist type. Look at how the cdda stuff is handled by Tuniac with its own purpose built playlist window and playlist management code.

I would have a search box at the top right to look normal and display results as a playlist. Then allow adding the found results into other normal Tuniac playlists.

If the songs are just standard http to MP3/FLAC etc, they should just play fine (although Tuniac streaming support is super clunky).
If the server needs something nonstandard to get to the audio data you would write a plugin. The url field could be something like "funkyservice: uniqueCodeToFindSongAgain" so your new plugin can know it needs to play the track.
Harteex
Posts: 100
Joined: Tue Mar 30, 2010 7:23 pm

Re: Experimenting with Tuniac: WIP Subsonic support

Post by Harteex »

Brett wrote: Wed Jun 20, 2018 12:53 pm In my mind all streaming services etc would be a new playlist type. Look at how the cdda stuff is handled by Tuniac with its own purpose built playlist window and playlist management code.
Right now I based it on a bit of a mix of a regular playlist and the media library, but yea, cdda stuff is probably a good thing to look at for this. And yep, I already started adding a new type.

Brett wrote: Wed Jun 20, 2018 12:53 pm I would have a search box at the top right to look normal and display results as a playlist. Then allow adding the found results into other normal Tuniac playlists.
Yep, thinking this as well.
Brett wrote: Wed Jun 20, 2018 12:53 pm If the songs are just standard http to MP3/FLAC etc, they should just play fine (although Tuniac streaming support is super clunky).
If the server needs something nonstandard to get to the audio data you would write a plugin. The url field could be something like "funkyservice: uniqueCodeToFindSongAgain" so your new plugin can know it needs to play the track.
They are standard http links, however the url includes the authentication token, which is not a good thing to store for each song in the media library. So using subsonic:// or similar, and then translating it when starting to play is probably the best approach.
Brett
Site Admin
Posts: 302
Joined: Sun Mar 28, 2010 12:36 am

Re: Experimenting with Tuniac: WIP Subsonic support

Post by Brett »

And that translating part might suck a bit.
I don't think there is currently any file handler plugin system.
Eg subsonic:// currently would need to be translated by tuniac itself or the decoder. But you likely want to reuse the existing decoders for MP3 or whatever file format.

Tuniac does have file, memory and http handlers that a decoder can use if it wants. But it isn't a plugin system. Eg you could create a subsonic handler but you would then need to change the bass decoder plugin to use it which just hard codes this subsonic code somewhere else in default Tuniac stuff.

Currently:
Tuniacapp -> decoder plugin

Likely wanted:
Tuniacapp -> subsonic file handler plugin -> decoder plugin



I can give you svn access if you want to add more stuff in to Tuniac to make this work.
Harteex
Posts: 100
Joined: Tue Mar 30, 2010 7:23 pm

Re: Experimenting with Tuniac: WIP Subsonic support

Post by Harteex »

Ok nice. I'll ask for SVN access once I have something worth committing :)
Post Reply