slyi
Junior Member Posts: 39 Joined: Sep 2011 Reputation: 0 |
2011-10-30 20:40
Post: #131
Excellent I'll update my sample tomorrow, its the bottom 2 functions
|
| find quote |
Eldorado
Posting Freak Joined: May 2009 Reputation: 11 |
2011-10-31 02:42
Post: #132
slyi Wrote:Excellent I'll update my sample tomorrow, its the bottom 2 functions The 2 cache lookup by imdb functions? Why do you need those versus using the standard either get_meta() or get_episode_meta() ? They both search the cache db first before searching online.. What you are doing in there is also already done in _cache_lookup_episode() and _cache_lookup_by_id(), imdb id's are passed into both, just they are not public |
| find quote |
slyi
Junior Member Posts: 39 Joined: Sep 2011 Reputation: 0 |
2011-11-01 19:30
Post: #133
Eldorado Wrote:The 2 cache lookup by imdb functions? What im after is a way to poll the local cache, without spawning a online request. I was creating the batch querys, as i come from the net world where you aim to hit the DB a little as possible due to net / file io which have a perrf cost normally, maybe on sqlite its less of an issue. Yes the private functions are probably the way to go, but i didnt know if i should reference these directly. Is there an reason, they are private? |
| find quote |
Eldorado
Posting Freak Joined: May 2009 Reputation: 11 |
2011-11-01 23:07
Post: #134
slyi Wrote:What im after is a way to poll the local cache, without spawning a online request. I was creating the batch querys, as i come from the net world where you aim to hit the DB a little as possible due to net / file io which have a perrf cost normally, maybe on sqlite its less of an issue. I usually put functions private if I don't think there's any need to call them externally.. kind of a way to simplify the class ![]() Just took a peak.. if you call them directly you will be missing out on some formatting of the data which I do in get_meta - convert the cast from a string to a tuple which xbmc expects (I have to store it in the db as a string) - create and return 'trailer' with the youtube plugin hookup - Returns the name in 'title' that you passed in rather than the title from the DB - you will notice the movie name in the DB is stripped and lower cased I assumed you would want to search online if it's not found in DB? Otherwise you will have movie/tvshows without meta data in your listings Is it worth it to maybe add a switch to get_meta to search online or not? Edit - ok now that I am fully awake, I read over your code again and see what you are doing.. good idea to group them all and do one batch call, would be interesting to see processing time of batch vs one at a time calls - but I still need to ask, why would you want to skip doing an online call for a movie/tvshow not found in cache db?
(This post was last modified: 2011-11-02 17:25 by Eldorado.)
|
| find quote |
Eldorado
Posting Freak Joined: May 2009 Reputation: 11 |
2011-11-02 17:18
Post: #135
Pushed in some more updates, it's gotta be almost there!
![]() - single movie refresh should be working solid, would like others to test this one out.. it's really meant to correct failed lookups or incorrect matches when searching by name. If you already have the imdb/tmdb id then it may insert a duplicate entry - a bunch of other small fix ups here and there, more logging etc. - dates converting properly now Would really like some good testing against the refresh stuff, I'm pretty sure I got it to be as good as we can get in an addon I've also added a small tester addon to the repository, it's very quick and just shows how to search a movie by the 3 different forms: - by imdb id - by tmdb id - by name/year Then does tvshow, seasons, and episodes all with meta data Also demonstrating how to toggle watched/unwatched status via the context menu.. still need to do some coding to automatically set it when you have actually watched the video, but is outside of metahandlers And last showing how to do a single movie meta refresh via context menu I should note that the tester addon works on the t0mm0's latest version of his common library plus my own edits to add context menu support so it won't actually work until he is able to add that support officially... so for now you can at least read the code ![]() Also... I'm noticing that I'm not getting watched marks to show, has anyone else been able to get them to show up? I'm pretty sure I am correct in setting infolabel 'overlay' to 6 for unwatched, 7 for watched... ? Using the confluence skin you should see a check mark when a video is marked as watched |
| find quote |
slyi
Junior Member Posts: 39 Joined: Sep 2011 Reputation: 0 |
2011-11-04 00:41
Post: #136
Eldorado Wrote:Pushed in some more updates, it's gotta be almost there! This is really good now I refactered my code to use you private methods but I needed add a SQL coalesce to _cache_lookup_episode to allow for tvbd_id to be nullable. For the watched status, could you fire a background thread on play event that polls what's video is currently at 75%? Both file ice sample is on dropbox and updated metahandler is on my github. |
| find quote |
slyi
Junior Member Posts: 39 Joined: Sep 2011 Reputation: 0 |
2011-11-04 11:09
Post: #137
slyi Wrote:This is really good now I refactered my code to use you private methods but I needed add a SQL coalesce to _cache_lookup_episode to allow for tvbd_id to be nullable. watched marks showed up for me for the first time last night, using you latest metahandler and xbmc and simply skin, I did not code for it but, the skin understood I watched it! |
| find quote |
rogerthis
Member+ Posts: 279 Joined: Apr 2011 Reputation: 0 Location: Connacht |
2011-11-04 20:29
Post: #138
slyi Wrote:watched marks showed up for me for the first time last night, using you latest metahandler and xbmc and simply skin, I did not code for it but, the skin understood I watched it! I noticed the same thing. When I was using t0mm0's letmewatchthis addon, after I had finished watching it, it showed a tick for the watched status. I exited the addon and went back into it and the tick was gone. I also stopped another episode I was playing and it shows what seemed like the length of the episode. This was done using ATV1 nightly for about a week ago, Confluence skin. |
| find quote |
Eldorado
Posting Freak Joined: May 2009 Reputation: 11 |
2011-11-04 21:13
Post: #139
The automatic check mark will show as it is a built in xbmc function
Though the trick is catching it and setting it in the DB so that it doesn't get lost.. |
| find quote |
k_zeon
Senior Member Joined: Aug 2011 Reputation: 0 |
2011-11-12 00:06
Post: #140
Hey Eldorado. Just updated t0mm0's modules and also your metautils and there is an error running your metautils tester.
http://pastebin.com/0h52kWtC Finally got back to working on my addon and thought i would run your ones first. |
| find quote |


Search
Help