speechles 1917 Posted February 18, 2017 Share Posted February 18, 2017 (edited) url = GetServerBaseUrl() if channel.ChannelId <> invalid url = url + "/Channels/" + HttpEncode(channel.ChannelId) + "/Items?userId=" + getGlobalVar("user").Id else url = url + "/Channels/" + HttpEncode(channel.Id) + "/Items?userId=" + getGlobalVar("user").Id end if if channel.ChannelId <> invalid q = { folderid: channel.Id } query.Append(q) end if for each key in query url = url + "&" + key +"=" + HttpEncode(query[key]) end for @@Luke got another quick question for you regarding the trailer channel. The above code works fine. This is what you would use to get the channel, and then the individual folder within each channel. This all works as expected. query.AddReplace("filters","isFavorite") When you add the above to the code, right before the last "foreach" loop that builds the query, this makes the server return a http 500 error. In the server logs it shows as a permission error that the json it wants to return is already in use by another process. This used to work just fine it is only with recent server builds that this has broken. It is this issue that broke the trailers in blueneon because I used the 2nd row to display favorites from the folder the user was within in the channel. My remedy in the interim is to disable the favorites row when used with channels. The real question, Can filters: isFavorite work with /channels/ and folderid anymore? Edited February 18, 2017 by speechles Link to comment Share on other sites More sharing options...
Luke 37050 Posted February 18, 2017 Share Posted February 18, 2017 Can you show me the server log? thanks. Link to comment Share on other sites More sharing options...
speechles 1917 Posted February 18, 2017 Author Share Posted February 18, 2017 (edited) 2017-02-17 16:31:30.9893 Info HttpServer: HTTP Response 200 to 192.168.1.137. Time: 0ms. http://192.168.1.249:8096/emby/Items/584b16a6f854186fa631665e1e094c5f/Images/Primary/0?EnableImageEnhancers=true&format=jpg&BackgroundColor=%23000000&tag=a80eab912100046eac2c757ad739eaa7&width=266&height=150 2017-02-17 16:31:31.0674 Info HttpServer: HTTP Response 200 to 192.168.1.137. Time: 78ms. http://192.168.1.249:8096/emby/Items/d21459f0f98410023448131a21154086/Images/Primary/0?EnableImageEnhancers=true&format=jpg&BackgroundColor=%23000000&tag=a4d7867a3550b603a0d55d61ce7cc919&width=266&height=150 2017-02-17 16:31:31.0831 Info HttpServer: HTTP Response 200 to 192.168.1.137. Time: 141ms. http://192.168.1.249:8096/emby/Users/ea4b2d910d8e4049a2f3b20c2ca789d1/Items?IncludeItemTypes=MusicVideo,Video&sortby=DateCreated&filters=IsUnplayed&sortorder=Descending&recursive=true&fields=PrimaryImageAspectRatio%2COverview%2CParentId&imagetypelimit=1&ParentId=de2438e7f9d543f12d0bf6730fd613ef&excludelocationtypes=Virtual&StartIndex=12&Limit=100 2017-02-17 16:31:31.1299 Info HttpServer: HTTP Response 200 to 192.168.1.137. Time: 281ms. http://192.168.1.249:8096/emby/Users/ea4b2d910d8e4049a2f3b20c2ca789d1/Items?IncludeItemTypes=MusicVideo,Video&sortby=DateCreated&filters=IsUnplayed&sortorder=Descending&recursive=true&fields=PrimaryImageAspectRatio%2COverview%2CParentId&imagetypelimit=1&ParentId=75f6136cc6dbad7748d600533fe4e928&excludelocationtypes=Virtual&StartIndex=12&Limit=100 2017-02-17 16:31:31.8956 Info HttpServer: HTTP GET http://192.168.1.249:8096/emby/Channels/cddcf570335ca8b34a168cbfbbd3872f/Items?userId=ea4b2d910d8e4049a2f3b20c2ca789d1&sortby=PremiereDate%2CSortName&sortorder=Descending&fields=Overview%2CPrimaryImageAspectRatio&folderid=718bb905fd5526f22cc06fccf81da329&StartIndex=0&Limit=8. UserAgent: Roku/DVP-7.51 (297.51E04095A) 2017-02-17 16:31:31.9112 Info HttpServer: HTTP GET http://192.168.1.249:8096/emby/Channels/cddcf570335ca8b34a168cbfbbd3872f/Items?userId=ea4b2d910d8e4049a2f3b20c2ca789d1&sortby=PremiereDate%2CSortName&filters=isFavorite&sortorder=Descending&fields=Overview%2CPrimaryImageAspectRatio&folderid=718bb905fd5526f22cc06fccf81da329&StartIndex=0&Limit=8. UserAgent: Roku/DVP-7.51 (297.51E04095A) 2017-02-17 16:31:32.1143 Error HttpServer: Error processing request *** Error Report *** Version: 3.1.5.0 Command line: C:\Users\sppechles-i3\AppData\ Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.2.9200.0 64-Bit OS: True 64-Bit Process: True Processor count: 4 Program data path: C:\Users\sppechles-i3\AppData\Roaming\Emby-Server Application directory: C:\Users\sppechles-i3\AppData\Roaming\Emby-Server\System System.IO.IOException: The process cannot access the file 'C:\Users\sppechles-i3\AppData\Roaming\Emby-Server\metadata\channels\cddcf570335ca8b34a168cbfbbd3872f\ec245ccd1f9e05aedde8d043fd90f264\channelmediasources.json' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at Emby.Common.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Boolean isAsync) at Emby.Common.Implementations.Serialization.JsonSerializer.SerializeToFile(Object obj, String file) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItemEntity>d__55.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItemsInternal>d__45.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItems>d__46.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Api.ChannelService.<Get>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.ServiceExecGeneral.<Execute>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.ServiceController.<Execute>d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.RestHandler.<ProcessRequestAsync>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpServer.HttpListenerHost.<RequestHandler>d__61.MoveNext() System.IO.IOException at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at Emby.Common.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Boolean isAsync) at Emby.Common.Implementations.Serialization.JsonSerializer.SerializeToFile(Object obj, String file) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItemEntity>d__55.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItemsInternal>d__45.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItems>d__46.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Api.ChannelService.<Get>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.ServiceExecGeneral.<Execute>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.ServiceController.<Execute>d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.RestHandler.<ProcessRequestAsync>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpServer.HttpListenerHost.<RequestHandler>d__61.MoveNext() 2017-02-17 16:31:32.1143 Info HttpServer: HTTP Response 500 to 192.168.1.137. Time: 203ms. http://192.168.1.249:8096/emby/Channels/cddcf570335ca8b34a168cbfbbd3872f/Items?userId=ea4b2d910d8e4049a2f3b20c2ca789d1&sortby=PremiereDate%2CSortName&filters=isFavorite&sortorder=Descending&fields=Overview%2CPrimaryImageAspectRatio&folderid=718bb905fd5526f22cc06fccf81da329&StartIndex=0&Limit=8 2017-02-17 16:31:32.1143 Error HttpServer: Error processing request *** Error Report *** Version: 3.1.5.0 Command line: C:\Users\sppechles-i3\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.2.9200.0 64-Bit OS: True 64-Bit Process: True Processor count: 4 Program data path: C:\Users\sppechles-i3\AppData\Roaming\Emby-Server Application directory: C:\Users\sppechles-i3\AppData\Roaming\Emby-Server\System System.IO.IOException: The process cannot access the file 'C:\Users\sppechles-i3\AppData\Roaming\Emby-Server\metadata\channels\cddcf570335ca8b34a168cbfbbd3872f\1487aa7b47e875e008ef490ed9c578ae\channelmediasources.json' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at Emby.Common.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Boolean isAsync) at Emby.Common.Implementations.Serialization.JsonSerializer.SerializeToFile(Object obj, String file) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItemEntity>d__55.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItemsInternal>d__45.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItems>d__46.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Api.ChannelService.<Get>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.ServiceExecGeneral.<Execute>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.ServiceController.<Execute>d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.RestHandler.<ProcessRequestAsync>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpServer.HttpListenerHost.<RequestHandler>d__61.MoveNext() System.IO.IOException at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at Emby.Common.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Boolean isAsync) at Emby.Common.Implementations.Serialization.JsonSerializer.SerializeToFile(Object obj, String file) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItemEntity>d__55.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItemsInternal>d__45.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Channels.ChannelManager.<GetChannelItems>d__46.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Api.ChannelService.<Get>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.ServiceExecGeneral.<Execute>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.ServiceController.<Execute>d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServiceStack.Host.RestHandler.<ProcessRequestAsync>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpServer.HttpListenerHost.<RequestHandler>d__61.MoveNext() 2017-02-17 16:31:32.1143 Info HttpServer: HTTP Response 500 to 192.168.1.137. Time: 219ms. http://192.168.1.249:8096/emby/Channels/cddcf570335ca8b34a168cbfbbd3872f/Items?userId=ea4b2d910d8e4049a2f3b20c2ca789d1&sortby=PremiereDate%2CSortName&sortorder=Descending&fields=Overview%2CPrimaryImageAspectRatio&folderid=718bb905fd5526f22cc06fccf81da329&StartIndex=0&Limit=8 2017-02-17 16:32:57.1964 Info App: Udp message sent to 192.168.1.115:48835 2017-02-17 16:32:57.2121 Info App: Udp message sent to 192.168.1.115:48835 2017-02-17 16:32:58.4309 Info HttpServer: HTTP GET http://192.168.1.249:8096/emby/system/info/public?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 5.0.1; Nexus 7 Build/LRX22C) 2017-02-17 16:32:58.4621 Info HttpServer: HTTP Response 200 to 192.168.1.115. Time: 31ms. http://192.168.1.249:8096/emby/system/info/public?format=json 2017-02-17 16:32:58.5246 Info HttpServer: HTTP GET http://192.168.1.249:8096/emby/system/info?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 5.0.1; Nexus 7 Build/LRX22C) 2017-02-17 16:32:58.5559 Info HttpServer: HTTP Response 200 to 192.168.1.115. Time: 31ms. http://192.168.1.249:8096/emby/system/info?format=json 2017-02-17 16:32:58.5871 Info HttpServer: HTTP GET http://192.168.1.249:8096/mediabrowser/users/ea4b2d910d8e4049a2f3b20c2ca789d1?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 5.0.1; Nexus 7 Build/LRX22C) 2017-02-17 16:32:58.5871 Info HttpServer: HTTP Response 200 to 192.168.1.115. Time: 0ms. http://192.168.1.249:8096/mediabrowser/users/ea4b2d910d8e4049a2f3b20c2ca789d1?format=json 2017-02-17 16:32:58.6496 Info HttpServer: HTTP GET http://192.168.1.249:8096/emby/Users/ea4b2d910d8e4049a2f3b20c2ca789d1/Offline?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 5.0.1; Nexus 7 Build/LRX22C) 2017-02-17 16:32:58.6496 Info HttpServer: HTTP Response 200 to 192.168.1.115. Time: 0ms. http://192.168.1.249:8096/emby/Users/ea4b2d910d8e4049a2f3b20c2ca789d1/Offline?format=json Above are the logs for that time. The full logs are 53MB. System.IO.IOException: The process cannot access the file 'C:\Users\sppechles-i3\AppData\Roaming\Emby-Server\metadata\channels\cddcf570335ca8b34a168cbfbbd3872f\1487aa7b47e875e008ef490ed9c578ae\channelmediasources.json' because it is being used by another process. The blueneon app shows the same 500 errors occuring. When a 500 occurs on any row it stops the entire screen from generating. Edited February 18, 2017 by speechles Link to comment Share on other sites More sharing options...
Luke 37050 Posted February 19, 2017 Share Posted February 19, 2017 Thanks, I see the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now