Mafarricos / Mafarricos-xbmc-dev-addons

Addons still in development
GNU General Public License v2.0
1 stars 1 forks source link

Fanart #16

Closed gb160 closed 9 years ago

gb160 commented 9 years ago

Hi...ive been having a little play around with the code and have managed to successfully integrate posters/fanart and meta data into the addon, so that when an episode or movie is played from the library via Albehas...so that I can now see the movie cover or TV show poster in the osd when paused etc....instead of having the default blank icon, it also now displays the library title for the video, instead of e.g.
moviename.1080p.x264.blah.blah.mkv

I should point out I'm VERY new at python and coding in general so there could well be error/issues, however its working very well for me right now so thought id share im aware i should really create a pull request but i haven't even forked your project yet. The only changes i made were in the 'comecarvideo' function, if you're interested i can post the updated function.

screen shot 2015-06-11 at 11 08 30

screen shot 2015-06-11 at 11 10 29

jorgeavlobo commented 9 years ago

Great job, thanks!

Mafarricos commented 9 years ago

Make a PR so I can check your code against mine :)

gb160 commented 9 years ago

Theres a slight issue with it I'm afraid...mainly being the images/metadata will only show up if the episode/movie is selected from the library....they won't show up if selected from widgets on the home screen.....just checked and genesis displays them correctly and the code I've used is almost identical.

Hoping you can have a look and see if u can fix it ;)

I had the same issue where if i was watching an episode , and selected another one while the first one is still playing, the images/data won't show up...i hacked my way round that by putting a 'xbmc.Player().stop()' command at the beginning of the function, which solves the issue when starting an episode while one is already playing....but I'm still left with the issue where there is no art if selected from a widget.

the only function I've changed is comecarvideo.....the code is here: http://pastebin.com/dTKyT328

regards

Mafarricos commented 9 years ago

plugin.video.abelhas-1.0.3~beta005 should have your code. The problem is that from widget you have diferente xbmc. properties, I will have to check if is possible. From addon it self is not possible as the addon hasn't a internal scrapper.

gb160 commented 9 years ago

Ok mate....glad to help out. I noticed the version this is up to beta007 now....did much else change?

Mafarricos commented 9 years ago

some minor fixes detected by jorgeavlobo

jorgeavlobo commented 9 years ago

Fanart not working when a movie file is chosen from the kodi main screen of the recent added movies. It will show the name "file.asp" and no fanart. The same movie files will work if chosen from inside the movie section.

Cheers!

gb160 commented 9 years ago

It's clearly stated above that's a limitation.

Mafarricos commented 9 years ago

Yes, that's a known fact. Probably will not be fixed, as the movie would have to be identified from the addon to work in any case.

gb160 commented 9 years ago

Hello...ive made some progress and managed to enable fanart and metadata when playing from home screen widgets....im testing it right now and so far seems to be working very well. You can view the changes on my fork of your project, but i won't issue a PR until i solve one last thing, which is to enable the watched status update when playing from the home screen widgets. Tested so far on Confluence and Titan skins.

This is where I'm hoping you can help.....and its probably something really easy I'm missing: if you look at the comecarvideo function, I'm setting a variable 'dbid' which is either the episodeid if an episode is being played, or movieid if a movie is being played..... how the hell do i make that variable 'dbid' available in the internalPlayer.py.....so that it can be used in the onplaybackstopped and onplaybackended functions?

If you can help me solve this .... the features are good to go.

Excuse my messy coding, theres loads of print statements that aren't necessary but while I'm debugging they come in handy...ill clean it all up before a PR.

There are one or two instances when the fanart won't show up but thats down to the naming convention of the strm files(more accurately its probably more to do with the way the files are named on the abelhas site)....but in the vast majority of cases its working very well.

Mafarricos commented 9 years ago

if you want to send to internalplayer you have to change this: xbmcPlayer = internalPlayer.Player(title=title) add a new argument, and treat it like title on the internalplayer side.

Mafarricos commented 9 years ago

Think, this can be closed. beta016 already working with your changes.