Skip to content
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

[PlaylistPlayer] Resolve plugin paths to fill the item infotag #16158

Merged
merged 1 commit into from May 23, 2019

Conversation

enen92
Copy link
Member

@enen92 enen92 commented May 17, 2019

Description

When a plugin:// path is played for the first time from the jsonrpc API, there is no information stored in the database for the item and it does not contain any music or video infotags (item->IsAudio() || item->IsVideo() is false). That makes Kodi interpret the item as a playlist (g_application.PlayMedia) and information such as the item subtitles is not available. Users using remote control applications are not able to select the item provided subtitles. Subs will only be available the next time the item is played since at that moment the item info is already in the database and is filled by FillFileItemList. This PR makes sure the plugin path is resolved before checking if it is audio or video, solving the issue.

Motivation and Context

Fixes #16151

How Has This Been Tested?

With a proof of concept video plugin, changing the plugin:// play path to make sure it is always an unknown path not in the db. Played the item via Kore remote app and checked the option to select subtitles was available.

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@basrieter
Copy link
Contributor

I can confirm that this fixes #16151.

xbmc/PlayListPlayer.cpp Outdated Show resolved Hide resolved
@enen92
Copy link
Member Author

enen92 commented May 18, 2019

@ksooo style issues addressed. 5 magic number explained in the comment.

@basrieter
Copy link
Contributor

So, can this be merged now?

@notspiff notspiff merged commit e3f4c23 into xbmc:master May 23, 2019
@basrieter
Copy link
Contributor

Should we backport this to Leia?

@ksooo
Copy link
Member

ksooo commented May 23, 2019

Sure, as the PR label "backport needed" already indicates. ;-)

@basrieter
Copy link
Contributor

Didn't see that label all the way at the top!

@enen92
Copy link
Member Author

enen92 commented May 23, 2019

@basrieter can you backport?

@basrieter
Copy link
Contributor

sure, I will git it a try.

@basrieter
Copy link
Contributor

I created #16192

@bigretromike
Copy link
Contributor

I have similar issue with
xbmc.Player().play(url, listitem)
When url starts with plugin:// for the first time Player.GetItem() returns infovideotag, but when files is played again it does not return that info anymore.

Does this PR fix this issue ? (I initially think so, but I build kodi 20190604-75c1d6b3e7-dirty today from master and the issue is still there)

Any chance to port his to player also (or json-rpc)?

@enen92
Copy link
Member Author

enen92 commented Jun 6, 2019

@bigretromike please open a separate issue with a clear description on how to reproduce the issue. Your comment seems totally unrelated to this PR.

@bigretromike
Copy link
Contributor

@enen92 I did what you asked me to: #16245
For me it is somehow similar, but then again from two of use you are the expert here so I don't complain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Videos started using JSON API do not provide subtitle info on first playback
5 participants