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-12-02 20:06
I wonder if you just don't have enough of the file cached by the time it tries to start playing?
Try bumping the buffer delay to say 20 or more seconds and see how it goes
Look at line 2281:
I've been mainly testing at work with a rather fast connection, so might be the issue..
Edit - just pushed in another quick fix, added a new setting for Buffer Delay.. and a Video Seeking option that picky backs on the download & watch code
- zpanderson - 2011-12-02 21:55
Eldorado Wrote:I wonder if you just don't have enough of the file cached by the time it tries to start playing?
Why not just set the wait time to be dynamic until the downloaded file size is xxx? (whatever the minimum should be...)
- ndeshmukh - 2011-12-02 22:05
Sorry guys, I have been too busy at work to offer any help.
Sometimes in the D&W it so happens that the file on MU is in such a shape that it refuses to play till the whole download happens. Not very frequent, but does happen. In almost all cases, the file is downloading, and XBMC as well as VLC refuses to play it till the whole downloads finishes. I doubt you can do much there.
I don't think XBMC likes the player to start and the addon actually held up waiting for it to stop. It would be better to add those 3 D&W options to the directory listing before you start the player. If you movie actually finishes you could clear up the directory and readd the sources (resembling an up directory) or actually simulate an up directory (I briefly looked but couldn't find it). Basically what I am saying is don't hold up the thread that actually called the player. Agreed that the player runs in its own thread, and it should work, but unfortunately my experience was that it doesn't play ball.
Another important thing I found was that if the sources in the source list were not actually added as folders, then the threading doesn't work well when they are actually clicked upon. i.e. addDirectoryItem( "Sourec 1", isFolder=False) and if teh addon is then invoked from this, then threading inside that is very iffy. Mostly you get the dreaded "Type Error, or Integer required" or some error to that effect. So if it is not added as folder, it is okay to stream, but not okay to do D&W.
- ndeshmukh - 2011-12-02 22:08
I have a mod of my mod for personal use where I do have all the scraped sources from a db you can find on the net bundled with something called an MU Player. But I am too afraid to share it, as that might just put me on the wrong side of DMCA. I would say don't keep any MU links in the addon as cached.
zpanderson Wrote:Since we're doing so much with the metadata and saving to the db is there a reason that we can't just dump the sources in there as well so that the plugin will work (for most things) even when icefilms is down?
- Eldorado - 2011-12-02 23:04
Thanks for the tips ndeshmukh!
Maybe if you have some time we can all try and solidify this download & watch functionality.. I'm sure other addons that will come along will benefit from the work done in Icefilms as well!
For now I've only implemented the file based D&W.. was there any systems that Env based was required?
Everyone - I just pushed in my last update with zpanderson's stacked playlist support
Currently I put it in as is, so it's not integrated to work with download&watch or video seeking at all.. it might be messy coding to get it there... or it might not.. not sure yet
I'm done coding until Monday, so test/fix away
- zpanderson - 2011-12-02 23:47
I just updated to the latest and greatest after completely deleting icefilms and metahandler folders and there's a few things that I'm seeing...
This folder is not being created...
Also, I have fanart enabled for movies and TV shows but it doesn't appear to be scraping it?
- Eldorado - 2011-12-03 00:46
zpanderson Wrote:I just updated to the latest and greatest after completely deleting icefilms and metahandler folders and there's a few things that I'm seeing...
Hmmm... have to check how/where the folder was being created, probably got wiped from the code during the merge from stable -> master.. I haven't tried deleting my Icefilms userdata folder yet
I think there's also some left over/useless folders and variables still in the code.. bit of a mess
I haven't uploaded the fanart yet, it will only display/scrape them when you have the settings turned on and the fanart packs downloaded/installed.. you can override it by setting the two backdrop fields to 'true' in the addons table of the metahandler video_cache.db
- zpanderson - 2011-12-03 01:00
Eldorado Wrote:Hmmm... have to check how/where the folder was being created, probably got wiped from the code during the merge from stable -> master.. I haven't tried deleting my Icefilms userdata folder yet
The folder should be created in the start up part...
Why do you require the downloads to scrape? I would think as long as the setting for fanart is turned on it should scrape...
One situation I think this could be useful in is I know some people who are space limited may only want to scrape their favorites or something along those lines without having to download the entire zip.
Let me know what you think.
 Another thing... Like I was asking earlier, why not have the buffer_delay for download & watch be dynamic until the file is x size? (to keep it independent of download speeds)
- Eldorado - 2011-12-03 19:27
zpanderson Wrote:Why do you require the downloads to scrape? I would think as long as the setting for fanart is turned on it should scrape...
Well it's the same as how the current release is - you want meta data you must install the meta pack
It's so that we don't put a big load on the TMDB and TVDB servers, there's no need to have hundreds (thousands?) of people scraping for the same information and downloading literally thousands of images, Icefilms is crazy popular so we have to be responsible, I'm sure the TMDB guys will thank us
When you navigate into a folder, XBMC will download and temporarily (?) cache all those images, covers are approx. 20k but fanart is usually between 300-400k each, so just think what will happen when you go into say Movies and letter S.. well over a thousand movies all being scrapped, images downloaded.. a single user can easily pull over a gig from them by just browsing the folders, multiple that by the number of people using the addon
If we're thinking of the ATV2 and space, well they might not be able to do fanart, i believe it will slow it down to a crawl anyways.. but other systems, hard drive space is cheap
The idea of allowing just a small area like favorites to scrape sounds reasonable, might be tough to code special rules in for it though.. if you turn meta data on and fanart packs, you will always get prompted for the download on startup
zpanderson Wrote: Another thing... Like I was asking earlier, why not have the buffer_delay for download & watch be dynamic until the file is x size? (to keep it independent of download speeds)
Hmm.. we would have to discuss this one more I think, more ideas the better!
The only trouble I can see with this is how would the user know when their video is going to start? With a time delay it's obvious, with a file size delay.. maybe we would have to use a download progress box? How would they know what the correct size should be, would vary depending on what they are watching
How about we set our own internal file size restriction? Currently I believe it checks if we received at least 100k.. maybe bump that up to 1meg or more? Look in the code for the raise SmallFile error
One crappy part about D&W - if your not receiving fast enough and what you are playing catches up to the download, the video will cut off playing.. have to find a spot to catch that and display a msg
- zpanderson - 2011-12-03 21:55
Eldorado Wrote:Well it's the same as how the current release is - you want meta data you must install the meta pack
It is an interesting question we've got here... I was just messing around and set it to wait until the file is 100mb and show the progress dialog. I'm not sure how to determine what the minimum would be though...
[EDIT] I thought about it some more and decided that we can get the file size from megaupload page and then have a setting to say what % of the file we want cached before it starts playing (updated code snippet as well)
To try and fix the issue where you run out of downloaded video to stream (and it kills the stream) could we monitor the percentWatched and make sure it is over the percentDownloaded then wait for a while? I know that isn't an exact match, but it might at least keep it close...