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:
parent
71e76f38cc
commit
9b140a77d3
|
@ -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>
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue