-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Expose OnAVChange and OnAVStarted to python api #13696
Conversation
xbmc/Application.cpp
Outdated
#ifdef HAS_PYTHON | ||
// informs python script currently running playback has started | ||
// (does nothing if python is not loaded) | ||
g_pythonParser.OnAVChange(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Would it be possible to get something like |
397cb45
to
62dbd4d
Compare
To quote myself:
It's not true that onPlaybackStarted returns the file. While it get's passed to the player interface it's not passed along to the python representation. |
62dbd4d
to
fb50ae8
Compare
CGUIMessage msg(GUI_MSG_PLAYBACK_AVSTARTED, 0, 0); | ||
g_windowManager.SendThreadMessage(msg); | ||
} | ||
|
||
void CApplication::OnAVChange() | ||
{ | ||
CLog::LogF(LOGDEBUG, "CApplication::OnAVChange"); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Updated for the latest changes. @FernetMenta please have a look if you find some time. jenkins build this please |
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.
looks good
Description
Exposes the new
OnAVChange
via out python player interface.I find the naming interesting, as I would have expected it to be called OnAVChanged, is that on purpose or an error?
The other problem is, that it seems to be called multiple times on video start. Tested it with two movies so far and it's been called for times on each start.
Unlike
onPlaybackStarted
, this does not include data about the file being used. While it's not a problem for my usecase it might be a problem for the ambilight guys.Motivation and Context
For context https://trac.kodi.tv/ticket/17632#comment:2
Problem is that
onPlaybackStarted
triggers so early that the player might not be available. So everybody that tries to do stuff with the player then will fail.How Has This Been Tested?
Tested it with my trakt addon-
Types of change
Checklist: