SIMKL / script.simkl

Kodi add-on for Simkl
https://simkl.com/apps/kodi/
GNU General Public License v3.0
40 stars 14 forks source link

Intervals for Failed attempts to Scrobble #29

Closed AzzieDev closed 7 years ago

AzzieDev commented 7 years ago

Currently, it appears that when the internet is disconnected or unstable and the plugin fails to scrobble, it retries every 5 seconds or so. This is disruptive to the viewer.

A user-friendly solution would be to do this:

Section A: Attempt to scrobble Does it succeed? Yes - notify the user and end. No - notify the user and start Section B.

Section B: 30 second interval Attempt to scrobble Does it succeed? Yes - Notify the user and end. No - Don't notify the user and restart section B. If at 95% of video, start Section C.

Section C: At 95% of the video, has it scrobbled yet? Yes - Do nothing No - Notify the user

Using this logic, the user will not be pestered with repetitive messages but will instead receive no more than 2 total notifications during the video.

ekleop commented 7 years ago

If we do not show the notification to the user, then he will think that this is a bug because his tv show wasn't marked. So I think we have to display it at least once.

daviddavo commented 7 years ago

It seems easy, I'll try to do is between today and tomorrow

AzzieDev commented 7 years ago

@ekleop See section A. It does notify the user the first time. But only the first time and at 95%.

AzzieDev commented 7 years ago

@daviddavo Awesome!

ekleop commented 7 years ago

@kat953162 yeap, you're right.

AzzieDev commented 7 years ago

I only noticed the "retry" thing today because my WiFi router keeps disconnecting randomly. Not sure when the feature was added.

ekleop commented 7 years ago

It was added a week ago or more precisely, it was added a long time ago but didn't work correctly

daviddavo commented 7 years ago

Please test it before serializing the strings

ekleop commented 7 years ago

Cool, will test it tomorrow