umbrellaplug / umbrellaplug.github.io

Umbrella Kodi Addon Official
115 stars 17 forks source link

Episode not marked as watched after playback #2

Closed IG2022 closed 2 years ago

IG2022 commented 2 years ago

Just wanted to say thanks for doing this. I've been looking for a venom fork that is actually going to be maintained. As the title mentioned episodes are not getting marked as watched after playback. I noticed this issue with other venom forks but I haven't really been able to get help. I have trakt authorized and continuous playback enabled and trakt scrobbles enabled. When I watch an episode all the way through normally it isn't marked as watched at the end of the episode, however if I forward through to the end it is marked as watched. I'm not sure what's causing this behavior but I thought id report it and see maybe if it's something you are experiencing too. I also noticed that if I use continuous playback the second episode watched is sometimes marked as watched but never the initial episode played.

I've attached a log for you.Log

Thanks again for doing this. I'm really digging the new icons btw they look really clean.

umbrellaplug commented 2 years ago

Looking into this. I will attempt to duplicate the behavior.

IG2022 commented 2 years ago

Looking into this. I will attempt to duplicate the behavior.

Thanks alot for looking into this. Everything else is working great. Let me know if you are able to recreate it and if you have any follow up questions.

umbrellaplug commented 2 years ago

Can you provide me with any steps or anything to duplicate the issue?

I changed my settings to autoplay, enabled scrobbling in settings in "Trakt" section, Enabled PlayNext popup in settings Umbrella settings under TV Shows section, I changed my settings in Kodi>Settings>Player> Play next video automatically and set it to "Episodes".

I picked a show I had never watched before and played the first 4 episodes. I never clicked the popup for next when it came up, I just let it play through. I picked "Love, Death, and Robots" because it's only 13 minutes an episode and was a little quicker for me to test than a full 30-45 minute show. After 45 minutes of strange I stopped and all 3 first episodes show a checkbox next to them indicating watched. I checked online and Trakt shows me ready to watch Episode 4 next as well.

Can you check these settings and try it out and let me know the results? I'm happy to try to fix the issue if I can find it.

IG2022 commented 2 years ago

Can you provide me with any steps or anything to duplicate the issue?

I changed my settings to autoplay, enabled scrobbling in settings in "Trakt" section, Enabled PlayNext popup in settings Umbrella settings under TV Shows section, I changed my settings in Kodi>Settings>Player> Play next video automatically and set it to "Episodes".

I picked a show I had never watched before and played the first 4 episodes. I never clicked the popup for next when it came up, I just let it play through. I picked "Love, Death, and Robots" because it's only 13 minutes an episode and was a little quicker for me to test than a full 30-45 minute show. After 45 minutes of strange I stopped and all 3 first episodes show a checkbox next to them indicating watched. I checked online and Trakt shows me ready to watch Episode 4 next as well.

Can you check these settings and try it out and let me know the results? I'm happy to try to fix the issue if I can find it.

Hey thanks alot for getting back to me. I appreciate it.

These are the exact settings I have enabled. The only difference I can see here is that I didn't choose a new show that I've never watched before all my testing was watching shows in my trakt progress section, maybe this could be where the problem lies? Btw I also do not have direct progress scraping on so in the progress section of trakt the remaining episodes are loaded when selecting an episode.

Let me try with the same show that you tried with and if it works then I'll know that it's possibly the progress section of trakt or potentially something in my set up. I'll do some more testing and get back to you.

IG2022 commented 2 years ago

Okay so I tested with the same show you used and it worked no issue at all I even tested the same show from the progress section after I watched a couple of episodes and it worked no problem but when I test with other shows in my progress that I have already been watching the problem persists. I'm really not sure why it's only happening with shows that are already in my progress section. Just some examples of shows that aren't being marked as watched I've tried are "f is for family" and "Barry" both of these were already in my progress section when I authenticated trakt and don't get marked as watched. "Love, Death and robots" works in both the progress section and when accessing it through a search.

I've attached a another log here as as I've just encountered the issue and maybe there will be something here that you can see that might narrow the issue down.

IG2022 commented 2 years ago

Log: https://paste.kodi.tv/ceyetogoro

umbrellaplug commented 2 years ago

Okay, from the log that you've replied with it shows a huge amount of trakt re-authorization errors in the background. Interestingly enough I actually worked with the Ezra dev today to share the same my accounts module. I would remove the my accounts module you currently have and re-install version from the repo currently. Should be version 2.0.8. This may require you to remove and re-install Umbrella. I know this seems like a lot, but it seems you have some client id's mixed up between your plugins. After installing My Accounts again you will need to Re-Auth trakt. Re-Auth is trakt is probably the most important part.

