chef 3810 Posted September 13, 2021 Posted September 13, 2021 (edited) 2 hours ago, Cheesegeezer said: @chef I loaded up the dll and everything is broken for me. and I don't know where to start. I can see that the only thing changed is the repo here for me in the chapterEntry and Chapter Task. ITitleSequenceRepository repo = IntroSkipPluginEntryPoint.Instance.Repository; It is the chapter task. Give the Triggers a value. I'm sorry. I broke a bunch of $#!&. I shouldn't have touched the thing this morning. I have only about 5 more hours of pureeing for the elderly before I'll fix it. Again I apologize. Edited September 13, 2021 by chef
Cheesegeezer 3104 Posted September 13, 2021 Posted September 13, 2021 15 minutes ago, chef said: It is the chapter task. Give the Triggers a value. I'm sorry. I broke a bunch of $#!&. I shouldn't have touched the thing this morning. I have only about 5 more hours of pureeing for the elderly before I'll fix it. Again I apologize. Don't worry chef mate, just revert everything back and push your commit. I can then create a pull request by adding in all of mine.... I hope, i'm not great with git either. lol you enjoy pulsing that liquidizer and holding their teeth while they eat hahaha. We will get there.... but on a plus note, @rbjtech tested my latest version with the new Title Sequence entry and the intro end removed and it looks like it has worked pretty good. Works with emby's 5min auto inserts and his real chapter information. just need to sort out our code puree and create a dish out of it. 1
rbjtech 5284 Posted September 13, 2021 Posted September 13, 2021 While we wait for the outcome on the real 'Intro Skip' button - the 'Title Sequence' being inserted into the existing chapters is working well. There are a couple of issues still to resolve, but the majority of my test shows had perfect placement of the sequence. Some examples below - 1. 'Title Sequence' added for episodes with 'Real' chapters. Original chapter points are untouched. 2. 'Title Sequence' added for episodes with 'Auto' chapters. Auto chapter points are trimmed accordingly, resorting back to the Original 5 minute chapters after. 3. 'Title Sequence' added late into the show (after Chapter 3).. again, Original chapter points are untouched. 4
chef 3810 Posted September 13, 2021 Posted September 13, 2021 2 hours ago, rbjtech said: While we wait for the outcome on the real 'Intro Skip' button - the 'Title Sequence' being inserted into the existing chapters is working well. There are a couple of issues still to resolve, but the majority of my test shows had perfect placement of the sequence. Some examples below - 1. 'Title Sequence' added for episodes with 'Real' chapters. Original chapter points are untouched. 2. 'Title Sequence' added for episodes with 'Auto' chapters. Auto chapter points are trimmed accordingly, resorting back to the Original 5 minute chapters after. 3. 'Title Sequence' added late into the show (after Chapter 3).. again, Original chapter points are untouched. That is super cool! Man, we did that guys! Congratulations to us all for a good job! Seriously cool stuff there. It is unique to emby, which makes it good, even if we get some imprecise results, the bulk of it is good. 5 1
Micael456 45 Posted September 14, 2021 Posted September 14, 2021 I hate to be the one that throws a downer on things after the above, but my main emby instance keeps dying if I try to run the detection sequence, even down as two concurrencies. Anyone got an idea of how I might capture some useful logs from the os, given that the embyserver log just stops dead?
Cheesegeezer 3104 Posted September 14, 2021 Posted September 14, 2021 46 minutes ago, Micael456 said: I hate to be the one that throws a downer on things after the above, but my main emby instance keeps dying if I try to run the detection sequence, even down as two concurrencies. Anyone got an idea of how I might capture some useful logs from the os, given that the embyserver log just stops dead? Hi Michael, wait for next release. I would uninstall the plugin for now. when you say main Emby instance keeps dying, is this because of lack of power in the machine or emby just shuts down. Can you remind us what your specs are and OS is please. thanks
rbjtech 5284 Posted September 14, 2021 Posted September 14, 2021 1 hour ago, Micael456 said: I hate to be the one that throws a downer on things after the above, but my main emby instance keeps dying if I try to run the detection sequence, even down as two concurrencies. Anyone got an idea of how I might capture some useful logs from the os, given that the embyserver log just stops dead? Does it die during the Fingerprint (FP) process (the first task to run) or the Detection (the second task) ? If the the FP has completed - what is the titlesequence dB file size ?
Cheesegeezer 3104 Posted September 14, 2021 Posted September 14, 2021 On 10/09/2021 at 17:47, rbjtech said: One to add - Could you change the log Class for the Chapter Insertion to use 'Intro Skip' instead of App - then we keep all the logging together I don't know how to do this. These are our only options public interface ILogger { void Debug(string message, params object[] paramList); void Debug(ReadOnlyMemory<char> message); void Error(string message, params object[] paramList); void Error(ReadOnlyMemory<char> message); void ErrorException(string message, Exception exception, params object[] paramList); void Fatal(string message, params object[] paramList); void FatalException(string message, Exception exception, params object[] paramList); void Info(string message, params object[] paramList); void Info(ReadOnlyMemory<char> message); void Log(LogSeverity severity, string message, params object[] paramList); void Log(LogSeverity severity, ReadOnlyMemory<char> message); void LogMultiline(string message, LogSeverity severity, StringBuilder additionalContent); void Warn(string message, params object[] paramList); void Warn(ReadOnlyMemory<char> message);
rbjtech 5284 Posted September 14, 2021 Posted September 14, 2021 1 hour ago, Cheesegeezer said: I don't know how to do this. These are our only options public interface ILogger { void Debug(string message, params object[] paramList); void Debug(ReadOnlyMemory<char> message); void Error(string message, params object[] paramList); void Error(ReadOnlyMemory<char> message); void ErrorException(string message, Exception exception, params object[] paramList); void Fatal(string message, params object[] paramList); void FatalException(string message, Exception exception, params object[] paramList); void Info(string message, params object[] paramList); void Info(ReadOnlyMemory<char> message); void Log(LogSeverity severity, string message, params object[] paramList); void Log(LogSeverity severity, ReadOnlyMemory<char> message); void LogMultiline(string message, LogSeverity severity, StringBuilder additionalContent); void Warn(string message, params object[] paramList); void Warn(ReadOnlyMemory<char> message); @chef should be able to advise, as this is how the other two tasks (FP & Detect) log - I would presume it's in the code if you have access to that ? The above appear to be log 'types' not classes but maybe the one below allows you to change the 'Class' ? void Log(LogSeverity severity, string message, params object[] paramList); Thanks Cheese - this isn't urgent by the way, it just makes it easier to watch the live logging of things if I can filter by the same 'Intro Skip' Class ..
Micael456 45 Posted September 14, 2021 Posted September 14, 2021 2 hours ago, Cheesegeezer said: wait for next release. I would uninstall the plugin for now. Yeah I had to do that already. 2 hours ago, Cheesegeezer said: specs are and OS Odroid N2 (https://www.hardkernel.com/shop/odroid-n2-with-4gbyte-ram/) running Ubuntu 18.04 LTS. Boots from an A2 SD card. 2 hours ago, rbjtech said: Detection (the second task) Second task. If you recall, the first one had some speed issues for me, but that's more of a case of balancing the concurrent threads. The second task just straight up causes the process to terminate at some point, no more emby.
rbjtech 5284 Posted September 14, 2021 Posted September 14, 2021 1 minute ago, Micael456 said: Second task. If you recall, the first one had some speed issues for me, but that's more of a case of balancing the concurrent threads. The second task just straight up causes the process to terminate at some point, no more emby. ok thanks - so if it's the second task, then I believe the size of the dB may have a big impact - especially as your system only has 4Gb RAM overall - how big is the titlesequence.db file - in <emby root>/programdata/data ? When you run the task - does it instantly crash or does memory rapidly shoot up and then crash ?
Micael456 45 Posted September 14, 2021 Posted September 14, 2021 6 minutes ago, rbjtech said: ok thanks - so if it's the second task, then I believe the size of the dB may have a big impact - especially as your system only has 4Gb RAM overall - how big is the titlesequence.db file - in <emby root>/programdata/data ? When you run the task - does it instantly crash or does memory rapidly shoot up and then crash ? It's actually in /var/lib/emby/data on Linux? ~787MB though.
chef 3810 Posted September 14, 2021 Posted September 14, 2021 2 hours ago, Cheesegeezer said: I don't know how to do this. These are our only options public interface ILogger { void Debug(string message, params object[] paramList); void Debug(ReadOnlyMemory<char> message); void Error(string message, params object[] paramList); void Error(ReadOnlyMemory<char> message); void ErrorException(string message, Exception exception, params object[] paramList); void Fatal(string message, params object[] paramList); void FatalException(string message, Exception exception, params object[] paramList); void Info(string message, params object[] paramList); void Info(ReadOnlyMemory<char> message); void Log(LogSeverity severity, string message, params object[] paramList); void Log(LogSeverity severity, ReadOnlyMemory<char> message); void LogMultiline(string message, LogSeverity severity, StringBuilder additionalContent); void Warn(string message, params object[] paramList); void Warn(ReadOnlyMemory<char> message); @Cheesegeezer, when you create the log. Send in (ILogManager logManager). Then in the constructor use: 'ILogger Log = logManager.GetLogger(Plugin.Instance.Name)' This will use the name in the log entry 2
rbjtech 5284 Posted September 14, 2021 Posted September 14, 2021 7 minutes ago, Micael456 said: It's actually in /var/lib/emby/data on Linux? ~787MB though. ok - so reasonably big. When you run the task - does it instantly crash or does memory rapidly shoot up and then crash ? How much memory do you have 'free' ? The reason I'm going down this route is in the early days of the Plugin, @chef was loading the entire dB into memory to do the query .. .. thus if you did not have that memory free - then things would grind to a halt as it needed to page memory to disk. However, the query was changed to only query the relevant show - thus significantly reducing the dB memory overhead. So I'm wondering if your issue and this are somehow linked.. ?
chef 3810 Posted September 14, 2021 Posted September 14, 2021 2 minutes ago, rbjtech said: ok - so reasonably big. When you run the task - does it instantly crash or does memory rapidly shoot up and then crash ? How much memory do you have 'free' ? The reason I'm going down this route is in the early days of the Plugin, @chef was loading the entire dB into memory to do the query .. .. thus if you did not have that memory free - then things would grind to a halt as it needed to page memory to disk. However, the query was changed to only query the relevant show - thus significantly reducing the dB memory overhead. So I'm wondering if your issue and this are somehow linked.. ? Which version are you on @Micael456? I think Dave and I have something new today. Let's see what happens today, and if we still see high memory usage like that, then @rbjtech is right, we have no choice but to snag a season, process it fully and move on. But that will mean writing a hefty rework of the two main tasks. 1
BillOatman 596 Posted September 14, 2021 Posted September 14, 2021 @chefmemory usage and garbage collection can be tricky. Once you get that release out if you want to shoot me the source and let me know which tasks are being the pigs I can take a look and see if I can find anything.
chef 3810 Posted September 14, 2021 Posted September 14, 2021 Hey @Cheesegeezer here is what I just pushed to git. Fixed weirdness in title sequence task progress reporting Fixed Log reporting plugin name in ChapterManager Added GetBaseTitleSequenceResults from Database (get the entire season worth of BaseTitleSequence, instead of the entire result including duration and fingerprint) I hope I did right things syncing the project. 1
chef 3810 Posted September 14, 2021 Posted September 14, 2021 (edited) 1 hour ago, BillOatman said: @chefmemory usage and garbage collection can be tricky. Once you get that release out if you want to shoot me the source and let me know which tasks are being the pigs I can take a look and see if I can find anything. That would be great. Did you get my github invite? EDIT: do you think we should be forcing GC in the task? Edited September 14, 2021 by chef
rbjtech 5284 Posted September 14, 2021 Posted September 14, 2021 5 minutes ago, chef said: Hey @Cheesegeezer here is what I just pushed to git. Fixed weirdness in title sequence task progress reporting Fixed Log reporting plugin name in ChapterManager Added GetBaseTitleSequenceResults from Database (get the entire season worth of BaseTitleSequence, instead of the entire result including duration and fingerprint) I hope I did right things syncing the project. Awesome - we are getting to the nice to have's - cool ! The last item on the above list - was that the item which I was referring to in the response to @Micael456 re memory usage ? 1
chef 3810 Posted September 14, 2021 Posted September 14, 2021 @Cheesegeezer The only thing that is causing some issues with the push and pulls is in the csproj file. because you have the xcopy set to a path on your dev machine, I have to keep removing it on each sync update.
chef 3810 Posted September 14, 2021 Posted September 14, 2021 @BillOatman sorry I didn't want to get this lost. Do you think we should be forcing GC in the Task?
Cheesegeezer 3104 Posted September 14, 2021 Posted September 14, 2021 1 minute ago, chef said: @Cheesegeezer The only thing that is causing some issues with the push and pulls is in the csproj file. because you have the xcopy set to a path on your dev machine, I have to keep removing it on each sync update. Hi Chef, i use that xcopy so when i build it just copies from the bin folder to the emby server plugin folder. Saves dicking about with copy and pasting everytime. If your happy I will push my latest changes and we should be good for a release 1
chef 3810 Posted September 14, 2021 Posted September 14, 2021 59 minutes ago, Cheesegeezer said: Hi Chef, i use that xcopy so when i build it just copies from the bin folder to the emby server plugin folder. Saves dicking about with copy and pasting everytime. If your happy I will push my latest changes and we should be good for a release cool, yeah let's do this! I wired up the remove all endpoint, but I'm not at a point in my scan where I can test it... so, I'll wait until the task completes and then test the remove all button.
chef 3810 Posted September 14, 2021 Posted September 14, 2021 (edited) Ah Man! It's just to high... what do you guys think? A delay in the task, and maybe a forced garbage collection? It should be mentioned that forced garbage collection isn't a great thing to do. But, this might be one of those instances where we break the 'rules'... @Cheesegeezer Should the TitleSequenceDetectionManager be IDisposable? Then we create an instance each time? I think the current TitleSequenceDetectionManager is a singleton... Edited September 14, 2021 by chef
Recommended Posts