Jump to content

Problem with /Items/{Id}/Similar Endpoint


AntaresFR

Recommended Posts

AntaresFR

I, i think there is a little problem with /Items/{Id}/Similar Endpoint.

If I want only TVShows to be retrieven from the call, I put IncludeItemTypes=Series on the query but it returns Movie items too.

 

Regards

Link to comment
Share on other sites

murxer83

Hello, I do it like that

only Series:

params = {"fields": "ParentId,Overview,ProductionYear,SortName,Genres,Studios,People,Runtime,OfficialRating,CommunityRating,ProductionLocations",
                  "startIndex": startIndex,
                  "limit": limit
                  }
        url = '{url}/Shows/{Id}/Similar'.format(url=self.connector.url, Id=Id)

url = /Show/Id/Similar

and only Movies:

params = {"fields": "ParentId,Overview,ProductionYear,SortName,Genres,Studios,People,Runtime,OfficialRating,CommunityRating,ProductionLocations",
                  "startIndex": startIndex,
                  "limit": limit
                  }
        url = '{url}/Movies/{Id}/Similar'.format(url=self.connector.url, Id=Id)

url = /Movies/Id/Similar

greetings murxer

Link to comment
Share on other sites

AntaresFR

Hi,  thank you for the reply;

I tried with 

{url}/Shows/{Id}/Similar

But same result as 

/Items/{Id}/Similar?IncludeItemTypes=Series

I think one is an alias of the other.

Edited by AntaresFR
Link to comment
Share on other sites

murxer83

and if you include that in the params  ExcludeItemTypes="Movie".

Since I am currently working on a plugin myself, I have already noticed that some parameters have no effect.

Link to comment
Share on other sites

AntaresFR
3 minutes ago, murxer83 said:

and if you include that in the params  ExcludeItemTypes="Movie".

Since I am currently working on a plugin myself, I have already noticed that some parameters have no effect.

Same, I think the parameter doesn't work cause i can put anything in IncludeItemTypes and nothing change. ExcludeItemTypes does nothing too.

Link to comment
Share on other sites

murxer83

 

In the Swagger Ui the following is written at similar

http://my_server_ip:8096/swagger

 

"/Items/{Id}/Similar": {
      "get": {
        "tags": [
          "LibraryService"
        ],
        "summary": "Gets similar items",
        "description": "Requires authentication as user",
        "externalDocs": {
          "description": "API Documentation: Item Information",
          "url": "https://github.com/MediaBrowser/Emby/wiki/Item-Information"
        },
        "operationId": "getItemsByIdSimilar",
        "produces": [
          "application/json",
          "application/xml"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "Id",
            "description": "Item Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "query",
            "name": "IncludeItemTypes",
            "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.",
            "type": "string",
            "collectionFormat": "multi"
          },
          {
            "in": "query",
            "name": "EnableImages",
            "description": "Optional, include image information in output",
            "type": "boolean"
          },
          {
            "in": "query",
            "name": "EnableUserData",
            "description": "Optional, include user data",
            "type": "boolean"
          },
          {
            "in": "query",
            "name": "ImageTypeLimit",
            "description": "Optional, the max number of images to return, per image type",
            "type": "integer",
            "format": "int32"
          },
          {
            "in": "query",
            "name": "EnableImageTypes",
            "description": "Optional. The image types to include in the output.",
            "type": "string"
          },
          {
            "in": "query",
            "name": "UserId",
            "description": "Optional. Filter by user id, and attach user data",
            "type": "string",
            "format": "guid"
          },
          {
            "in": "query",
            "name": "Limit",
            "description": "Optional. The maximum number of records to return",
            "type": "integer",
            "format": "int32"
          },
          {
            "in": "query",
            "name": "Fields",
            "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls",
            "type": "string",
            "collectionFormat": "multi"
          }
        ],
        "responses": {
          "200": {
            "description": "Operation successful. Returning a QueryResult<BaseItemDto> object.",
            "schema": {
              "$ref": "#/definitions/QueryResult_BaseItemDto"
            }
          },
          "400": {
            "$ref": "#/responses/400"
          },
          "401": {
            "$ref": "#/responses/401"
          },
          "403": {
            "$ref": "#/responses/403"
          },
          "404": {
            "$ref": "#/responses/404"
          },
          "5XX": {
            "$ref": "#/responses/5XX"
          }
        },
        "security": [
          {
            "apikeyauth": [ ]
          },
          {
            "embyauth": [ ]
          }
        ],
        "x-RequiredAuthentication": "Requires authentication as user"

 

should actually work

{
            "in": "query",
            "name": "IncludeItemTypes",
            "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.",
            "type": "string",
            "collectionFormat": "multi"
          }

 

Link to comment
Share on other sites

Hi.  The documentation may be incorrect at this point.  Since no Emby apps filter those lists in any way, those parameters have never been used and so may not be implemented at this time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...