I'll run a few episodes of F is for Family and see if I can duplicate this.

IG2022 commented 2 years ago

Okay, from the log that you've replied with it shows a huge amount of trakt re-authorization errors in the background. Interestingly enough I actually worked with the Ezra dev today to share the same my accounts module. I would remove the my accounts module you currently have and re-install version from the repo currently. Should be version 2.0.8. This may require you to remove and re-install Umbrella. I know this seems like a lot, but it seems you have some client id's mixed up between your plugins. After installing My Accounts again you will need to Re-Auth trakt. Re-Auth is trakt is probably the most important part.

I'll run a few episodes of F is for Family and see if I can duplicate this.

Thanks alot for getting back to me on this. I actually just saw that you started sharing the my accounts module with Ezra and when I opened Kodi today it prompted me to update maybe something there is also causing the issue. What I'll do is I'll do is a full wipe and of my Kodi and start again to see if that helps. I've already tried uninstalling and reinstalling umbrella and it's dependencies... so maybe a full wipe might help. I'll let you know how that goes and if it makes any sort of difference.

Thanks!

umbrellaplug commented 2 years ago

Following up, I tried again with F is for Family starting with Season 3 Episode 2 playing it from the Trakt>Progress section and let it play through till it stopped itself. Episodes were marked as watched as expected. Please let me know if you still have this problem with the new my accounts module.

IG2022 commented 2 years ago

Following up, I tried again with F is for Family starting with Season 3 Episode 2 playing it from the Trakt>Progress section and let it play through till it stopped itself. Episodes were marked as watched as expected. Please let me know if you still have this problem with the new my accounts module.

Thanks for checking the f is for family show for me. So I did a full wipe of my Kodi and reinstalled. I tired f is for family again from my progress and still no luck. I did turn on debugging though just to see if it would catch something and I can see that there is a read time out error to trakt and then an error with the episode being marked as watched.

I've attached the log here for you to take a look this is right after installing and watching one episode. https://paste.kodi.tv/axoboweker

I hope this helps.

umbrellaplug commented 2 years ago

This actually does help. I can see you are getting error from the trakt.py module in the plugin. It looks like it's some timeouts on reading from the trakt api. I have a way to simulate this. I will try to simulate some connection errors to trakt and continue to try to duplicate this issue today. This appears to be a tricky one to track down, but I have seen trakt errors in the past mentioned on the forums so I'm wondering if some more error catching needs to be introduced into the trakt module for these connection issues. I will look into this more today.

Do you use Ezra? Are you having the same behaviors in Ezra if you do? I'm asking because I'm thinking this may be related to the trakt.py module within the venom clones and Ezra would not have that as it is a Fen clone.

Wilson-Fisk commented 2 years ago

Hey umbrella, If I may, I believe I have had some of the same issues in my own addon (kingpin) which would make sense as they are both forked off Venom. I'm currently testing as you did to see if I can confirm it at this moment, but I believe you are probably right in saying its a venom clone vs fen clone thing

Edit: I tested three episodes of The Boys: Diabolical. The first episode was not marked as watched, the second and third were. There is actually no mention of trakt in the log which im finding pretty odd, idk if thats the same on your end

IG2022 commented 2 years ago

This actually does help. I can see you are getting error from the trakt.py module in the plugin. It looks like it's some timeouts on reading from the trakt api. I have a way to simulate this. I will try to simulate some connection errors to trakt and continue to try to duplicate this issue today. This appears to be a tricky one to track down, but I have seen trakt errors in the past mentioned on the forums so I'm wondering if some more error catching needs to be introduced into the trakt module for these connection issues. I will look into this more today.

Do you use Ezra? Are you having the same behaviors in Ezra if you do? I'm asking because I'm thinking this may be related to the trakt.py module within the venom clones and Ezra would not have that as it is a Fen clone.

Great, I'm glad it helps! If you need me to do any tests for you just let me know I'd be happy to do so.

I do use Ezra that has been the most consistent for me as of late, I do not get this issue on Ezra... episodes are marked as watched. I do however get another weird issue with Ezra when I have continuous playback (play next episode automatically) enabled... with Ezra the first episode is always marked as watched but the following episode is not... And I get an error about "too many requests to trakt" towards the end of the second episode and it is not marked as watched. This may be a different issue though I'm not sure. When I do not use autoplay next episode in Ezra I don't have any issues and the episode is marked as watched as expected. (I've gotten around this with Ezra by just disabling autoplay next episode and episodes are marked as watched... I don't have that binge watching experience which kind of sucks)

