Giter Club home page Giter Club logo

jellyfin-apiclient-javascript's People

Stargazers

 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

jellyfin-apiclient-javascript's Issues

WanAddress is still used

This is just a reminder that we need to checkup on the ramifications of removing the WanAddress from PublicSystemInfo.

The WanAddress is used in https://github.com/jellyfin/jellyfin-apiclient-javascript/blob/master/src/connectionmanager.js#L66 despite being removed from the response in jellyfin/jellyfin#1770
This line did not exist in the version of the apiclient that jf-web uses, so it was assumed not to be in use.

It probably relates to falling back to a remote connection if a local connection could not be established.

Client fails to fetch information

Jellyfin recently switched to /jellyfin/ url prefix from /emby/. This library still uses /emby/ and hence fetch requests fails.

Current behavior

The client fetches http://localhost:8096/emby/System/Info/Public
and the response is 302 Found to index.html instead of expected json.

HTTP/1.1 302 Found
Content-Length: 0
Date: Sun, 15 Dec 2019 06:57:29 GMT
Location: /jellyfin/web/index.html
Server: Kestrel

Expected behavior

The client should fetch http://localhost:8096/jellyfin/System/Info/Public

Response:

HTTP/1.1 200 OK
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, OPTIONS
Access-Control-Allow-Origin: *
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: Sun, 15 Dec 2019 06:57:38 GMT
Expires: 0
Server: Microsoft-NetCore/2.0, UPnP/1.0 DLNADOC/1.50
Transfer-Encoding: chunked
Vary: Accept-Encoding

{
    "Id": "0b9a3884f83e4a28a515d5565ada5d50",
    "OperatingSystem": "Linux",
    "ProductName": "Jellyfin Server",
    "ServerName": "blackbox",
    "Version": "10.4.3"
}

Readme outdated? Tells me "yarn is outdated, use npm instead"

Hey,
when trying to following the README.md, I get following error:

yarn docs
yarn run v1.22.10
error [email protected]: The engine "yarn" is incompatible with this module. Expected version "YARN NO LONGER USED - use npm instead.". Got "1.22.10"
error Commands cannot run with an incompatible environment.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

ReferenceError: self is not defined

Have this error when trying to import apiclient

Code:

import apiclient from "jellyfin-apiclient";

console.log(apiclient("some url"))

Only jellyfin-apiclient module is installed from npm
Installing from source yield the same thing

Node v16.13.2
npm v8.8.0

Promise never fulfills

Trying to play around with a few things and because of no detailed documentation I'm just going off JSDoc and https://github.com/jellyfin/jellyfin-react-client and have stumbled on an issue.

In the connection file you are calling getApiClient().getPublicSystemInfo(), this returns a promise that won't fulfill if the connection fails.

If the server url is correct and the web api returns the requested data the promise is resolved and fulfilled no problem. Now if the server url is incorrect the console spits out;
Request failed to http://localhost:8097/emby/System/Info/Public TypeError: Failed to fetch Attempting reconnection GET http://localhost:8097/emby/System/Info/Public net::ERR_CONNECTION_REFUSED tryReconnect:
and the promise is indefinitely left in pending.

I've only tested on Windows 10, Node v12 in electron only. I have tried using the library in both my own project and also building the react client to see the issue persist in both.

Need documentation,...

Https://github.com/jellyfin/jellyfin-react-client
I want to contribute code in this project, but there is no interface documentation. The trick is that I only use javascript, so it is very difficult for me to determine the interface information by looking at the server code.
I exported a swagger json file myself and imported it into swaggerUI, but the interface parameters and return values are rarely described.
https://app.swaggerhub.com/apis/vdts/jellyfin-server_api/1.0.0
If you have a slightly detailed document, there may be more front-end developers willing to join

ApiClient.getItem makes a GET request to /Items/{itemId} when userId not present, which isn't a valid method

The ApiClient.getItem method makes a GET request to /Items/{itemId} when the userId parameter is not present, which causes a 405 Method Not Allowed response. This function is used by the web player's SyncPlay integration, which prevents SyncPlay from working.

I haven't found a GET /Items/{itemId} endpoint, so I think this isn't an issue with Jellyfin itself but rather with the API client. Note that GET Users/{userId}/Items/{itemId} is an endpoint that exists, and it's what gets used outside of SyncPlay.

Relevant code:

https://github.com/jellyfin/jellyfin-apiclient-javascript/blob/a0143bcd7dc8389c51bcb5cabebcbd1d13e31d49/src/apiClient.js#L782-L794

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.