Warn if "Play next video automatically" is enabled, cause it breaks PKC playback report

This commit is contained in:
croneter 2018-04-02 16:29:56 +02:00
parent 0a978188b4
commit 5facbddfc7
3 changed files with 20 additions and 0 deletions

View file

@ -31,6 +31,11 @@ msgctxt "#30002"
msgid "Preferred playback method"
msgstr ""
# Warning displayed if Kodi setting is enabled. Be sure to escape the quotes again! The exact wording can be found in the Kodi settings, player settings, videos
msgctxt "#30003"
msgid "Warning: Kodi setting \"Play next video automatically\" is enabled. This could break PKC. Deactivate?"
msgstr ""
msgctxt "#30004"
msgid "Log level"
msgstr ""

View file

@ -529,6 +529,20 @@ class InitialSetup(object):
# Do we need to migrate stuff?
check_migration()
# Display a warning if Kodi puts ALL movies into the queue, basically
# breaking playback reporting for PKC
if js.settings_getsettingvalue('videoplayer.autoplaynextitem'):
LOG.warn('Kodi setting videoplayer.autoplaynextitem is enabled!')
if settings('warned_setting_videoplayer.autoplaynextitem') == 'false':
# Only warn once
settings('warned_setting_videoplayer.autoplaynextitem',
value='true')
# Warning: Kodi setting "Play next video automatically" is
# enabled. This could break PKC. Deactivate?
if dialog('yesno', lang(29999), lang(30003)):
js.settings_setsettingvalue('videoplayer.autoplaynextitem',
False)
# If a Plex server IP has already been set
# return only if the right machine identifier is found
if self.server:

View file

@ -122,6 +122,7 @@
<setting id="bestTrailer" type="bool" label="30542" default="true" />
<setting id="force_transcode_pix" type="bool" label="30545" default="false" />
<setting id="kodi_video_cache" type="number" visible="false" default="20971520" />
<setting id="warned_setting_videoplayer.autoplaynextitem" type="bool" visible="false" default="false" />
</category>
<category label="30544"><!-- artwork -->