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

Fix Missing Art in GetItem when Played from Music Addon. Fixes ticket #15416 #8465

Merged
merged 1 commit into from Dec 2, 2015

Conversation

DaveTBlake
Copy link
Member

This fixes http://trac.kodi.tv/ticket/15416 the specific case that having initiated playing music from an addon CPlayerOperations::GetItem does not return fan art or thumbnail (cover art) when it is available.

It does not address the longstanding issue that when play is started from JSON GetItem does not return art work.

This is an alternative fix to that tried in #8440, so see discussion on that thread. Art work was being lost because CFileItem was being created rather than populated from CMusicInfoTag. This fix only impacts music, and makes no changes to video that does not have this bug. It also makes music code more consistent with video for future maintenance. In the longer term a refactoring of fileitem processing would be good, but given uncertainties about how some parts of it work this solution is both sufficient and robust for Jarvis.

This has been tested for playing songs that are both in the library and not, and both from GUI and JSON.

@razzeee, @Montellese (back yet?), @da-anda @Tolriq would like to get this into Jarvis if you agree

…k in CPlayerOperations::GetItem. This now similar to how video handled.
@Tolriq
Copy link
Contributor

Tolriq commented Dec 1, 2015

Obviously +1 from me.

Need a Windows build to test if you need confirmations :(

Does Kodi compile with VS studio 2015 ?

@MartijnKaijser
Copy link
Member

@Tolriq win32 build started. Will end up on the mirror in ~2 hours with branchname in the filename

@razzeee
Copy link
Member

razzeee commented Dec 1, 2015

@Tolriq
Kodi compiles with VS 2015 yes.
But you will need to have 2013 installed and do not migrate the project at first load with VS 2015.

Will check this PR soon.

@MartijnKaijser
Copy link
Member

@Montellese
Copy link
Member

A much better approach than the current implementation or #8440 so +1 from me.

@Montellese Montellese added this to the Jarvis 16.0-beta3 milestone Dec 2, 2015
SetLabel(music.GetTitle());
if (!music.GetURL().empty())
m_strPath = music.GetURL();
m_bIsFolder = URIUtils::HasSlashAtEnd(m_strPath);

This comment was marked as spam.

@Tolriq
Copy link
Contributor

Tolriq commented Dec 2, 2015

Different TimeZone will test now :)

@Montellese glad to see you back, @DaveTBlake wanted to make some research about the fact that stuff played from GUI have more metadata than stuff played from JSON (specially addons) maybe you have some insight about where he should start looking ? :)

@razzeee
Copy link
Member

razzeee commented Dec 2, 2015

Code looks good, but can't test it right now. Ran into another error when compiling, but it's not related to your change. But it's something I want to look into.

@Tolriq
Copy link
Contributor

Tolriq commented Dec 2, 2015

@MartijnKaijser not 100% related but a fresh install of this did directly trigger the message about TADB no more supported for MusicVideo. Seems despite the removal of the support in Jarvis the addon is still shipped / enable for music video by default (I did a fresh install of this test build)

@Montellese
Copy link
Member

IIRC the main issue is that there are 3-4 different code paths in our code to start playback. One goes through builtins into a playlist, one goes through builtins and playfile, one goes through playlist and one goes directly through playfile. Depending on which path is taken different metadata is available and/or loaded if necessary. Unfortunately not all paths can be taken from all code places (depending on the thread etc) which leads to this mess.
What we need is ONE way to play an item and ONE way to determine an items details and additional metadata. Right now there are several approaches for both and every combination of them results in different items being used and played.

@MartijnKaijser
Copy link
Member

@Tolriq that's because this PR was branched before merging the removal. Next rebase or merge that's fixed.

@Tolriq
Copy link
Contributor

Tolriq commented Dec 2, 2015

@MartijnKaijser Another slight problem but long press backspace on keyboard in dialogs does no more repeat the backspace so, it's now horrible to delete long text when you have made a mistake. I did remember seeing a PR for adding some longpress support in keymaps, maybe they should not apply in dialogs ? Same for arrows, dialogs are now quite not good.

@MartijnKaijser
Copy link
Member

can we keep on topic to this PR please?

@Tolriq
Copy link
Contributor

Tolriq commented Dec 2, 2015

Well since we are in final betas I find blocking things, forum and trac are not really followed and there's no way to open important issues here that will be followed, at least it's reported do what you want with the information. (I mean look at the trac issue from @da-anda 15 month for something that could have been quickly fixed since ages and he is on the Team)

About the PR, I had one of the habitual random Windows crash but I did press debug so it opened VS but without .pdb nothing usable and pressing continue it did continue to work correctly. And no crash dump / log generated.
Was not able to reproduce.

Apart that I have not found any regressions and it does fix the Trac issue mentioned. Sounds good to me. Let's hope @DaveTBlake have time to fix the other JSON metadata problem and it will be perfect for 17.

@MartijnKaijser
Copy link
Member

Forum and Trac ARE followed. Please do not start a discussion about this here.

@Tolriq
Copy link
Contributor

Tolriq commented Dec 2, 2015

Then http://forum.kodi.tv/showthread.php?tid=250445 for the issue and remembering of blocking track issue 4 month old without action ;)

@DaveTBlake
Copy link
Member Author

@Montellese remembered right regarding the differences in metatdata availability between play from GUI rather than JSON. One play path would be best, so something for K***. Anyone know if there is a ticket for that issue, I find trac hard (and slow) to navigate or search.

Meanwhile back with this PR, going to merge before we go off topic any more!

DaveTBlake added a commit that referenced this pull request Dec 2, 2015
Fix Missing Art in GetItem when Played from Music Addon. Fixes ticket #15416
@DaveTBlake DaveTBlake merged commit 43e0e50 into xbmc:master Dec 2, 2015
@razzeee
Copy link
Member

razzeee commented Dec 2, 2015

There is no ticket for that yet. If it qualifies as a bug feel free to create one.

@da-anda
Copy link
Member

da-anda commented Dec 2, 2015

just testend and seemed to work. Thanks for the fix

@DaveTBlake DaveTBlake deleted the FixAddonPlayMissingArt branch December 3, 2015 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants