Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[script.service.playbackresumer@matrix] 2.0.7 #2662

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>bossanova808@gmail.com</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
Loading