I tested this with Umbrella as I thought it may be the same issue but even with continuous playback disabled in umbrella this issue persists.

Anyway like I said if you need anything further form me let me know!

umbrellaplug commented 2 years ago

@Wilson-Fisk You may need to set your plugin settings to write debug level and write to kodi.log.

Can you give me steps to reproduce? I haven't been able to get to the issue to happen for me. Everything is always marked watched. I was able to reproduce the trakt.py errors with blocking the api, but once I unblocked it my errors cleared immediately.

umbrellaplug commented 2 years ago

Hey umbrella, If I may, I believe I have had some of the same issues in my own addon (kingpin) which would make sense as they are both forked off Venom. I'm currently testing as you did to see if I can confirm it at this moment, but I believe you are probably right in saying its a venom clone vs fen clone thing

Edit: I tested three episodes of The Boys: Diabolical. The first episode was not marked as watched, the second and third were. There is actually no mention of trakt in the log which im finding pretty odd, idk if thats the same on your end

@Wilson-Fisk I tested 3 episodes of The Boys: Diabolical. The first two episodes were marked as watched. I stopped at the beginning of the 3rd of episode so it should not have been marked.

I tracked the module that does this back to trakt.py in the Venom clones and found the function we're looking to be executed is markEpisodeAsWatched in my module it starts on line 948. I added a new line of code log_utils.log('Marking IMDB as Watched:%s Season:%s Episode:%s' % (imdb, season, episode), level=log_utils.LOGINFO) which caused my plugin to log this line every time it marked an episode as watched. INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Marking IMDB as Watched:tt16350094 Season:1 Episode:2 I was able to see it actually mark the first two episodes as watched as it happened in my log. I really would love to be able to reproduce this so I could actually do some debugging on it. I've attached my log here so you can see an example of these episodes being marked as watched. I still have the auto select source and next set as well.

https://paste.kodi.tv/zasaholeqo.kodi

When you were able to duplicate the issue did you have any other errors in log in relation to trakt or anything else?

Wilson-Fisk commented 2 years ago

I did not have any errors regarding trakt, those seem to be gone with myaccounts version 8. I can add that line in and test as well, but it will be a little bit for me, will be away from my testing devices for the next couple of days. As for steps to reproduce, I really don't know what they would be. I just started playing the show, and it just so happened that the first episode wasn't marked as watched. I didn't do anything special besides changing my playback settings to what you had already set to try to recreate your results on my end

umbrellaplug commented 2 years ago

This seems in some way related to android. I cannot duplicate on Windows or Libreelec on a PI 4 after two days of playing random episodes of things in a row and checking if they were marked or not. I've updated my development version of Umbrella to log out all marked as watched and unwatched requests. I think I may have found part of the problem though. Somehow between different versions of Kingpin and Umbrella and My Accounts my trakt tokens got jacked up where when i hit the re-auth function it would just get stuck there using some type of incorrect token. I was getting a "400 Bad Request" every time. I've now written into Umbrella to revoke your My Accounts token completely and force you to get a new one if you receive a "400" status response. I'll test this new update on an android device if I can find one.

IG2022 commented 2 years ago

This seems in some way related to android. I cannot duplicate on Windows or Libreelec on a PI 4 after two days of playing random episodes of things in a row and checking if they were marked or not. I've updated my development version of Umbrella to log out all marked as watched and unwatched requests. I think I may have found part of the problem though. Somehow between different versions of Kingpin and Umbrella and My Accounts my trakt tokens got jacked up where when i hit the re-auth function it would just get stuck there using some type of incorrect token. I was getting a "400 Bad Request" every time. I've now written into Umbrella to revoke your My Accounts token completely and force you to get a new one if you receive a "400" status response. I'll test this new update on an android device if I can find one.

I'd be happy to test the new update for you if you need me to. I have an Android device and that's possibly why I have been facing this issue. Let me know.

umbrellaplug commented 2 years ago

I looked it up and it's possible to run android on the pi 4. I'm loading it now to test. If I still cannot get the issue I may send you a special version of umbrella with extra-logging and debug enabled by default. I'll let you know.

Just for consistency, do you know what version of Android you are running? I'm loading Android 10, but there are several versions available for the pi.

IG2022 commented 2 years ago

I looked it up and it's possible to run android on the pi 4. I'm loading it now to test. If I still cannot get the issue I may send you a special version of umbrella with extra-logging and debug enabled by default. I'll let you know.

