INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MCWS NuGet package  (Read 6567 times)

pahunt

  • World Citizen
  • ***
  • Posts: 236
MCWS NuGet package
« on: August 30, 2014, 04:55:40 pm »

I've recently been writing some C# applications that consume the Media Core Web Service and whilst working on them I kept thinking how much easier it would be if there were .NET wrapper classes and so I have written some and published them to NuGet. These classes only cover the playback and DSP sections at the moment but my plan is to expand them to cover the entire service.

What is the status of this package?

Consider it a beta at this stage. I have tested it myself and it all works for me but don't be surprised if you find issues.

What are the prerequisites for using this package?

The package has been written using .NET framework version 2 and so it can be used in any .NET application written using that version of the framework or later. The package itself has no dependencies on any other NuGet package.

How do I install these classes?

NuGet packages are very easy to install but if you are not familiar with the process then I suggest you take a trip to https://www.nuget.org where you will find lots of helpful documentation. The NuGet page for the package is here:

https://www.nuget.org/packages/JRiverMCWS/

How do I use these classes?

Here is a very simple example, written in C#, that connects to Media Center and toggles the play/pause state.
    
Code: [Select]
var mediaCenter = new MediaCenter();
mediaCenter.Connect("xxxxxx"); // Replace xxxxxx with your access key
mediaCenter.Playback.PlayPause();
   
I have tried to make the structure of the classes as simple and self-explanatory as possible and I have added Intellisense documentation to help with that. However, I recommend that you take a look in the Media Center wiki if you are unsure of what functions you need

http://wiki.JRiver.com/index.php/Web_Service_Interface

Are there any known issues?

Here are the issues that I am aware of, hopefully someone can help me figure them out.

1. The Playlist function has a parameter called "NoUI". I couldn't work out what this is for and so I have not included it as a parameter.
2. The PlayLive function has a parameter called "Mode" that is not documented and for this reason I have not included the function at all.
3. I can't get the SetPlaylist function to work and so for this reason I have not included the function at all.
   
What guarantees do I get with this NuGet package?

None at all. All I can tell you is that these classes work for me and while I'm very keen to support them and help resolve any issues, I can't promise I'll be able to solve your particular problem.

pahunt

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS NuGet package
« Reply #1 on: August 31, 2014, 03:43:02 am »

Release notes

0.1.0.21 (2014-10-25)

1. Fixed issue where File.SetInfo would fail if a value that included a comma was supplied.

0.1.0.20 (2014-10-24)

1. Added Files.Search overload to return an MPL file.
2. Added default values for parameters wherever it was appropriate.

0.1.0.19 (2014-10-22)

1. Added File.GetInfo

0.1.0.18 (2014-10-21)

1. Added File.SetInfo
2. Added Files.Search

0.1.0.17 (2014-09-10)

1. Added DSP.Loudness (requires Media Center 20.0.20)

0.1.0.16 (2014-09-10)

1. Added parameter "relative" to DSP.SetTempo (requires Media Center 20.0.14)

0.1.0.14 (2014-09-09)

1. Added parameter "hidden" to Playback.Zones (requires Media Center 20.0.13)
2. Added DSP.SetTempo (requires Media Center 20.0.13)

0.1.0.12 (2014-08-31)

1. Added DSP class.

0.1.0.10 (2014-08-30)

1. Initial release.

StFeder

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1493
  • Fight! You may win. If you don't, you already lost
Re: MCWS NuGet package
« Reply #2 on: September 11, 2014, 02:11:30 pm »

I'm not sure, if I'm at the right corner, but it looks kind of promising to me. To be honest: I don't have an idea of how anything connected to MCWS works, but I am looking for a possibility to control the (relative) tempo of a song via a global hotkey. Global hotkeys for MC are defined in the resource.xml located in the custom resources directory. As far as I know it only can be used to run Media Center Core Commands or any kind of command line which would work in Windows "Run"-Box.

So here is my question (and again, please don't bash me if I'm at the total wrong place here):
Is it possible to get a command line which would control the relative tempo of song using your package?
Logged

pahunt

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS NuGet package
« Reply #3 on: September 12, 2014, 09:44:09 am »

I'm not sure, if I'm at the right corner, but it looks kind of promising to me. To be honest: I don't have an idea of how anything connected to MCWS works, but I am looking for a possibility to control the (relative) tempo of a song via a global hotkey. Global hotkeys for MC are defined in the resource.xml located in the custom resources directory. As far as I know it only can be used to run Media Center Core Commands or any kind of command line which would work in Windows "Run"-Box.

So here is my question (and again, please don't bash me if I'm at the total wrong place here):
Is it possible to get a command line which would control the relative tempo of song using your package?

No sorry, if I'm understanding your goal correctly, I don't think this NuGet package is going to help.

pahunt

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS NuGet package
« Reply #4 on: October 02, 2014, 07:06:27 am »

Version 0.1.0.17 uploaded

Groundhog

  • Recent member
  • *
  • Posts: 26
Re: MCWS NuGet package
« Reply #5 on: October 21, 2014, 11:55:28 am »

Paul,

This is almost exactly what I need. Almost.

So, first of all, thank you! I think this will be tremendously helpful.

Second, I'd like to request a particular bit of functionality. Obviously, you are writing this for your use, so I'm grateful to get whatever you're willing to share. No expectations here.

I'm hoping to write a C# application to assist me in curating my classical music recording library. Functionally, this involves getting the metadata for a set of files, modifying that metadata, and then updating MC with the modified metadata.

I think I'll need this functionality from the MCWS:

Files Search - to get the file keys
File Get Info - to get the file metadata
File Set Info - to update the metadata

Thanks,
-Brent

Logged

pahunt

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS NuGet package
« Reply #6 on: October 21, 2014, 12:07:31 pm »

Hi Brent,

Glad to see someone taking an interest  :)

Let me see what I can do for you, give me a few days.

pahunt

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS NuGet package
« Reply #7 on: October 21, 2014, 02:47:53 pm »

Version 0.1.0.18 uploaded

pahunt

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS NuGet package
« Reply #8 on: October 22, 2014, 08:30:18 am »

Version 0.1.0.19 uploaded

pahunt

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS NuGet package
« Reply #9 on: October 24, 2014, 09:51:14 am »

Version 0.1.0.20 uploaded

pahunt

  • World Citizen
  • ***
  • Posts: 236
Re: MCWS NuGet package
« Reply #10 on: October 25, 2014, 08:59:21 am »

Version 0.1.0.21 uploaded

danrien

  • Galactic Citizen
  • ****
  • Posts: 371
  • Chillin
Re: MCWS NuGet package
« Reply #11 on: May 24, 2015, 09:42:13 am »

Good idea!
Logged
http://davidvedvick.info

"Always be yourself. Unless you can be Batman. Always be Batman." - Anonymous
Pages: [1]   Go Up