Subsonic C#

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

First Pass Wrapper Update

Postby Matma » Mon May 30, 2011 4:17 pm

I've commited the first pass of my attempt at a wrapper for the api calls.

Repo:
https://binary-synergy.kilnhg.com

BugTracker/Discussion/Wiki:
https://binary-synergy.fogbugz.com/

Notes:
1) Not tried the public access rights for kiln before so if you find something public that shouldnt be please be gentle/polite and report it to me and ill try and fix it.
2) Pretty much everything returns a dotnet Dataset, you can linq/query the contained tables for library info and do what ever you want with it from there.
3) Theres a noddy test application for windows to show how to call stuff.
4) ill create a noddy iis webapp next and then start playing with playback then admin type api functions later
5) ive not done any proper unit testing before so any constructive advice on that would be appreciated
6) Dev Env is VS2010 SP1 Pro, dont think ive used anything non standard but if i have tell me ill include in source if i can.
7) i want to add file/folder level permissions at some point, hence the empty database unit.
8) eventually there will be html help hence the attributes for automated documentation on the wrapper calls
9) eventually there will be a build server producing an installer for a basic iis based website (though in fairness it will really be just a file copy deal and youll have to configure your server yourself)
10) once im happy ill add people to the contributor user group but for now everyone but me has readonly to the source and read/post to the bugtracker/wiki/discussions.

Using the windows test app:
1) Always login before doing anything else (you will have to set a user, pass, server etc in the constructor of the wrapper during dev)
2) Press getall for a list of all artist indexes
3) Double click an artist id to view that artists indexes (you can only go "up" by getall again)
4) to create a playlist, getall, drill into an artist (to see songs), press create playlist, double click song id's to add to the list, give a name and press create.
5) to delete a playlist, view playlists, double click a playlist to view its songs, press delete playlist.
6) update playlist not functional though wrapper for it written.
7) app is not intended as anything other than "how to make the calls yourself examples" dont expect it to ever be fully functional, this is a wrapper not an app.
8) searching was the last thing i added and not at all tested, so have a play and see if it works (at all).
9) the rest is self explanitory.

Credit goes to the OP for how to do most of this, and the Original author of a great app that im startting to really like (recently installed user).

oh and feel free to comment on the discussion part of the bugtracker, or submit bugs and give constructive advice etc etc...

Enjoy :-)
Matma
 
Posts: 8
Joined: Mon May 23, 2011 1:34 pm

Postby vividboarder » Wed Jun 01, 2011 9:42 pm

So I think I may have become re-interested in this project. :)

My friends have started setting up Subsonic servers as well now, which got me thinking... With my API I could create an application (web or otherwise) that would allow one to set up multiple servers and browse as if it was one library!

Sound sweet?
vividboarder
 
Posts: 18
Joined: Wed Sep 22, 2010 1:37 pm
Location: 223

Postby vividboarder » Wed Jun 01, 2011 9:49 pm

Matma:

I was looking through your changes and I'm not sure how much of that I can really merge back in.

I was really looking for my API to be as light as possible. The utilities for database caching seem to me like they should really be a different binary since they are more application specific rather than part of the API itself. The inclusion of these things make it much harder for me to pull the changes in.

On the other hand, I do like what you did and I will probably do the same when I try to build my own actual front end.
vividboarder
 
Posts: 18
Joined: Wed Sep 22, 2010 1:37 pm
Location: 223

Postby Matma » Sun Jun 05, 2011 7:37 pm

Ive been working on this over the last couple of weekends doing research on formats/players/providers and such and have finally figured out how to get video and audio working using the lastest jwplayer (5.6), html5 and flowplayer without modifying subsonic or a heavy api implementation.

Im still investigating options when it comes to mobile devices and the required formats but i hope to get a response on solving that soon.

oh and if anyone knows why mp4's will playback fine on IE & Safari but not Firefox id appreciate a tip...
Matma
 
Posts: 8
Joined: Mon May 23, 2011 1:34 pm

Postby Matma » Sun Jun 26, 2011 6:02 pm

Just posted up the latest.

Done all the api methods upto 1.5.0 will add the 1.6.0 beta ones later this week.

Theres winforms and webforms test apps (the asp.net one will probably not run on your machine outside of vs2010 but look at the code for how to call stuff.

but basically: create an instance of the create a SubsonicUser and SubsonicServer populate them with your server/user details, use those to create an instance of the Subsonic wrapper and call the Login Method, then whatever methods on the Subsonic class as you please... most list like stuff returns a ds.
I've been playing files with html5 video tags just fine with the GetStreamURL and getting cover art with GetCoverArt.


I've not tested the muliple server or the API version checking support at all yet i just added this afternoon,
In fact in general its not coded or tested very well but you'll get the idea easy enough reading the code and ill try and improve that as i go.
Matma
 
Posts: 8
Joined: Mon May 23, 2011 1:34 pm

Previous

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 4 guests