GithubHelp home page GithubHelp logo

mediabrowser / emby.apiclient Goto Github PK

View Code? Open in Web Editor NEW
78.0 78.0 29.0 2.28 MB

ApiClient allows .NET apps to easily access the Emby API

Home Page: http://emby.media

License: MIT License

C# 100.00%

emby.apiclient's Introduction

Emby Server

Emby Server is a personal media server with apps on just about every device.

It features a REST-based API with built-in documention to facilitate client development. We also have client libraries for our API to enable rapid development.

Emby Apps

New Users

If you're a new user looking to install Emby Server, please head over to emby.media

Developer Info

Api Docs

How to Build a Server Plugin

Visit our community:

http://emby.media/community

Images

Android Android Html5 iOS iOS Emby Theater Emby Theater Windows Phone Roku iOS Dashboard iOS iOS

emby.apiclient's People

Contributors

7illusions avatar apondman avatar brokeh avatar inrego avatar lukepulverenti avatar neyesha avatar redshirtmb avatar scottisafool avatar softworkz avatar tanathos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emby.apiclient's Issues

AuthenticateUserAsync Security Issue

Hi
I've just checked the method "AuthenticateUserAsync". As far as i can see plain in-hashed password are also posted when authorizing.

args["username"] = Uri.EscapeDataString(username);
args["pw"] = password;

I set the args["pw"] = "" in my project but it needs to be fixed here as well.

Edit: Also for the very same reason if your password includes characters such as "&" then the http post method will fail no matter what.

LoginToEmbyConnect signIn fails

Serialization of the response fails

Exception: Exception thrown: 'Newtonsoft.Json.JsonSerializationException' in mscorlib.ni.dll ("Error converting value {null} to type 'System.Boolean'. Path 'User.IsSupporter', line 1, position 262."). Exception thrown: 'Newtonsoft.Json.JsonSerializationException' in mscorlib.ni.dll ("Error converting value {null} to type 'System.Boolean'. Path 'User.IsSupporter', line 1, position 262.") 24.16s [112]

GetCriticReviews Not implemented

Getting a error when trying to use the sdk after the latest update..
Method 'GetCriticReviews' in type 'MediaBrowser.ApiInteraction.ApiClient' from assembly 'MediaBrowser.ApiInteraction.Portable, Version=3.0.5075.511, Culture=neutral, PublicKeyToken=null' does not have an implementation.

GetSearchHintsAsync seems to ignore the IncludeItemTypes array in SearchQuery

I've already opened this issue in the Emby repository, but probably this is the best place.

As for the title: I'm building a search query via the C# client that looks like this:

SearchQuery searchQuery = new SearchQuery();
searchQuery.UserId = client.CurrentUserId;
searchQuery.IncludeArtists = false;
searchQuery.IncludeGenres = false;
searchQuery.IncludePeople = false;
searchQuery.IncludeStudios = false;
searchQuery.IncludeMedia = true;
searchQuery.SearchTerm = "Iron";
searchQuery.IncludeItemTypes = new string[] { "MusicAlbum" };
searchQuery.Limit = 24;

var res = await client.GetSearchHintsAsync(searchQuery);

But in the SearchHints results I don't only have music albums with the search term "Iron", but also songs.

I'm trying different configurations of the query, also with the ExcludeItemTypes, but I always get items of all types...

Username needs to be encoded

When signing in, the username needs to be UriEncoded otherwise any usernames with & in them will fail to sign in.

ApiClient not including Artists when provided

When calling GetItemsAsync and the ItemQuery has the Artists property used, those artists are not being put into the url, so the api returns all albums rather than the ones for the users specified.

Sessions fields not updating

There are few fields on the /sessions call that are not reflecting the correct values all the time.

The ones I have noticed are
isPaused
NowViewing fields - Name, Id
NowPlaying fields

Are these lines still required in .net standard?

var sp = request.ServicePoint;
if (_httpBehaviorPropertyInfo == null)
{
_httpBehaviorPropertyInfo = sp.GetType().GetProperty("HttpBehaviour", BindingFlags.Instance | BindingFlags.NonPublic);
}
_httpBehaviorPropertyInfo.SetValue(sp, (byte)0, null);

For me, these lines are causing exceptions now that I am using .NET Standard 2.0
I guess the hack doesn't work anymore with the new target. Could we possibly remove them, or implement another workaround if they are still required?

Provide a WORKING Example?

The Example documentation appears to be incomplete and possibly out of date...

Ideally it would be great to have 'sample' projects to pull down or bare minimum if the example code could be copy and paste-able to a working state so that we are able to see the expected output in it's most basic form..?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.