Revert "Will use a downloader thread directly from peertube.py. Will not use a service anymore."

This reverts commit 5f590f48cd.

In the end, a service is needed: The addon is ended when kodi starts playing the file, so the
downloader thread would be ended also. I need to launch the downloader thread from something that
isn't expected to end, which is why services exist.
This commit is contained in:
Famille Bollu 2018-07-26 19:32:37 +02:00
parent 71e76f38cc
commit 9b140a77d3
2 changed files with 12 additions and 0 deletions

View File

@ -6,6 +6,8 @@
<extension point="xbmc.python.pluginsource" library="peertube.py">
<provides>video</provides>
</extension>
<extension point="xbmc.service" library="service.py"/>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">Plugin for PeerTube</summary>
<description lang="en_GB">PeerTube is a federated open source alternative to YouTube</description>

10
service.py Normal file
View File

@ -0,0 +1,10 @@
import time
import xbmc
if __name__ == '__main__':
monitor = xbmc.Monitor()
while not monitor.abortRequested():
if monitor.waitForAbort(1):
# Abort was requested while waiting. We must exit
break