Just for consistency, do you know what version of Android you are running? I'm loading Android 10, but there are several versions available for the pi.

Okay, sounds good to me. Hopefully you will be able to reproduce it on your android version. Keep me updated.

I am running android 11 on my device. It's a Chromecast.

Edit: Sorry that's incorrect I'm on Android 10 not 11.

umbrellaplug commented 2 years ago

Great, I ended up with Android Version 11 for my PI. I'm running tests on this now. I had a fun time trying to install Android on this PI. Long live LibreElec! Looks like the official kodi version on the store is 19.3. I will let you know. The latest verison of Umbrella logs it everytime an episode, season, tv show, or movie is marked watched. If I can duplicate the issue, I can start back tracking to see what event is not firing or has an error causing that first episode not to get marked.

Update: My first episode got marked as watched.... let me build a version with some detailed logging around events that fire episodewatched.

IG2022 commented 2 years ago

Great, I ended up with Android Version 11 for my PI. I'm running tests on this now. I had a fun time trying to install Android on this PI. Long live LibreElec! Looks like the official kodi version on the store is 19.3. I will let you know. The latest verison of Umbrella logs it everytime an episode, season, tv show, or movie is marked watched. If I can duplicate the issue, I can start back tracking to see what event is not firing or has an error causing that first episode not to get marked.

Update: My first episode got marked as watched.... let me build a version with some detailed logging around events that fire episodewatched.

That's interesting... Must be something with my device then I'm not sure. I'll wait to get that build from you to test out and see if we can narrow down the issue.

On a separate note I've been thinking about getting an RPi4 and running LibreElec Kodi on Android has been driving me crazy. Whats been your experience on that device does it run well? Do you run 4k on it?

I also have a MacBook, let me install Kodi on there and test on there that should narrow down whether it's an Android issue.

umbrellaplug commented 2 years ago

I love my RP 4, cost has gone up significantly on them in the past year. I do some HD, I find with the H265 stuff i have some issues, most everything else plays. I watch 2160 streams frequently.

I think I just duplicated your issue, I believe. Mine froze though. Never made it to the next episode. It's just sitting there hanging. I found a show "Most Dangerous Game" that's only six minutes. Now I'm getting this in my logs...

2022-06-30 19:26:14.723 T:12212 ERROR <general>: [COLOR red][ Umbrella: ERROR ][/COLOR]: From func name: /resources/lib/modules/trakt.py.getTrakt() Line # :47 msg : getTrakt Error: -> ReadTimeout -> HTTPSConnectionPool(host='api.trakt.tv', port=443): Read timed out. (read timeout=20) 2022-06-30 19:26:14.727 T:12212 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Marking IMDB as Watched:tt10580064 Season:1 Episode:2 2022-06-30 19:26:14.731 T:12212 ERROR <general>: [COLOR red][ Umbrella: ERROR ][/COLOR]: From func name: /resources/lib/modules/trakt.py.markEpisodeAsWatched() Line # :960 msg : TypeError -> 'NoneType' object is not subscriptable

Let the fun begin....

IG2022 commented 2 years ago

I love my RP 4, cost has gone up significantly on them in the past year. I do some HD, I find with the H265 stuff i have some issues, most everything else plays. I watch 2160 streams frequently.

I think I just duplicated your issue, I believe. Mine froze though. Never made it to the next episode. It's just sitting there hanging. I found a show "Most Dangerous Game" that's only six minutes. Now I'm getting this in my logs...

2022-06-30 19:26:14.723 T:12212 ERROR <general>: [COLOR red][ Umbrella: ERROR ][/COLOR]: From func name: /resources/lib/modules/trakt.py.getTrakt() Line # :47 msg : getTrakt Error: -> ReadTimeout -> HTTPSConnectionPool(host='api.trakt.tv', port=443): Read timed out. (read timeout=20) 2022-06-30 19:26:14.727 T:12212 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Marking IMDB as Watched:tt10580064 Season:1 Episode:2 2022-06-30 19:26:14.731 T:12212 ERROR <general>: [COLOR red][ Umbrella: ERROR ][/COLOR]: From func name: /resources/lib/modules/trakt.py.markEpisodeAsWatched() Line # :960 msg : TypeError -> 'NoneType' object is not subscriptable

Let the fun begin....

Yes they have! My God, I just took a look on Amazon and saw the prices they are much higher than last year. I should have bought mine then. Maybe it's the chip shortage. Good to know they work well with 2160p content I've heard about the H265 issue before thats not a huge issue though.

Fantastic! I'm glad you were finally able to duplicate it. Hopefully now you can track down the cause, your log error looks exactly the way mine did.

I haven't gotten that freezing issue at the end of an episode but it's a step in the right direction.

umbrellaplug commented 2 years ago

Okay, so I worked on this and I was able to get my logging in the right places to help track it down. Unfortunately, once I got the logging in I wasn't able to duplicate. You seem to be able to make it happen often so I have added version 6.5.32 to the repo. Please install this version of Umbrella plugin, make sure in the Tools>Settings:General> "Debugging" is enabled and it's set to Log Level "Debug(Extra Info)" and the logging location is set to kodi.log. If you could run that version and watch for the issue and send me those logs I can see which function is not passing the right information in. I'll be looking for a logging statement like this "Marking Episode as Watched from markEpisodeAsWatched in Trakt IMDB:tt10580064 TVDB:376117 Season:1 Episode:1"

I'm hoping by logging out the values and function I can track down where it's failing and why.

I will keep trying on my device as well. I have some ideas of the issue and some possible solutions. I just need to confirm.

IG2022 commented 2 years ago

Okay, so I worked on this and I was able to get my logging in the right places to help track it down. Unfortunately, once I got the logging in I wasn't able to duplicate. You seem to be able to make it happen often so I have added version 6.5.32 to the repo. Please install this version of Umbrella plugin, make sure in the Tools>Settings:General> "Debugging" is enabled and it's set to Log Level "Debug(Extra Info)" and the logging location is set to kodi.log. If you could run that version and watch for the issue and send me those logs I can see which function is not passing the right information in. I'll be looking for a logging statement like this "Marking Episode as Watched from markEpisodeAsWatched in Trakt IMDB:tt10580064 TVDB:376117 Season:1 Episode:1"

I'm hoping by logging out the values and function I can track down where it's failing and why.

I will keep trying on my device as well. I have some ideas of the issue and some possible solutions. I just need to confirm.

Okay got it. I'll install that and run it today and send you those logs after I have watched a couple of episodes. Looks like you are getting closer! Thanks for all the effort I really do appreciate it.

umbrellaplug commented 2 years ago

Sorry. Can you bump up to 6.5.33?

IG2022 commented 2 years ago

Sorry. Can you bump up to 6.5.33?

No worries, I'm just getting home now so I hadn't updated yet. I don't need to uninstall anything do I? I can just update over the last version?

umbrellaplug commented 2 years ago

Yeah. You can just update. Thanks. I left a debugger statement in it that had to be removed.

IG2022 commented 2 years ago

Yeah. You can just update. Thanks. I left a debugger statement in it that had to be removed.

All right.. just installed that I'll watch a few episodes and get back to you.

IG2022 commented 2 years ago

Hey, just watched a couple of episodes of F is for family with version 6.5.33 and after browsing through the log I've seen the exact error you mentioned above. I just watched 2 episodes and stopped each one at the end of the episode so I didn't let it autoplay the next episode. I hope this is enough information. Let me know if you need any more testing I can do a few more episodes if need be.

Here is my log: https://paste.kodi.tv/gapuzuquka

umbrellaplug commented 2 years ago

Okay, Umbrella version 6.5.34 has been pushed to repo to attempt to address this issue. I have added in a new setting in settings:general>trakt>.

You will see a new slider labeled "Trakt service timeout (in seconds)" It's defaulted to 30 seconds. I'd leave it at 30 seconds and watch a few episodes. See if it marks them. If it doesn't, crank up that time higher... like 90 seconds and see if that helps.

Please let me know your results.

IG2022 commented 2 years ago

Okay, Umbrella version 6.5.34 has been pushed to repo to attempt to address this issue. I have added in a new setting in settings:general>trakt>.

You will see a new slider labeled "Trakt service timeout (in seconds)" It's defaulted to 30 seconds. I'd leave it at 30 seconds and watch a few episodes. See if it marks them. If it doesn't, crank up that time higher... like 90 seconds and see if that helps.

Please let me know your results.

Perfect, let me test this now and get back to you as soon as possible.

IG2022 commented 2 years ago

Okay so I've done some testing with a couple of shows f is for family and the most dangerous game. I used both 30 and 90 second timeouts for trakt.

The result is the same. When I watch one episode with continuous playback enabled and stop at the end it is not marked as watched when I watch 2 or more episodes with continuous playback on the initial episode is not marked as watched but the ones following it are. It's weird because it's just the episode I start with that isn't marked.

