-
Notifications
You must be signed in to change notification settings - Fork 455
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
[plugin.video.piped] 1.0.0 #4445
Conversation
Please fix the issues pointed out by the add-on checker. Then I will have a further look. |
This should fix all the issues pointed out by the add-on checker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you have a look at the code for the services? It does not seem to handle aborts correctly.
httpservice.daemon = True | ||
scheduler.daemon = True | ||
player = Player() | ||
player.isPlaying() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this call? Makes no real sense if you don't use the output?
player = Player() | ||
player.isPlaying() | ||
|
||
while not self.abortRequested(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If abortRequested()
results in True
, the httpservice
and scheduler
aren't stopped properly and could cause Kodi to wait for a long time.
if self.waitForAbort(5): | ||
while scheduler.is_alive(): | ||
scheduler.stop() | ||
xbmc.sleep(200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If scheduler.stop()
does not finish, the script waits for 200ms and then stops it again? In the Scheduler.stop()
you call self.join()
which should actually block until the thread stopped.
Before I commit anything, does this seem right to you? class Service(xbmc.Monitor):
def __init__(self):
httpservice = Thread(target=HttpService)
scheduler = Scheduler()
httpservice.daemon = True
scheduler.daemon = True
player = Player()
while not self.waitForAbort(5):
try:
if not httpservice.is_alive(): httpservice.start()
if not scheduler.is_alive(): scheduler.start()
except:
pass
scheduler.stop() |
Yes that makes more sense. Also make sure the |
Done |
Description
New addon which allows users to access any Piped instance, login and manage their playlists and watch history.
More information about Piped:
Piped GitHub Repository
Piped Official Instance
Checklist:
Additional information :