Jump to content

204 on calls to Library/Media/Updated


asg

Recommended Posts

Update:

 

Okay. I don't really understand what changed but it is actually working now.

The library item is refreshed 1 minute after I make a call to the API. I'm still getting a 204 response code on every call even though the item is found.

 

Original post:

 

Hi all,

 

I've been trying to use the API to trigger media updates using the /Library/Media/Updated method but it seems no matter how I call it I always get a 204 No Content response back from Emby and no update happens.

 

Here is what I've been doing:

 

Emby version 4.1.2.0 is running in a LXC container with Debian 10 installed.

 

My media content is hosted on a NAS and Emby access it through NFS shares mapped to local folders in the container.

Furthermore the library folders are configured with the SMB network paths for the NAS.

Local paths:

/mnt/media/movies

/mnt/media/tvseries

 

Network (SMB) paths:

\\diskstation\movies

\\diskstation\tvseries

 

This is the call I'm making to Emby:

http://emby.localdomain:8096/emby/Library/Media/Updated?api_key=bf3a397293104e3c8be1888c03873ade

This is the JSON content I'm POST'ing:

{"Updates":[{"Path":"/mnt/media/movies/Aliens (1986)/Aliens (1986) [1080p remux].mkv","UpdateType":"Created"}]}

And this is the response I get:

Response: StatusCode: 204, ReasonPhrase: 'No Content', Version: 1.1, Content: System.Net.Http.HttpConnection+HttpConnectionResponseContent, Headers:
{
  Access-Control-Allow-Headers: Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, Slug, Transfer-Encoding, Want-Digest, X-MediaBrowser-Token, X-Emby-Token, X-Emby-Authorization
  Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, OPTIONS
  Access-Control-Allow-Origin: *
  Server: UPnP/1.0
  Server: DLNADOC/1.50
  Date: Sun, 22 Sep 2019 19:24:32 GMT
  Content-Length: 0
}

 

This is what the call looks like in the Emby server log:

2019-09-22 19:27:00.865 Info HttpServer: HTTP POST http://emby.localdomain:8096/emby/Library/Media/Updated. UserAgent: 2019-09-22 19:27:00.866 Debug LibraryMonitor: New file refresher created for /mnt/media/movies/Aliens (1986)/Aliens (1986) [1080p remux].mkv2019-09-22 19:27:00.866 Info HttpServer: HTTP Response 204 to 192.168.0.185. Time: 1ms. http://emby.localdomain:8096/emby/Library/Media/Updated

I've tried using both the local and network paths as the "Path" parameter, same result. I've tried different files, same result. The path is the right one, I can paste it into a shell and it works. The libraries are accessible to Emby they work fine with library scans, the web-player works, clients work. The only thing that doesn't seem to see my files is the API.

 

Can anyone spot what I'm doing wrong?  Because I'm frankly out of ideas at this point.

Edited by asg
Link to comment
Share on other sites

Yeah, I think part of my confusion was that I kept getting 204 responses back even when it started working. I was expecting a response 200 from looking at the definition in Swagger.

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...