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

[python-api] InfoTagVideo additional methods #13019

Merged
merged 5 commits into from
Nov 17, 2017

Conversation

regagain
Copy link
Contributor

@regagain regagain commented Nov 7, 2017

Exposed more information from InfoTagVideo to the python API.

Description

Added the methods getArtist(), getAlbum(), getTrack() and getDuration() to InfoTagVideo.

Motivation and Context

Mostly useful for musicvideos. For example, thanks to these methods, musicvideos could be scrobbled to Libre.fm/Last.fm or ListenBrainz.

How Has This Been Tested?

  • Added debug prints so I could see that the information was retrieved properly when playing videos.
  • Made a POC from service.scrobbler.lastfm to scrobble musicvideos.
  • My test environment is just my laptop, which is running Linux & Kodi HEAD.
  • Since this only retrieves existing information, I don't think it should impact other areas.

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

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

///
/// @return [string] Artist name
///
///

This comment was marked as spam.

This comment was marked as spam.

@ronie
Copy link
Member

ronie commented Nov 7, 2017

thx! code looks good to me.


String InfoTagVideo::getArtist()
{
return StringUtils::Join(infoTag->m_artist, g_advancedSettings.m_videoItemSeparator);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

///
getDuration();
#else
int getDuration();

This comment was marked as spam.

return infoTag->m_iTrack;
}

int InfoTagVideo::getDuration()

This comment was marked as spam.

This comment was marked as spam.

@Rechi
Copy link
Member

Rechi commented Nov 7, 2017

Can you please squash/reorder the commits a bit

  • Comments should go into the same commit where the function is added.
  • changing the return type for getDuration should be added to the function addition commit
  • same for getArtist function changes
  • PythonSwig change should be before the commit which needs the change

You might also want adjust the email address of your commits to the one you use for github that your commits get associated with your github user.

If you need assistance just ask.

function comment getArtist

InfoTagVideo.getArtist(): return original String list so it can be consumed as pleased
function comment getDuration

InfoTagVideo.getDuration(): changed return type to unsigned int
@regagain regagain force-pushed the InfoTagVideo_additional_methods branch from e62a54e to ca50183 Compare November 8, 2017 08:11
@regagain
Copy link
Contributor Author

regagain commented Nov 8, 2017

Done!

@Rechi
Copy link
Member

Rechi commented Nov 8, 2017

wrong revision was build
jenkins build this please

@Rechi Rechi added Type: Improvement non-breaking change which improves existing functionality API change: Python v18 Leia labels Nov 8, 2017
@Rechi Rechi added this to the L 18.0-alpha1 milestone Nov 8, 2017
@Rechi Rechi requested a review from ronie November 8, 2017 11:58
@Rechi
Copy link
Member

Rechi commented Nov 17, 2017

@ronie good to go?

@ronie
Copy link
Member

ronie commented Nov 17, 2017

yes sure, go ahead :-)

@Rechi Rechi merged commit 44e160d into xbmc:master Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change: Python Type: Improvement non-breaking change which improves existing functionality v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants