Jump to content

4.4.0.15 breaks /Users/{UserId}/Views


Recommended Posts

Posted

Hi,

It looks like 4.4.0.15 breaks /Users/{UserId}/Views in the API, so no way to get folders for a user from the API.

Regards

Posted

Hi there, why do you feel this way?

PenkethBoy
Posted

just tested this and working fine with beta server .15

{
    "Items":  [
                  {
                      "Name":  "Audio Books",
                      "ServerId":  "5fc81c140c6946c7b79f4f95f0594dc5",
                      "Id":  "3aeb99515c5a4d67fe12f482a99e3d6c",
                      "Etag":  "fa40a0456ca9155055ec9e399f5d2d68",
                      "DateCreated":  "2018-12-20T17:39:13.0000000+00:00",
                      "CanDelete":  false,
                      "CanDownload":  false,
                      "PresentationUniqueKey":  "3aeb99515c5a4d67fe12f482a99e3d6c",
                      "SortName":  "audio books",
                      "ExternalUrls":  [

                                       ],
                      "Path":  "D:\\Emby-Stable\\root\\default\\Audio Books",
                      "Taglines":  [

                                   ],
                      "Genres":  [

                                 ],
                      "PlayAccess":  "Full",
                      "RemoteTrailers":  [

                                         ],
                      "ProviderIds":  {

                                      },
                      "IsFolder":  true,
                      "ParentId":  "2",
                      "Type":  "CollectionFolder",
                      "Studios":  [

                                  ],
                      "GenreItems":  [

                                     ],
                      "TagItems":  [

                                   ],
                      "UserData":  {
                                       "PlaybackPositionTicks":  0,
                                       "PlayCount":  0,
                                       "IsFavorite":  false,
                                       "Played":  false
                                   },
                      "ChildCount":  3,
                      "DisplayPreferencesId":  "3aeb99515c5a4d67fe12f482a99e3d6c",
                      "Tags":  [

                               ],
                      "PrimaryImageAspectRatio":  1.817174515235457,
                      "CollectionType":  "audiobooks",
                      "ImageTags":  {
                                        "Primary":  "4da01a85d7503752897f21d8baa202c3"
                                    },
                      "BackdropImageTags":  [

                                            ],
                      "LockedFields":  [

                                       ],
                      "LockData":  false
                  },...........
Posted

Not for me...

 

I attach two files, one for .14 and one for .15

 

.14

post-363485-0-31159400-1582225898_thumb.png

 

.15

post-363485-0-55155600-1582225902_thumb.png

  • Like 1
Happy2Play
Posted

I get the same 500 internal server error.

PenkethBoy
Posted

Works fine using the API - IF you add your user authentication access token to the call i.e. &api_key=<accesstoken>

 

Fails in swagger as it does not do this - although it says its not needed

 

Also although Swagger states the IncludeExternalContent is Required - actually its not as leaving it off and the call still works with the access token

Posted (edited)

All my calls are with api_key=<key>

It worked in .14, doesn't work in .15 with exactly same code, i didn't modify my app. And it worked in swagger in .14

 

Picture attached

post-363485-0-46760700-1582269495_thumb.png

Edited by AntaresFR
Posted

I made some tests, and results are stranges

I used a USER1 and USER2, a USER1ACCESSTOKEN, a USER2ACCESSTOKEN and an APIKEY i set in the api key section of the back end.

I always used this APIKEY in my app and it worked with .14 version, not in .15.

So here are results of what i test :

 

/Users/USER1/Views?api_key=USER1ACCESSTOKEN ==> Works, i got USER1 folders

/Users/USER1/Views?api_key=USER2ACCESSTOKEN ==> Works, but i got USER2 folders ??

/Users/USER1/Views?api_key=APIKEY ==> No longer works, but it was the case until .15 version and it returned USER1 folders as expected

PenkethBoy
Posted (edited)

i have never used the apikey option - i always authenticate on each script run with user details to obtain an accesstoken at that time

 

as for the /users/user1... and user2accesstoken - thats working as i would expect - but would not work IF user2 was a restricted user and you accessed something that required admin access - which views dont (at least at the moment)

[edit] Sorry miss read what you wrote - thats the opposite of what i would expect - if user2 cant see user1 views - then it should return none - thats without testing myself

 

so what appears to have changed in your tests is that the APIKEY option is not working - could be a bug or intentional (although i'm not sure why that would be)

 

Another thing - i'm using Windows and you appear in your latest screenshot to be using Linux - this has caused different results in Emby before - although i dont recall that for the api in recent times

Edited by PenkethBoy
Posted (edited)

Yes it looks like it's a problem with the global api key introduced since .15 :)

I'm on windows too, i made a curl call from a linux console cause it was faster to do and screen :)

I dont use authentifaction in my app cause it's a custom personnal layer I develop over emby in my domotic app. I dont want family member to input their password in this app, so i use the apikey with custom scripts (they never see the url or the api key).

Edited by AntaresFR
PenkethBoy
Posted

Ok - so we need @@Luke input to confirm if this is a change or a bug

  • Like 1
Posted

Ah it looks like it's corrected in .17 :)

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