[RELEASE] Check previous episode
#31
@Lucleonhart

Using this with Gotham final, I think there is a clash with http://wiki.xbmc.org/index.php?title=Add...e_Jumpback

It still works, detecting the forward episode, but the pausing of video playback doesn't work. That is, the episode plays in the background with the dialog over it. This means that while you're responding, some of the 'previously on.... etc' can be seen, i.e. spoilers!

It doesn't happen on my more basic install, just my main htpc that has all my addons etc on it. I am not 100% sure that's the one it is clashing with, but it seems most likely - a debug log of it happening is here: https://dl.dropboxusercontent.com/u/1088..._check.log (I put your logging back in)

Any chance you'd be willing to have a look?
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#32
Awesome addon - exactly what I was looking for.. I'm also in the boat of deleting files after I watch them, so would love an option to ignore deleted files and only rely on watched status of the previous ep.
Reply
#33
(2014-05-10, 08:07)Kaibosh Wrote: Awesome addon - exactly what I was looking for.. I'm also in the boat of deleting files after I watch them, so would love an option to ignore deleted files and only rely on watched status of the previous ep.

My addon (LazyTV) also has this feature and it only considers files that exist in the library, so not deleted ones (assuming your database is clean). Checking the previous episode is a secondary function though, so if that is all you are using then there will be unnecessary overhead that this addon doesnt have.
Reply
#34
(2014-05-10, 09:20)Karnagious Wrote: My addon (LazyTV) also has this feature and it only considers files that exist in the library, so not deleted ones (assuming your database is clean).

I did check out your addon and while it looks great, it's overkill for what I'm after (which is solely checking whether previous episode has been watched). Thanks for the suggestion though Smile
Reply
#35
No problem.
Reply
#36
(2014-05-10, 04:43)bossanova808 Wrote: Using this with Gotham final, I think there is a clash with http://wiki.xbmc.org/index.php?title=Add...e_Jumpback
Hey there.
I have installed Unpause Jumpback and my plugin too, and they both work flawlessly. Maybe its another plugin? Smile

Thanks for your support! ^_^

---

For the ignore deleted files i will have a look! Smile
Reply
#37
Doublepost!

I am a bit confused about the deleting thing:
So I have Dexter S01E01, S01E02 and S01E03.
All three are in the database, all files are present.

Now i watch S01E01. It gets marked as watched in the database.
When i select S01E02 it will be played, when i select S01E03 the addon will say that the previous episode is unwatched.

Now i open up my explorer and DELETE S01E01 physically.
Nothing changes for my addon. I check if S01E01 is in the database: yes. Playcount > 0: yes.

If you delete S01E01 from the database, it is not possible to check the playcount at all so... please explain the problem.
Thank you! Smile
Reply
#38
Does anyone know if a movie version of this exists?
Reply
#39
(2014-05-12, 09:31)Lucleonhart Wrote: Doublepost!

I am a bit confused about the deleting thing:
So I have Dexter S01E01, S01E02 and S01E03.
All three are in the database, all files are present.

Now i watch S01E01. It gets marked as watched in the database.
When i select S01E02 it will be played, when i select S01E03 the addon will say that the previous episode is unwatched.

Now i open up my explorer and DELETE S01E01 physically.
Nothing changes for my addon. I check if S01E01 is in the database: yes. Playcount > 0: yes.

If you delete S01E01 from the database, it is not possible to check the playcount at all so... please explain the problem.
Thank you! Smile

Looking at the code, it seems that the service gets the all episodes in the season for the show that is playing. It then looks to see if there is an episode with a number that is one less than the playing episode. If it cant find it, then it shows the warning. I think the user above wants the option to not get the warning if the show is not found.

So replace this:
Code:
if(len(jsonobject['result']) > 0):
    #log("Finding...")
    found = False
    playcount = 0
    for episode in jsonobject['result']['episodes']:
        if(episode['episode'] == (playingEpisode - 1)):
            #log("FOUND!")
            playcount = episode['playcount']
            found = True
            break
    
    if not found or playcount == 0:
        #log("Stopping playback!")
        xbmc.Player().pause()
with this:
Code:
if(len(jsonobject['result']) > 0):
    #log("Finding...")
    found = False
    playcount = -1
    for episode in jsonobject['result']['episodes']:
        if(episode['episode'] == (playingEpisode - 1)):
            #log("FOUND!")
            playcount = episode['playcount']
            found = True
            break
    
    if (not found and getSetting("ignore_if_absent") != 'true') or playcount == 0:
        #log("Stopping playback!")
        xbmc.Player().pause()
Reply
#40
What happened to this addon? git repo is gone and owner is gone...
Reply
#41
This functionality is available in the Lazy TV addon: http://forum.xbmc.org/showthread.php?tid=190697
Reply
#42
Hey!
Restores my github account, sry for the confusion! Smile

So the setting that the warning will only be displayed if the episode is present but not played should be no problem, mr lazytv even posted the code! ^_^ Thanks for that. Smile

Will update as soon as possible.

(2014-05-14, 00:51)him187 Wrote: Does anyone know if a movie version of this exists?
What should such an addon do?
Reply
#43
Just tried a Helix alpha and am having an issue with this addon (which I love!)

21:52:37 T:7868 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named simplejson
Traceback (most recent call last):
File "C:\XBMC Stuff\Helix\Kodi\portable_data\addons\script.service.checkpreviousepisode\default.py", line 5, in <module>
import simplejson
ImportError: No module named simplejson
-->End of Python script error report<--

Mind having a look?
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#44
(2014-10-30, 12:56)bossanova808 Wrote: Just tried a Helix alpha and am having an issue with this addon (which I love!)
Edit the default.py file mentioned, and change line 5 from "import simplejson" to "import json as simplejson"... see how that goes.
Reply
#45
Quote:Edit the default.py file mentioned, and change line 5 from "import simplejson" to "import json as simplejson"... see how that goes.


That did not resolve the issue for me.
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Check previous episode2