[RELEASE] Check previous episode

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bossanova808 Offline
Donor
Posts: 2,329
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #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?

My XBMC stuff:
find quote
Kaibosh Offline
Junior Member
Posts: 2
Joined: May 2014
Reputation: 0
Post: #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.
find quote
Karnagious Online
Fan
Posts: 724
Joined: Nov 2012
Reputation: 30
Post: #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.
(This post was last modified: 2014-05-10 09:22 by Karnagious.)
find quote
Kaibosh Offline
Junior Member
Posts: 2
Joined: May 2014
Reputation: 0
Post: #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
find quote
Karnagious Online
Fan
Posts: 724
Joined: Nov 2012
Reputation: 30
Post: #35
No problem.
find quote
Lucleonhart Offline
Senior Member
Posts: 200
Joined: Jan 2009
Reputation: 2
Post: #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
find quote
Lucleonhart Offline
Senior Member
Posts: 200
Joined: Jan 2009
Reputation: 2
Post: #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
find quote
him187 Offline
Junior Member
Posts: 1
Joined: Nov 2013
Reputation: 0
Post: #38
Does anyone know if a movie version of this exists?
find quote
Karnagious Online
Fan
Posts: 724
Joined: Nov 2012
Reputation: 30
Post: #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()
find quote
takoi Offline
Team-Kodi Member
Posts: 842
Joined: Oct 2009
Reputation: 12
Location: Norway
Post: #40
What happened to this addon? git repo is gone and owner is gone...
find quote
gbandit Offline
Member
Posts: 75
Joined: Sep 2011
Reputation: 1
Post: #41
This functionality is available in the Lazy TV addon: http://forum.xbmc.org/showthread.php?tid=190697
find quote
Lucleonhart Offline
Senior Member
Posts: 200
Joined: Jan 2009
Reputation: 2
Post: #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?
(This post was last modified: 2014-10-24 11:10 by Lucleonhart.)
find quote
bossanova808 Offline
Donor
Posts: 2,329
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #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\defaul​t.py", line 5, in <module>
import simplejson
ImportError: No module named simplejson
-->End of Python script error report<--

Mind having a look?

My XBMC stuff:
find quote
Rezin Offline
Junior Member
Posts: 17
Joined: May 2010
Reputation: 0
Post: #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.
find quote
tjhart85 Offline
Junior Member
Posts: 2
Joined: Jul 2010
Reputation: 0
Post: #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.
find quote