Release gdrive - Google Drive Video/Music Add-on
(2016-03-04, 11:03)ashlar Wrote:
(2016-03-04, 02:50)dmdsoftware Wrote: Are you using the "continue downloading after player is user-stopped" in cache settings when it stops?
I'm gonna check now, I've never launched Kodi here since yesterday (I test on a different machine than my HTPC)... checking...

No, that option is unchecked. If there are specific tests you want me to conduct with this option, just let me know. Combinations of different settings, whatever, just let me know. Thanks!

Some followup on this.

Turns out KODI's File method doesn't implement the concept of appending to a file. I've dug into the method and it only understands write and read, not append. In python you have write, append and read -- you can also use write in python as append if you open the file in write mode and then seek to the end of the file to write. The write method in KODI actually wipes out the file when you open it in write mode, so you can't either append or seek-and-write.

I just tested by replacing the logic that would handle the append-to-file with python file i/o calls -- works perfect, I can resume a play+cache and it will pick up downloading where it left-off, and playback is perfect. So the concept works.

Only issue is that I can't use this python file i/o because if the user selects a non-local location for their cache (a location only understandable by KODI), then you won't be able to open the file. This would be the case if the user selects a network share or even a special:// location like user, tmp, etc.

So left with really 2 options here if user tries to resume a play+cache:
1) try using the python file i/o and hope that their location is local, otherwise restart the download
2) make a copy of the file and write to the new file (so if user has downloaded 2GB of a movie, it would create a duplicate 2GB file and append the resume download to that file).
Reply


Messages In This Thread
u - by Kraevin - 2015-05-13, 17:37
RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - by dmdsoftware - 2016-03-04, 19:00
Logout Mark Read Team Forum Stats Members Help
gdrive - Google Drive Video/Music Add-on12