Luke 36886 Posted January 5, 2017 Share Posted January 5, 2017 Update nuget and make sure it compiles Link to comment Share on other sites More sharing options...
domenic 33 Posted January 5, 2017 Share Posted January 5, 2017 (edited) EDIT Never Mind what is below.... it does implement "CancellationToken" I think I have figured it out.... looks like the new version of the server actually implements "CancellationToken", which my version does not do.....This will take some time to resolve... Edited January 5, 2017 by domenic 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted January 5, 2017 Share Posted January 5, 2017 (edited) Update nuget and make sure it compiles the source code for emby-server-3.1.2 has the following in its packages directory: Emby.XmlTv.1.0.3 MediaBrowser.Common.3.0.687 Microsoft.IO.RecyclableMemoryStream.1.2.1 PropertyChanged.Fody.1.40.3 SharpCompress.0.14.0 SQLitePCLRaw.core.1.1.1 ImageMagickSharp.1.0.0.18 MediaBrowser.Common.3.0.688 Mono.Posix.4.0.0.0 repositories.config SimpleInjector.3.2.4 SQLitePCLRaw.provider.sqlite3.net45.1.1.1 ini-parser.2.3.0 MediaBrowser.Naming.1.0.4 NLog.4.4.0-betaV15 ServiceStack.Text.4.5.4 SQLitePCL.pretty.1.1.0 UniversalDetector.1.0.1 A little odd that it has both MB.Comon versions 687 and 688 I updated nuget to the 688 version and it compiles with the same issue. I have also updated to the latest version 692 and it compiles but same issue. The startup does have an issue: Info, App, Loading VdrLiveTV, Version=1.0.6214.26289, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.Api, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.WebDashboard, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.Model, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.Common, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.Controller, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.Providers, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading Emby.Photos, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading Emby.Common.Implementations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Info, App, Loading Emby.Server.Implementations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Info, App, Loading Emby.Server.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.MediaEncoding, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading Emby.Dlna, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.LocalMetadata, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.XbmcMetadata, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.Server.Mono, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null Info, App, Loading MediaBrowser.IsoMounting.Linux, Version=1.0.6170.29462, Culture=neutral, PublicKeyToken=null Info, App, Loading Emby.Server.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Error, App, LoaderException: Could not load file or assembly or one of its dependencies. Error, App, LoaderException: Could not load file or assembly or one of its dependencies. Error, App, LoaderException: Could not load file or assembly or one of its dependencies. Error, App, LoaderException: Could not load file or assembly or one of its dependencies. Error, App, LoaderException: Could not load file or assembly or one of its dependencies. Error, App, LoaderException: Could not load file or assembly or one of its dependencies. Error, App, LoaderException: Could not load file or assembly or one of its dependencies. Error, App, LoaderException: Could not load file or assembly or one of its dependencies. but how do I track down these messages, they of course only show up when my plugin is installed... Edited January 5, 2017 by domenic Link to comment Share on other sites More sharing options...
Luke 36886 Posted January 5, 2017 Share Posted January 5, 2017 You should not be adding all of those packages to your plugin. The only one you need is MediaBrowser.Server.Core. For starters, check your plugin constructor and make sure it's not doing any work. That's always been a guideline but now it will cause problems if you are doing that. Make sure your plugin is not references any assemblies outside of the defaults and the server nuget package. If the issue persists, add more logging to your plugin to see how far it's getting in trying to load. Link to comment Share on other sites More sharing options...
domenic 33 Posted January 6, 2017 Share Posted January 6, 2017 You should not be adding all of those packages to your plugin. The only one you need is MediaBrowser.Server.Core. For starters, check your plugin constructor and make sure it's not doing any work. That's always been a guideline but now it will cause problems if you are doing that. Make sure your plugin is not references any assemblies outside of the defaults and the server nuget package. If the issue persists, add more logging to your plugin to see how far it's getting in trying to load. here is my packages.config <?xml version="1.0" encoding="utf-8"?> <packages> <package id="MediaBrowser.Common" version="3.0.692" targetFramework="net45" /> <package id="MediaBrowser.Server.Core" version="3.0.692" targetFramework="net45" /> <package id="ServiceStack.Client" version="4.5.4" targetFramework="net45" /> <package id="ServiceStack.Interfaces" version="4.5.4" targetFramework="net45" /> <package id="ServiceStack.Text" version="4.5.4" targetFramework="net45" /> </packages> Note that I have to include MediaBrowser.Common as it is a dependancy of MediaBrowser.Server.Core. The plugin uses the ServiceStack to connect to VDR and get the Channel Data baseUrl = string.Format("http://{0}:{1}", host, port); client = new JsonServiceClient(baseUrl); I don't believe there are any other extra packages... As I am not much of a programer which part of the application code is the "constructor" Domenic Link to comment Share on other sites More sharing options...
Luke 36886 Posted January 6, 2017 Share Posted January 6, 2017 Make sure you're up to date with everything here: https://emby.media/community/index.php?/topic/40669-plugin-changes-are-coming/ You cannot add third party packages. ServiceStack must be removed. Link to comment Share on other sites More sharing options...
domenic 33 Posted January 9, 2017 Share Posted January 9, 2017 So another hint then, what package does emby provide to replace ServiceStack? in this case it is used for the JsonServiceClient.... Do you know of an existing plugin that calls a restful API? Link to comment Share on other sites More sharing options...
Luke 36886 Posted January 9, 2017 Share Posted January 9, 2017 Pretty much all of them do. Here's an example that uses our IHttpClient and our IJsonSerializer https://github.com/MediaBrowser/Emby.Plugins/blob/b7d4189da5f7c0529621ea2c94b4b8c5d23288e1/MediaBrowser.Plugins.TvMazeProvider/TvMaze/TvMazeEpisodeProvider.cs Link to comment Share on other sites More sharing options...
domenic 33 Posted January 10, 2017 Share Posted January 10, 2017 (edited) Well rather than rebuild, I am going to 'borrow' the NextPVR code and use it as a template... It is mostly the same functionality... stay tuned Edited January 10, 2017 by domenic 1 Link to comment Share on other sites More sharing options...
Luke 36886 Posted January 10, 2017 Share Posted January 10, 2017 Sounds good. Link to comment Share on other sites More sharing options...
domenic 33 Posted January 13, 2017 Share Posted January 13, 2017 (edited) OK I have rebuilt based off the NextPvr code. live TV works with guide information. Have not started on timers or recordings yet. Note the same issue exists, not all of the guide data is loaded. When I have more time I will continue with the project.. I do need to make one change, the plugin icon in emby shows the Next PVR logo. Where is this stored so I can update it. MediaBrowser.Plugins.VDR.dll.zip Edited January 13, 2017 by domenic 1 Link to comment Share on other sites More sharing options...
Luke 36886 Posted January 13, 2017 Share Posted January 13, 2017 Great job. As far as the logo, you need to make sure you have changed both the plugin name and the plugin guid in assemblyinfo.cs. That will remove the nextpvr logo. Then later once this goes into the catalog, then we can look at assigning it an image. Link to comment Share on other sites More sharing options...
domenic 33 Posted January 13, 2017 Share Posted January 13, 2017 (edited) OK, I have updated the guid to be the same as the old plugin, and I get a nice blank logo. I updated the plugin in my previous post Domenic Edited January 13, 2017 by domenic Link to comment Share on other sites More sharing options...
domenic 33 Posted January 13, 2017 Share Posted January 13, 2017 I think the guide collection is over welming the vdr server. What would be the best way to "sleep" for 10 seconds between my web calls? Link to comment Share on other sites More sharing options...
Luke 36886 Posted January 13, 2017 Share Posted January 13, 2017 await Task.Delay(10000); 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted January 13, 2017 Share Posted January 13, 2017 (edited) So looking at the logs, and dumping the data returned from VDR, it all looks good, as I see all the guide data. The inserts must not be pushed into the database. Lets assume some of the records are being rejected, can you point me to the data definition of program info. Also a document that specifies the minimum requirements for a program info record. Edited January 14, 2017 by domenic 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted January 17, 2017 Share Posted January 17, 2017 (edited) I still believe there is something a little off in Emby and the Guide data storage. Here is the test I ran. I configured one channel in VDR. Configured One Day for Guide in Emby. Setup the following test code: public IEnumerable<ProgramInfo> GetPrograms(Stream stream, IJsonSerializer json, string channelId, ILogger logger) { var root = json.DeserializeFromStream<RootObject>(stream); UtilsHelper.DebugInformation(logger,string.Format("[VDR] GetPrograms Response: {0}",json.SerializeToString(root))); logger.Info(string.Format("[VDR] Display Root Object: {0}", json.SerializeToString(root))); if (root != null && root.events != null) { return root.events.Select(epg => new ProgramInfo() { ChannelId = channelId, //Id = epg.id.ToString(), Id = "124941420000" //Overview = Regex.Replace(epg.description,@"\t|\n|\r", ""), //Overview = Regex.Replace(epg.description,@"[^A-Za-z0-9]", " "), Overview = "Overview", StartDate = ApiHelper.DateTimeFromUnixTimestampSeconds(epg.start_time).ToUniversalTime(), EndDate = ApiHelper.DateTimeFromUnixTimestampSeconds(epg.start_time).ToUniversalTime().AddSeconds(epg.duration), //Genres = new List<string>(), Genres = new List<string>(new string[] {"sports", "movie"}), //OriginalAirDate = parse infom from Description //OriginalAirDate = null, OriginalAirDate = DateTime.UtcNow, //Name = Regex.Replace(epg.title,@"[^A-Za-z0-9]"," "), Name = "Name", //OfficialRating = parse infom from Description //OfficialRating = null, OfficialRating = "G", //CommunityRating = null, // not provided CommunityRating = 10, //EpisodeTitle = epg.short_text, EpisodeTitle = "EpisodeTitle", Audio = ParseAudio(epg.description), IsHD = false, // not provided default to false IsRepeat = false, IsSeries = epg.description.Contains("series", StringComparison.OrdinalIgnoreCase), HasImage = (epg.images > 0), ImageUrl = (epg.images > 0) ? (_baseUrl + "/events/image/1/" + epg.id.ToString(_usCulture)) : null, IsNews = epg.description.Contains("news", StringComparison.OrdinalIgnoreCase), IsMovie = epg.description.Contains("movie", StringComparison.OrdinalIgnoreCase), IsKids = epg.description.Contains("kids", StringComparison.OrdinalIgnoreCase), IsSports = epg.description.Contains("sports", StringComparison.OrdinalIgnoreCase) || epg.description.Contains("Sports non-event", StringComparison.OrdinalIgnoreCase) || epg.description.Contains("Sports event", StringComparison.OrdinalIgnoreCase) || epg.description.Contains("Sports talk", StringComparison.OrdinalIgnoreCase) || epg.description.Contains("Sports news", StringComparison.OrdinalIgnoreCase) }); } return new List<ProgramInfo>(); } Note I am hard coding most of the variables - the exceptions are ChannelId, StartDate, and EndDate. The result should be a fully populated Guide of one channel with the same program. Which I see. When I select the channel I get the screen shot attached. It appears sometimes I get Name and sometimes I get Name - EpisodeTitle but all of the entries should be identical, with the hardcoded values Name - EpisodeTitle.Any idea based on the code why some of the data would be dropped? Edited January 17, 2017 by domenic 1 Link to comment Share on other sites More sharing options...
Luke 36886 Posted January 17, 2017 Share Posted January 17, 2017 can you show a screenshot? 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted January 17, 2017 Share Posted January 17, 2017 can you show a screenshot? Just attached it.... 1 Link to comment Share on other sites More sharing options...
Luke 36886 Posted January 17, 2017 Share Posted January 17, 2017 Try refreshing the guide data. also you just edited your post and now the code is all on one line and hard to read. 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted January 17, 2017 Share Posted January 17, 2017 Try refreshing the guide data. also you just edited your post and now the code is all on one line and hard to read. That is with the updated Guide Data....(code replaced) 1 Link to comment Share on other sites More sharing options...
Luke 36886 Posted January 17, 2017 Share Posted January 17, 2017 it's due to the IsSeries property. When that is false, EpisodeTitle is not used. 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted January 17, 2017 Share Posted January 17, 2017 (edited) Ok, thanks, I have added all the channels back and have some missing data..... Attached is the raw data from the log file (logger.Info(string.Format("[VDR] Display Root Object: {0}", json.SerializeToString(root))); My data for this channel does not show up until 3:00 PM CST, the rest is dropped. data.txt Edited January 17, 2017 by domenic 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted January 17, 2017 Share Posted January 17, 2017 (edited) There are 3 missing entries: Look for Start times before Unix Time Stamp 1484686800. is it possible to access this data with the API and a curl call? Edited January 17, 2017 by domenic 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted January 18, 2017 Share Posted January 18, 2017 The only oditity I see with the data is the non printable chars /n and /r that is in the description data but it does exist in every description. If it helps I could tar some/all of the filesystem data (emby data) and share it for you to review? 1 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