Skip to content

Commit

Permalink
[script.service.playbackresumer] 2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
bossanova808 committed Oct 16, 2024
1 parent afe0a48 commit 9ec7d53
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 315 deletions.
7 changes: 5 additions & 2 deletions script.service.playbackresumer/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.service.playbackresumer" name="Kodi Playback Resumer" version="2.0.6" provider-name="bossanova808, bradvido88">
<addon id="script.service.playbackresumer" name="Kodi Playback Resumer" version="2.0.7" provider-name="bossanova808, bradvido88">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.bossanova808" version="1.0.0"/>
</requires>
<extension point="xbmc.service" library="default.py" />
<extension point="xbmc.addon.metadata">
Expand All @@ -15,7 +16,9 @@
<source>https://github.com/bossanova808/script.service.playbackresumer</source>
<forum>https://forum.kodi.tv/showthread.php?tid=355383</forum>
<email>[email protected]</email>
<news>v2.0.6 - Add support for non-library videos</news>
<news>v2.0.7
- Remove old common code, use new module
</news>
<assets>
<icon>icon.png</icon>
</assets>
Expand Down
6 changes: 3 additions & 3 deletions script.service.playbackresumer/default.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

from bossanova808 import exception_logger
from resources.lib import playback_resumer

if __name__ == "__main__":
playback_resumer.run()
with exception_logger.log_exception():
playback_resumer.run()
216 changes: 0 additions & 216 deletions script.service.playbackresumer/resources/lib/common.py

This file was deleted.

10 changes: 5 additions & 5 deletions script.service.playbackresumer/resources/lib/monitor.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import xbmc
from .common import *
from bossanova808.logger import Logger
# noinspection PyPackages
from .store import Store


class KodiEventMonitor(xbmc.Monitor):

def __init__(self, *args, **kwargs):
xbmc.Monitor.__init__(self)
log('KodiEventMonitor __init__')
Logger.debug('KodiEventMonitor __init__')

def onSettingsChanged(self):
log('onSettingsChanged - reload them.')
Logger.info('onSettingsChanged - reload them.')
Store.load_config_from_settings()

def onAbortRequested(self):
log('onAbortRequested')
log("Abort Requested")
Logger.debug('onAbortRequested')
11 changes: 6 additions & 5 deletions script.service.playbackresumer/resources/lib/playback_resumer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
from .common import *
from bossanova808.utilities import *
# noinspection PyPackages
from .store import Store
import xbmc
# noinspection PyPackages
from .monitor import KodiEventMonitor
# noinspection PyPackages
from .player import KodiPlayer


def run():
"""
This is 'main'
Expand All @@ -12,7 +16,7 @@ def run():
"""
footprints()
# load settings and create the store for our globals
config = Store()
Store()
Store.kodi_event_monitor = KodiEventMonitor(xbmc.Monitor)
Store.kodi_player = KodiPlayer(xbmc.Player)

Expand All @@ -26,6 +30,3 @@ def run():
break

footprints(False)



Loading

0 comments on commit 9ec7d53

Please sign in to comment.