XBMC-JSON an open source .NET XBMC JSON-RPC Library

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
dora Offline
Junior Member
Posts: 26
Joined: Sep 2010
Reputation: 0
Post: #11
dstruktiv Wrote:If anyone would like to join the project let me know Smile

I implemented System.GetInfoLabels function.
Do you want me to send a patch?
find quote
Johnsel Offline
KinEmote Co-Founder
Posts: 76
Joined: Oct 2009
Reputation: 10
Location: Maastricht, Netherlands
Post: #12
If anyone's interested, i'm currently rewriting the library to work entirely asynchronous. Hope to get it done in a couple of days.
find quote
MigaXBMC Offline
Junior Member
Posts: 1
Joined: Dec 2010
Reputation: 0
Post: #13
Many heartfelt thanks guys.. With all the time and effort you put into these developments, I can't say thank you enough.

Cheers!
find quote
bartdesign Offline
Member
Posts: 75
Joined: Jun 2008
Reputation: 0
Location: Netherlands
Post: #14
Keep up the good work, i'm using it in some of my home automation projects Wink
find quote
bartdesign Offline
Member
Posts: 75
Joined: Jun 2008
Reputation: 0
Location: Netherlands
Post: #15
Btw there is a bug in the GetRecentlyAddedEpisodes method:

Code:
if (query["movies"] != null)
{
       foreach (JObject item in (JArray)query["movies"])
       {

Change to

Code:
if (query["episodes"] != null)
{
       foreach (JObject item in (JArray)query["episodes"])
       {
find quote
grimstoner Offline
Junior Member
Posts: 9
Joined: Dec 2010
Reputation: 0
Post: #16
Can I make a suggestion?

How about making every object that can be added to a playlist (i.e. Song, Movie, MusicVideo etc.) inherit a common interface/implement a common abstract class? I think at the least that Label is a common field among them all (maybe even a common ID field). That would allow you to do the following :

Code:
CommonPlayListItem pi;

            switch (currentDisplayMode)
            {
               case DisplayMode.AudioPlaying:
                  pi = mainConn.AudioPlaylist.GetCurrentItem();
                  break;

               case DisplayMode.PicturesPlaying:
                  pi = mainConn.PicturePlayer.GetCurrentItem();
                  break;

               case DisplayMode.VideoPlaying:
                  pi = mainConn.VideoPlaylist.GetCurrentItem();
                  break;
            }

            WriteToLCD(pi.Label);

Also... How about adding property changed notifiers? Then your library can also be used in MVVM Silverlight or WPF applications.

PM me so I can contribute.

EDIT: Don't think Mono supports INotifyPropertyChanged, so if you're aim is compatibility, ignore.
(This post was last modified: 2011-01-03 12:46 by grimstoner.)
find quote
grimstoner Offline
Junior Member
Posts: 9
Joined: Dec 2010
Reputation: 0
Post: #17
Also... How about adding a XbmcEventListener class, that opens a TCP port to the XBMC server's port 9090 to listen for notifications generated by XBMC?
find quote
Montellese Online
Team-XBMC Developer
Posts: 2,790
Joined: Jan 2009
Reputation: 20
Location: Switzerland
Post: #18
grimstoner Wrote:Also... How about adding a XbmcEventListener class, that opens a TCP port to the XBMC server's port 9090 to listen for notifications generated by XBMC?

If you don't need the .NET Micro Framework support you can check out my C# library which provides events derived from notifications: https://sourceforge.net/projects/xbmcjsonsharp/

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
dstruktiv Offline
Member
Posts: 66
Joined: Jul 2010
Reputation: 0
Location: New Zealand
Post: #19
grimstoner Wrote:Can I make a suggestion?

How about making every object that can be added to a playlist (i.e. Song, Movie, MusicVideo etc.) inherit a common interface/implement a common abstract class? I think at the least that Label is a common field among them all (maybe even a common ID field).

Cheers for the suggestion, just added abstract XbmcMediaItem class which all other media items inherit from, it contains Id and Label.

Have also started adding Event Listener class. I'm purely working on the async fork as this type of thing just isn't well suited to synchronous I/O. Will commit async fork soon, if you'd like to use the changes in the current sync project you'll have to copy them over sorry.

XBMC Remote7 an XBMC library browser/remote for Windows Phone 7.
Xbmc-Json a .NET XBMC JSON API Library.
Xbmc-Remote-Control a .NET based XBMC library browser and remote for Windows, Linux and OS X.
find quote
dstruktiv Offline
Member
Posts: 66
Joined: Jul 2010
Reputation: 0
Location: New Zealand
Post: #20
Have just committed the async lib @ http://code.google.com/p/xbmc-json/ under trunk/xbmc-json-async

It also has code in there for virtual remote and the event listener (Have only added 3 events so far but adding more is super simple).

There's also a little test client included in the project that shows the basics of using everything asynchronously.

XBMC Remote7 an XBMC library browser/remote for Windows Phone 7.
Xbmc-Json a .NET XBMC JSON API Library.
Xbmc-Remote-Control a .NET based XBMC library browser and remote for Windows, Linux and OS X.
find quote
Post Reply