Anyway 've attached my log here for you to take a look maybe you might be able to see something. https://paste.kodi.tv/xamazudiso

umbrellaplug commented 2 years ago

Okay, 200 is still what it's showing. The first one failed at 10:41. 2022-07-02 10:41:48.844 T:11671 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Marking Episode as Watched from markEpisodeAsWatched in Trakt IMDB:tt4326894 TVDB:287299 Season:5 Episode:2 2022-07-02 10:41:48.873 T:11671 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Using custom timeout for possible garbage networks. Using Timeout Length: 30 2022-07-02 10:42:18.922 T:11671 ERROR <general>: [COLOR red][ Umbrella: ERROR ][/COLOR]: From func name: /resources/lib/modules/trakt.py.getTrakt() Line # :45 msg : getTrakt Error: -> ReadTimeout -> HTTPSConnectionPool(host='api.trakt.tv', port=443): Read timed out. (read timeout=30)

then it tried to pass that error empty value back to MarkEpisodeAsWatched(). 2022-07-02 10:42:18.925 T:11671 ERROR <general>: [COLOR red][ Umbrella: ERROR ][/COLOR]: From func name: /resources/lib/modules/trakt.py.markEpisodeAsWatched() Line # :951 msg : TypeError -> 'NoneType' object is not subscriptable

Looks like Season 5 Episode 2, was the first one watched that didn't get marked.

It's being caused by network. Which sucks, I know nobody wants to hear that and I'm not finger pointing. It needs to be handled still. That's why I have so much trouble duplicating it. My network is ridiculous fast so simulating a spotty connection gets tough. I may be able to ddos my pi-box or yank the cord while I'm trying to mark episodes. I'll try a few things.

Main thing is I see exactly where it's failing and why. Fen handles cache and the way it hits trakt api for watched episodes afterwards is different. I don't want to have to make a bunch of major changes to the trakt api calls, but I'll see what I can do about catching this error and forcing a few retries.

IG2022 commented 2 years ago

Here is another log after watching a few more episodes of the most dangerous game again the first episode is not marked as watched but all the rest are marked as watched I watched 4 episodes.

Log: https://paste.kodi.tv/otosejojil

I'm trying to get you as much information as possible. let me know if you need me to test anything else.

umbrellaplug commented 2 years ago

No, you're doing awesome. I appreciate you putting up with my requests here. This is a real pain to track down for me. I'm looking through your most recent long now.

2022-07-02 11:39:43.216 T:13181 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Marking Episode as Watched from markEpisodeAsWatched in Trakt IMDB:tt10580064 TVDB:376117 Season:1 Episode:1 2022-07-02 11:39:43.240 T:13181 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Using custom timeout for possible garbage networks. Using Timeout Length: 90

This looks like at 11:39 Season 1 Episode 1 of Most Dangerous Game was marked successfully. Currently in your Kodi it does not show as watched? What about Trakt.com?

IG2022 commented 2 years ago

No, you're doing awesome. I appreciate you putting up with my requests here. This is a real pain to track down for me. I'm looking through your most recent long now.

2022-07-02 11:39:43.216 T:13181 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Marking Episode as Watched from markEpisodeAsWatched in Trakt IMDB:tt10580064 TVDB:376117 Season:1 Episode:1 2022-07-02 11:39:43.240 T:13181 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Using custom timeout for possible garbage networks. Using Timeout Length: 90

This looks like at 11:39 Season 1 Episode 1 of Most Dangerous Game was marked successfully. Currently in your Kodi it does not show as watched? What about Trakt.com?

I just check Kodi and trakt and episode 1 is not marked as watched. Episode 2 is though. The second log i send I started from episode 3 and it was not marked as watched I continued to the end of episode 6 and episode 4, 5, and 6 were marked but not episode 3.

umbrellaplug commented 2 years ago

Okay. I will see what I can figure out on this one. Really strange stuff.

IG2022 commented 2 years ago

No, you're doing awesome. I appreciate you putting up with my requests here. This is a real pain to track down for me. I'm looking through your most recent long now. 2022-07-02 11:39:43.216 T:13181 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Marking Episode as Watched from markEpisodeAsWatched in Trakt IMDB:tt10580064 TVDB:376117 Season:1 Episode:1 2022-07-02 11:39:43.240 T:13181 INFO <general>: [COLOR red][ Umbrella: INFO ][/COLOR]: Using custom timeout for possible garbage networks. Using Timeout Length: 90 This looks like at 11:39 Season 1 Episode 1 of Most Dangerous Game was marked successfully. Currently in your Kodi it does not show as watched? What about Trakt.com?

I just check Kodi and trakt and episode 1 is not marked as watched. Episode 2 is though. The second log i send I started from episode 3 and it was not marked as watched I continued to the end of episode 6 and episode 4, 5, and 6 were marked but not episode 3.

Edit: I've heard about about this issue with trakt and internet speed maybe it is my internet speed that's part of the problem... I've not had that issue with fen and it's forks but like you said the code is different so maybe that's why.

Anyway I'm happy to keep testing I really like your take on this addon and would love to use it!

umbrellaplug commented 2 years ago

Yeah, I found some posts from way back about it. The trakt timeout seems to be an issue. I'm working on adding some integration in right now for some new lists for collections and such. It was requested on one of the other issues. I'm not dropping this one though. Do not be surprised if you get a message or comment from me asking you to try another version. You seem to be able to duplicate it consistently. Maybe we will get super lucky and 123Venom might drop a comment with some wisdom on us. He's been doing it to me over on the Ezra issues for a couple of days now. :)

IG2022 commented 2 years ago

Yeah, I found some posts from way back about it. The trakt timeout seems to be an issue. I'm working on adding some integration in right now for some new lists for collections and such. It was requested on one of the other issues. I'm not dropping this one though. Do not be surprised if you get a message or comment from me asking you to try another version. You seem to be able to duplicate it consistently. Maybe we will get super lucky and 123Venom might drop a comment with some wisdom on us. He's been doing it to me over on the Ezra issues for a couple of days now. :)

No worries I've seen alot of people have started using mdb lists since the list limits were implemented with trakt. I think that will be good addition. For sure! It would be great if 123Venom chimed in. Anyway if you do have anything else for me to test send it my way! All the best with the list integration.

Wilson-Fisk commented 2 years ago

Okay. I will see what I can figure out on this one. Really strange stuff.

Yea it just seems to be a really strange lasting issue. Had it happen once again when just randomly watching a single episode this morning. Thanks for all the work you two have put into trying to diagnose it in Umbrella, I know it will help you, and in turn me if you find a solution and if you don't mind me using it as well? (Don't want to just take all your work, fully know that you guys have been on this) Trakt problems are the worst lol, especially the intermittent ones. If you need any more help testing, just let me know, im available to do so! (And could try to code a little, might not go too well though)

umbrellaplug commented 2 years ago

@Wilson-Fisk Hey sorry it took a minute to reply to this. I been looking over the issue reports and logs.

No, I don't mind if you grab any fixes or enhancements I do. To be real honest about this, I was aware and have been writing my code in a way that would make sure it worked for either plugin. Avoiding using module names and such.

It's kinda a funny/ weird position to be in watching the forums and seeing the comments and questions about ezra and kingpin, knowing full well I'm working on fixes and enhancements real time. I'm not big on the public facing side. That's why you haven't seen any type of release post of anything from me, but I understand it's a public project and I am trying to maintain the plugin so it comes with the territory.

With that being said, you may have some trouble in the future. When I add in MDBList there's going to be a new icon and some other things you're going to need to place correctly for everything to work right. I can help you when the time comes for that. There probably needs to be a conversation between ezra, you, and myself about the direction of my accounts and the scrapers. I already have some small things I'd like to do, but I don't really want to lay it all out in a github comment. lol

On this issue, I'm about ready to hang myself with my shoelaces. I had another issue opened this morning with some issues I apparently caused with the custom timeout I put in yesterday. That will be priority to fix, but if there's an issue with the requests module that might be the cause here as well. I'll be looking into it.

I REALLY wish I could duplicate this. I'm going to try to watch some stuff from hotspot on my phone and see if the janky network can help me to duplicate it.

Wilson-Fisk commented 2 years ago

@Wilson-Fisk Hey sorry it took a minute to reply to this. I been looking over the issue reports and logs.

No, I don't mind if you grab any fixes or enhancements I do. To be real honest about this, I was aware and have been writing my code in a way that would make sure it worked for either plugin. Avoiding using module names and such.

It's kinda a funny/ weird position to be in watching the forums and seeing the comments and questions about ezra and kingpin, knowing full well I'm working on fixes and enhancements real time. I'm not big on the public facing side. That's why you haven't seen any type of release post of anything from me, but I understand it's a public project and I am trying to maintain the plugin so it comes with the territory.

