XBMC Community Forum
Icefilms (Icefilms.info) Addon Development Thread - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: Icefilms (Icefilms.info) Addon Development Thread (/showthread.php?tid=90315)



- Eldorado - 2011-11-02 16:23

zpanderson Wrote:I haven't found much so far with the state of icefilms being mostly down in the evenings, but I have gotten close to finishing the auto-watched. Hopefully I'll have it done tonight.

K, I know of a bunch of bugs and things just working odd.. be sure to keep looking thru your debug log as there should be a lot of messages written there


- zpanderson - 2011-11-03 16:47

Okay, so I've been noticing some really strange behavior with the meta_cache db. Is it supposed to be located in the user_data folder or the addon? I see it both places and it seems like it randomly chooses which one to useConfused Also, why does it 'clean' (delete) the meta db at startup if you choose not to dl the zip?


- Eldorado - 2011-11-03 17:34

zpanderson Wrote:Okay, so I've been noticing some really strange behavior with the meta_cache db. Is it supposed to be located in the user_data folder or the addon? I see it both places and it seems like it randomly chooses which one to useConfused Also, why does it 'clean' (delete) the meta db at startup if you choose not to dl the zip?

haha yep, that stuff is a bit of a mess.. has to do with the folders and how they are defined at the start of the addon, I was getting a headache trying to figure them all out!

Possibly the merge to stable caused some of the mess as well

I was actually planning on taking out all the meta data coding done and replace it with my metahandlers module when it's finished.. will be much cleaner


- zpanderson - 2011-11-03 20:58

Alright, so how should I go about adding in the auto-watched feature. Basically what I did was add a few extra .txt files with imdbnum/etc. and instead of calling the default xbmc player created MyPlayer which keeps track of the currentTime and totalTime. When playback is ended it calcs the percent watched and then calls changeWatched if it's above a certain percentage (.75 ish because movies have long credits).


- Eldorado - 2011-11-03 21:25

zpanderson Wrote:Alright, so how should I go about adding in the auto-watched feature. Basically what I did was add a few extra .txt files with imdbnum/etc. and instead of calling the default xbmc player created MyPlayer which keeps track of the currentTime and totalTime. When playback is ended it calcs the percent watched and then calls changeWatched if it's above a certain percentage (.75 ish because movies have long credits).

Cool stuff.. I wasn't sure how to go about the auto-watch stuff or if there was already some functionality in xbmc that we could take advantage of, have you looked into that at all?

I guess in the end the only part that would change from what you have now would be the actual updating of the watched flag.. which in metahandlers is almost the same as what Icefilms currently has


- zpanderson - 2011-11-04 16:09

Well how can I send it to you so you can see if it's okay?


- Eldorado - 2011-11-04 21:15

zpanderson Wrote:Well how can I send it to you so you can see if it's okay?

Best/easiest way is to get yourself up and running with an account on github.. submit a pull request to my icefilms repo to submit the code

For the how-to's etc on doing this, too much for me to type but there are lots of very good how-to's out there and explain it very well


- Eldorado - 2011-11-10 01:29

Been doing a little bit of work lately that I haven't pushed to repo yet

Mainly involving changing Icefilms over to use the metahandlers library, so far so good.. but so many little things that could use cleaning up!

zpanderson - still haven't gotten a chance to look at your code! Smile

Wondering if you were able to look into the possibility of grabbing that auto-watched flag from an xbmc function rather than the manual work? Though it looks like you spent a good amount of time on it so would hate to not use it


- zpanderson - 2011-11-10 01:35

I looked for a function but couldn't really find anything and it ended up being faster to just add my own. The only real issue that I'm seeing is that my movies and tv shows are being stored in different video_cache.db. This means that when a movie is watched I'm pointing to the wrong db so it doesn't get updated.

Also, I'm occasionally getting an error regarding get_source which comes from a refresh that is done after the watched flag is set.

I probably should add some comments into the code that I added to ease the reading... Try to do that soon...


- Eldorado - 2011-11-10 17:27

Maybe I'll start a quick thread to ask the question of grabbing the watched status from xbmc.. maybe one of the dev's will be able to comment if it's possible or not..

Yeah the meta stuff is a bit of a mess.. by switching it over to the metahandlers library it cleans it up quite a bit, and of course adds much more meta data to the movies and tv shows

Almost there, just need to fix up a couple issues with episodes.. meta data for favorites and search results might have some issues