Diedrich 355 Posted April 2, 2017 Share Posted April 2, 2017 (edited) I too am seeing the issue where episodes that are airing tonight are showing up in the Watched count. e.g. 2 / 3 (66.7%) Where 2 / 2 should be what is shown. For what it's worth - the shows that are airing tonight are being counted as Collected too. e.g. 1 / 59 (1.7%) Where it should be 0 / 59 (0%) Edited April 2, 2017 by dvgmar 1 Link to comment Share on other sites More sharing options...
Happy2Play 8282 Posted April 2, 2017 Share Posted April 2, 2017 I guess here is another example for airing tonight. Before running Statistics task today Chicago Justice 2017 6 / 6 (100%) 6 / 6 (100%) Into the Badlands 2015 8 / 8 (100%) 8 / 8 (100%) After task Chicago Justice 2017 6 / 7 (85.7%) 7 / 7 (100%) Into the Badlands 2015 8 / 9 (88.9%) 9 / 9 (100%) 1 Link to comment Share on other sites More sharing options...
CBers 6771 Posted April 2, 2017 Share Posted April 2, 2017 Running latest version (0.0.11.6), but seeing something weird with "24:Legacy": When opening the "User-based show progress", not sure what the sort order is, even though the NAME filed is green, but is starts like this: If I click on NAME twice, it sorts A-Z, just strange sort order on opening the stats. 1 Link to comment Share on other sites More sharing options...
reggi 409 Posted April 2, 2017 Author Share Posted April 2, 2017 (edited) Aaaand again a small update. Sorry for not getting bigger improvements at each update! So I fixed the sorting problem when you first load the "show progress page" and the strange "collected" episode when it is just aired. When you query for the only NON-Virtual seasons, the seasons do include virtual episodes. So that's why it got counted as collected. @@CBers As for the negative collected episodes, NO idea where that's coming from. But I'll keep looking!! Thanks again for testing all the version! Statistics 0.0.11.7.zip Edited April 2, 2017 by reggi 2 Link to comment Share on other sites More sharing options...
speechles 1919 Posted April 2, 2017 Share Posted April 2, 2017 When you query for the only NON-Virtual seasons, the seasons do include virtual episodes. So that's why it got counted as collected. You can always apply &excludelocationtypes=virtual when you use &includeitemtypes= on episodes, seasons, or series. Maybe you already knew about exclude? Sent from my Nexus 7 using Tapatalk Link to comment Share on other sites More sharing options...
reggi 409 Posted April 2, 2017 Author Share Posted April 2, 2017 @@speechles Thanks for the reply! I found the ExcludeLocationTypes array some time ago but when I use it, it always gives me the following exception: An exception of type 'System.MissingMethodException' occurred in Statistics but was not handled in user code Additional information: Method not found: 'Void MediaBrowser.Controller.Entities.InternalItemsQuery.set_ExcludeLocationTypes(MediaBrowser.Model.Entities.LocationType[])'. I'm using this code to get the episodes vvar query = new InternalItemsQuery(User) { IncludeItemTypes = new[] { typeof(Episode).Name }, Recursive = true, ParentId = show.Id, IsSpecialSeason = false, SourceTypes = new[] { SourceType.Library }, ExcludeLocationTypes = new[] { LocationType.Virtual } }; var episodes = LibraryManager.GetItemList(query).OfType<Episode>() Don't know what I'm doing wrong. But what I did before was querying all the seasons and then calculate all episodes in all seasons. Don't know why I just queried for all episodes in the first place. So now I'm doing that with LocationTypes = new[] { LocationType.FileSystem } which gives me a correct response back! Link to comment Share on other sites More sharing options...
CBers 6771 Posted April 2, 2017 Share Posted April 2, 2017 So I fixed the sorting problem when you first load the "show progress page"...... @@CBers As for the negative collected episodes, NO idea where that's coming from. But I'll keep looking!! Thanks @@reggi. I can confirm that the sorting problem is fixed. 1 Link to comment Share on other sites More sharing options...
Diedrich 355 Posted April 2, 2017 Share Posted April 2, 2017 And I can confirm that 11.7 fixed the Collected and Watched (but not aired) issue. 1 Link to comment Share on other sites More sharing options...
Happy2Play 8282 Posted April 2, 2017 Share Posted April 2, 2017 Seems somewhat resolved. Some series for tonight don't show any update and some do. Same examples from above Chicago Justice 2017 6 / 6 (100%) 6 / 6 (100%) no update Into the Badlands 2015 8 / 8 (100%) 8 / 9 (88.9%) updated 1 Link to comment Share on other sites More sharing options...
Happy2Play 8282 Posted April 2, 2017 Share Posted April 2, 2017 (edited) @@reggi Looking at the log I see that when the task is run not all series ids got queried so everything didn't get updated. So after the task has been run a couple times it updated example Chicago Justice. Would quering cache/tvdb folder instead of TVDB make any difference? Since the server is already pulling all the same information you are from TVDB. Edited April 2, 2017 by Happy2Play Link to comment Share on other sites More sharing options...
reggi 409 Posted April 3, 2017 Author Share Posted April 3, 2017 Ow yes, I forgot to mention that if you want a full tvdb update you need to remove the xml file. I'm using the same system as Emby that wil only call for an update instead of refreshing all series (saving tvdb server resources) I didn't know that Emby had a tvdb cache somewhere. I'll look into it this evening! 1 Link to comment Share on other sites More sharing options...
Dibbes 431 Posted April 8, 2017 Share Posted April 8, 2017 Love the app. Been looking for something like this for ages Do you have plans to add music, games, books, etc. to this as well, eventually? Link to comment Share on other sites More sharing options...
reggi 409 Posted April 8, 2017 Author Share Posted April 8, 2017 Love the app. Been looking for something like this for ages Do you have plans to add music, games, books, etc. to this as well, eventually? Yes, I will include that after I released the plugin to the catalog. At the moment I can't access my DEV machine or Emby server since I'm moving, but I hope to upload a final small update next week for final testing. There are also a lot of movie and show statistics that need to be added to the plugin (mostly charts). Link to comment Share on other sites More sharing options...
Diedrich 355 Posted April 8, 2017 Share Posted April 8, 2017 If you're any kind of computer guy, you'll have your computers set up before you have your clothes unpacked. 1 Link to comment Share on other sites More sharing options...
reggi 409 Posted April 8, 2017 Author Share Posted April 8, 2017 I know I will It it the last thing that I packed and the first thing that I will unpack I miss my 2 servers and computer already Link to comment Share on other sites More sharing options...
Dibbes 431 Posted April 9, 2017 Share Posted April 9, 2017 but I hope to upload a final small update next week for final testing. I hope a little faster... Just updated to 3.2.12.0 and the plugin fails to complete. It fails after 22 seconds... I'll reboot the server later and see what it does then... Link to comment Share on other sites More sharing options...
reggi 409 Posted April 9, 2017 Author Share Posted April 9, 2017 ai ai, if it still fails post your log file so I can have a look! Link to comment Share on other sites More sharing options...
CBers 6771 Posted April 9, 2017 Share Posted April 9, 2017 Scheduled Task failing here: 2017-04-09 02:21:32.4891 Info TaskManager: Executing Calculate statistics for all users 2017-04-09 02:21:32.4891 Info HttpServer: HTTP Response 204 to 192.168.1.20. Time: 2ms. http://192.168.1.150:8096/emby/ScheduledTasks/Running/d459f39d7abb81f5fcce03048a7ecf4d 2017-04-09 02:21:32.4891 Debug XmlSerializer: Serializing to file C:\Users\Media\AppData\Roaming\Emby-Server\plugins\configurations\Statistics.xml 2017-04-09 02:21:32.5122 Info HttpServer: HTTP GET http://192.168.1.150:8096/emby/ScheduledTasks?isHidden=false. UserAgent: Mozilla/5.0 (Linux; Android 7.0; Nexus 6 Build/NBD92G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.132 Mobile Safari/537.36 2017-04-09 02:21:32.5122 Info HttpServer: HTTP Response 200 to 192.168.1.20. Time: 1ms. http://192.168.1.150:8096/emby/ScheduledTasks?isHidden=false 2017-04-09 02:21:33.0347 Info HttpClient: HttpClientManager GET: https://thetvdb.com/api/Updates.php?type=all&time=1491605093 2017-04-09 02:21:38.7693 Error HttpClient: Error getting response from https://thetvdb.com/api/Updates.php?type=all&time=1491605093 *** Error Report *** Version: 3.2.11.1 Command line: C:\Users\Media\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\Media\AppData\Roaming\Emby-Server Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\System System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote server returned an error: (503) Server Unavailable. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) --- End of inner exception stack trace --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Common.Implementations.HttpClientManager.HttpClientManager.<SendAsyncInternal>d__22.MoveNext() ---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: (503) Server Unavailable. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)<--- System.AggregateException at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Common.Implementations.HttpClientManager.HttpClientManager.<SendAsyncInternal>d__22.MoveNext() InnerException: System.Net.WebException System.Net.WebException: The remote server returned an error: (503) Server Unavailable. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 2017-04-09 02:21:38.7693 Error TaskManager: Error *** Error Report *** Version: 3.2.11.1 Command line: C:\Users\Media\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\Media\AppData\Roaming\Emby-Server Application directory: C:\Users\Media\AppData\Roaming\Emby-Server\System System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Statistics.ScheduledTasks.CalculateStatsTask.UpdateTvdbConnection(ShowProgressCalculator calculator, String time, IEnumerable`1 seriesIdsInLibrary, CancellationToken cancellationToken) at Statistics.ScheduledTasks.CalculateStatsTask.CalculateTotalEpisodes(CancellationToken cancellationToken) at Statistics.ScheduledTasks.CalculateStatsTask.<Execute>d__12.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.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext() System.ArgumentNullException at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Statistics.ScheduledTasks.CalculateStatsTask.UpdateTvdbConnection(ShowProgressCalculator calculator, String time, IEnumerable`1 seriesIdsInLibrary, CancellationToken cancellationToken) at Statistics.ScheduledTasks.CalculateStatsTask.CalculateTotalEpisodes(CancellationToken cancellationToken) at Statistics.ScheduledTasks.CalculateStatsTask.<Execute>d__12.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.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext() 2017-04-09 02:21:38.7693 Info TaskManager: Calculate statistics for all users Failed after 0 minute(s) and 6 seconds Running Emby server Beta, v3.2.11.1. Link to comment Share on other sites More sharing options...
Happy2Play 8282 Posted April 9, 2017 Share Posted April 9, 2017 (edited) Looks like TVDB is down again. (503) Server Unavailable Hopefully @@reggi can use the /cache/tvdb instead and not have to worry about TVDB being up or down issue. *Only note to remember with the cache folder is it can have a custom path. Edited April 9, 2017 by Happy2Play 2 Link to comment Share on other sites More sharing options...
reggi 409 Posted April 9, 2017 Author Share Posted April 9, 2017 Aaaaaargh, I thought I fixed that issue. Seems a 503 still crashes the task. When everything is up and running again at home I'll start working on the caching update! 2 Link to comment Share on other sites More sharing options...
Diedrich 355 Posted April 9, 2017 Share Posted April 9, 2017 @@reggi BTW, your English is perfect, you type better than MOST native speakers! 1 Link to comment Share on other sites More sharing options...
reggi 409 Posted April 11, 2017 Author Share Posted April 11, 2017 Thanks for the compliment @@Diedrich There will be some delay for the new update. It seems one of my two M1015 died in the process of moving the server So I have to order a new one from Germany, it will be delivered at the end of the week. I need it to get my server (and test server) up and running again. Link to comment Share on other sites More sharing options...
CarlosLima 148 Posted April 11, 2017 Share Posted April 11, 2017 (edited) Hello everyone, First, congratulations to the author of the plugin. I read all the pages of this topic, including the comments and I think I understood the purpose of the plugin and its features, which I found to be excellent. I felt the absence of a small tutorial teaching how to get the plugin on Emby Server and I beg leave to help the most noobs in the subject. How to get the Statistics plugin on Emby: 1. Download the latest version of the plugin 2. Unzip the file and it will have a folder named 0.0.xx.x (the latter will currently be 0.0.11.7). Within this folder, there will be only file named Statistic.dll 3. Close the Emby Server 4. Paste this file in the following path: (windows) C:\Userdata\~~~~\AppData\Roaming\Emby-Server\Plugins 5. Go to scheduled tasks and run "Calculate statistics for all users" Edited April 11, 2017 by CarlosLima 1 Link to comment Share on other sites More sharing options...
CarlosLima 148 Posted April 11, 2017 Share Posted April 11, 2017 Hello For me it did not work, but I think I did something wrong, because when running Statistic, it keeps processing indefinitely. I waited for two hours and nothing happened. I'm coming for help. Link to comment Share on other sites More sharing options...
Happy2Play 8282 Posted April 11, 2017 Share Posted April 11, 2017 5. Open Emby Server, select the Manage Server tab and click on the Restore button. What is this? Step 5 should be go to scheduled tasks and run "Calculate statistics for all users" task. 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