With that being said, you may have some trouble in the future. When I add in MDBList there's going to be a new icon and some other things you're going to need to place correctly for everything to work right. I can help you when the time comes for that. There probably needs to be a conversation between ezra, you, and myself about the direction of my accounts and the scrapers. I already have some small things I'd like to do, but I don't really want to lay it all out in a github comment. lol

On this issue, I'm about ready to hang myself with my shoelaces. I had another issue opened this morning with some issues I apparently caused with the custom timeout I put in yesterday. That will be priority to fix, but if there's an issue with the requests module that might be the cause here as well. I'll be looking into it.

I REALLY wish I could duplicate this. I'm going to try to watch some stuff from hotspot on my phone and see if the janky network can help me to duplicate it.

Got it, sounds good with the discussion bit. Agreed it shouldn't be in a GitHub comment haha.

So catching up to speed with this issue, it's mainly a windows/android issue correct? Or did you guys fix it with the timeout, but that introduced a new issue? I can test more on windows, android, even ios (ios is not a priority for me though lol) as I know you mentioned you mainly run Linux of a RPi.

I'll start with my shield and see if I can't get you a couple more logs from kingpin as a base, then move to umbrella where you have implemented some changes if that sounds good?

umbrellaplug commented 2 years ago

I'm not really sure yet if that requests issue in the other issue is an umbrella problem. Looking at his log, he's got a lot going on. :)

My version of requests from my log on windows: 2022-07-02 11:11:16.980 T:11164 INFO : CAddonMgr::ADDON::CAddonMgr::FindAddons: script.module.requests v2.27.1+matrix.1 installed

His Version from his log: 2022-07-02 15:11:59.631 T:19252 INFO : CAddonMgr::FindAddons: script.module.requests v2.27.1+matrix.1 installed

Something else going on there. I'm going to compare see if I can scrape for the same thing from that log and see if it crashes mine. I think it may something else. The changes I made yesterday were only to change the "int" value being sent with the timeout value on http requests on "marking episodes watched", i would be surprised if that is causing his issue, but I have seen crazier stuff in my time doing code.

kodifitzwell commented 2 years ago

hope you don't mind my comments, obviously I came here from r/addons4kodi because of reports of trakt timeout issues with my own fork of Fen.

have you taken a look at the commented out "markEpisodeAsWatched" function above the current function? it makes reference to "sometimes trakt fails to mark..." has anyone tried revert to using that function? I see it was from the original venom code, so maybe the dev had some previous experience with this problem and moved away or gave up?

# def markEpisodeAsWatched(imdb, tvdb, season, episode):
    # try:
        # season, episode = int('%01d' % int(season)), int('%01d' % int(episode))
        # result = getTraktAsJson('/sync/history', {"shows": [{"seasons": [{"episodes": [{"number": episode}], "number": season}], "ids": {"imdb": imdb, "tvdb": tvdb}}]})
        # if result['added']['episodes'] == 0 and tvdb: # sometimes trakt fails to mark because of imdb_id issues, check tvdb only as fallback if it fails
            # control.sleep(1000) # POST 1 call per sec rate-limit
            # result = getTraktAsJson('/sync/history', {"shows": [{"seasons": [{"episodes": [{"number": episode}], "number": season}], "ids": {"tvdb": tvdb}}]})

        # log_utils.log('result=%s' % str(result))

        # return result['added']['episodes'] != 0
    # except: log_utils.error()
umbrellaplug commented 2 years ago

I have not yet. I've been wanting to get back into looking at this today, but fighting like crazy with a crashing issue. If it's not one thing it's another. I love code. :)

I would say Trakt / My Accounts is going to be our biggest pain in the ass between the plugins. This whole scrobble on/ scrobble off, mark as watched, 200 "bad request" nonsense is going to keep coming up till we find some type of elegant solution for it. This is the first I've heard of the issue existing in Fen also. Kinda made me feel better.

Edit. Let's ask him. He's always been real helpful as long as you're respectful. @123Venom Any input?

umbrellaplug commented 2 years ago

Hey, can you try the latest version and see if you have any improvement on this? 6.5.31 Edit: Please make sure to Re-Authenticate Trakt on this latest version. Things have been nuts with Trakt and My Accounts and Venom Clones.

IG2022 commented 2 years ago

Hey, can you try the latest version and see if you have any improvement on this? 6.5.31 Edit: Please make sure to Re-Authenticate Trakt on this latest version. Things have been nuts with Trakt and My Accounts and Venom Clones.

Hey I'll try this as soon as I get home and let you know the results. Also just as an fyi I was having those trakt reauthorization issues before but with the update you pushed yesterday that went away for me.