Search the Community
Showing results for tags 'java'.
-
You have JavaScript. You need a bookmarklet. This does that. Options URL-encode reserved characters: [space], %, ", <, >, #, @, &, ? Wrap in an IIFE (anonymizing function). Minify using UglifyJS. Make sure a modern version (>= 1.7) of jQuery is available for your code. http://chriszarate.github.io/bookmarkleter/ Neat little program i found and thought i would share.
-
Hello, I'm trying to use the Java API to convert M3U playlists into Emby. The API attempts to do this with an HTTP GET, while the API does a POST. Create Playlist via web GUI: =========================== http://000.000.000.001:8096/emby/Playlists?Name=TestEmbyGui&Ids=8917e95272fb6aba425df1d2179a836c&userId=803643a6650847721111a960eeeebc7f Request.HttpMethod: GET Request.PathInfo: /emby/Playlists Request.QueryString: Name=TestEmbyGui&Ids=8917e95272fb6aba425df1d2179a836c&userId=803643a6650847721111a960eeeebc7f Request.RawUrl: /emby/Playlists?Name=TestEmbyGui&Ids=8917e95272fb6aba425df1d2179a836c&userId=803643a6650847721111a960eeeebc7f Create Playlist via API: ======================== Sending 'POST' request to URL : http://000.000.000.001:8096/emby/Playlists/?UserId=803643a6650847721111a960eeeebc7f&Ids=5b4e882625803ea3c0daa10a8696ad87%2C85af84ce364e80c2b359c3e46ff65a67&Name=embyTest&format=json Post parameters : [userId=803643a6650847721111a960eeeebc7f, format=json, Ids=5b4e882625803ea3c0daa10a8696ad87,2C85af84ce364e80c2b359c3e46ff65a67, Name=embyTest] Response Code : 400 Result : {"ResponseStatus":{"ErrorCode":"ArgumentException","Message":"No item exists with the supplied Id","StackTrace":"[CreatePlaylist: 01/24/2016 20:46:20]:\n[REQUEST: {Name:embyTest,Ids:\"5b4e882625803ea3c0daa10a8696ad87,2C85af84ce364e80c2b359c3e46ff65a67\",UserId:803643a6650847721111a960eeeebc7f}]\nSystem.ArgumentException: No item exists with the supplied Id\n at MediaBrowser.Server.Implementations.Playlists.PlaylistManager+<CreatePlaylist>c__async0.MoveNext () <0x8167b5df0 + 0x00342> in <filename unknown>:0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x8167d8f50 + 0x00038> in <filename unknown>:0 \n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x8167d8b90 + 0x00118> in <filename unknown>:0 \n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x8167d8ac0 + 0x000b3> in <filename unknown>:0 \n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x808a01030 + 0x00042> in <filename unknown>:0 \n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x808a8f540 + 0x0001f> in <filename unknown>:0 \n at MediaBrowser.Api.PlaylistService+<Post>c__async0.MoveNext () <0x8167b51f0 + 0x0052f> in <filename unknown>:0 ","Errors":[]}} What needs to be done with the Ids to get the API to recognize them? I'm currently doing this to get the Ids from the Library DB: bytes = rs.getBytes("guid"); etbi.setGuidId(asUuid(bytes).toString().replaceAll("-", "")); When I query using the guid from the web gui attempt to create a playlist - I get no rows: 0 rows returned in 0ms from: select * from TypedBaseItems where guid = X'8917e95272fb6aba425df1d2179a836c' ; Appreciate any help. Running Emby on FreeNAS 9.3 host.
-
Hello, Having issue trying to create a playlist via the java API. Can connect ok and get the access token, but seems to fail on the format of the Ids. Post parameters : [userId=319543a665084772bb4449608882bc7f, format=json, MediaType=Audio, Ids=5b4e8826-2580-3ea3-c0da-a10a8696ad87,2C85af84ce-364e-80c2-b359-c3e46ff65a67, Name=embyTest] Result : {"ResponseStatus":{"ErrorCode":"FormatException","Message":"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)." Full content of POST and server response is attached. Appreciate any help. log4j-application_save.log