2019-02-01, 22:56
Ok, so before I post this to to "Github Issues" I'd like to collect some second opinions on the matter.
I took over development of a plugin that lets Kodi consume podcasts and live streams from a public media org, otherwise freely available through it's own official portal. So before you ask, no piracy is involved. Neither does the content of the plugins matter. Thy do what they do, doesn't matter. They work per spec - when installed from zip. I wanted to stpe the game up and make them autoupdatable of course na this is where the trouble begins.
I created a "repository" plugin. My first plan was to use Github for storage. After some time spent on unsuccessful trials I began doubting Kodi can handle ssl, so I moved the storage to https://www.freewebhostingarea.com. Same effect. I am now doubting Kodi can handle HTTP, period. What makes me speculate on that.
First of all, the log entries:
23:25:11.144 T:20292 DEBUG: CAddonInstaller: installing 'plugin.rtvslo.live' version '1.0.0' from repository 'plugin.rtvslo.repo'
23:25:11.147 T:20292 DEBUG: CFileCache::Open - opening <repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5> using cache
23:25:11.151 T:20292 DEBUG: CurlFile::Open(1CA50C60) http://dam-pav.eu5.org/repo.rtvslo/plugi....0.zip.md5
23:25:11.435 T:31256 DEBUG: Thread FileCache start, auto delete: false
23:25:11.435 T:31256 INFO: CFileCache:rocess - Source read didn't return any data! Hit eof(?)
23:25:11.485 T:31256 DEBUG: Thread FileCache 31256 terminating
…
23:25:41.570 T:20292 INFO: XCURL:llLibCurlGlobal::CheckIdle - Closing session to http://dam-pav.eu5.org (easy=1CEB8918, multi=03FFEB88)
I don't think those keyboard events in between are related.
This is the result when I browse into my repo, select a plugin and hit Install. The UI jumps out of the plugin, nothing else. If, for instance, there is no .zip.md5 file, at least Kodi starts showing some info as in "Downloading 0%", then saying "Installation failed". Of course in that case the log entry would say something in the line of "MD5 mismatch after download. Expected <!DOCTYPE" because instead of a checksum the server would return a 404 page. But I digress.
I was curious as of what in the heck was going on during the 30 seconds of idleness. So I started a sniffer. Here is what I get when I do the request with a regular, well basically anything else but Kodi:
Operation, Status: OK (200), GET /repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5, Version: HTTP/1.1
However, when initiated from Kodi, we get:
Operation, Status: Partial Content (206), GET /repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5, Version: HTTP/1.1
Looks like Kodi is issuing a ranged request, then what? Which data is it unable to read? I'd say the md5 data is now read ok because Kodi stopped complaining about the mismatch - HOWEVER, if the md5 file contains garbage Kodi doesn't seem to detect that either.
So, does anyone know what is going on here? Much appreciated!
I took over development of a plugin that lets Kodi consume podcasts and live streams from a public media org, otherwise freely available through it's own official portal. So before you ask, no piracy is involved. Neither does the content of the plugins matter. Thy do what they do, doesn't matter. They work per spec - when installed from zip. I wanted to stpe the game up and make them autoupdatable of course na this is where the trouble begins.
I created a "repository" plugin. My first plan was to use Github for storage. After some time spent on unsuccessful trials I began doubting Kodi can handle ssl, so I moved the storage to https://www.freewebhostingarea.com. Same effect. I am now doubting Kodi can handle HTTP, period. What makes me speculate on that.
First of all, the log entries:
23:25:11.144 T:20292 DEBUG: CAddonInstaller: installing 'plugin.rtvslo.live' version '1.0.0' from repository 'plugin.rtvslo.repo'
23:25:11.147 T:20292 DEBUG: CFileCache::Open - opening <repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5> using cache
23:25:11.151 T:20292 DEBUG: CurlFile::Open(1CA50C60) http://dam-pav.eu5.org/repo.rtvslo/plugi....0.zip.md5
23:25:11.435 T:31256 DEBUG: Thread FileCache start, auto delete: false
23:25:11.435 T:31256 INFO: CFileCache:rocess - Source read didn't return any data! Hit eof(?)
23:25:11.485 T:31256 DEBUG: Thread FileCache 31256 terminating
…
23:25:41.570 T:20292 INFO: XCURL:llLibCurlGlobal::CheckIdle - Closing session to http://dam-pav.eu5.org (easy=1CEB8918, multi=03FFEB88)
I don't think those keyboard events in between are related.
This is the result when I browse into my repo, select a plugin and hit Install. The UI jumps out of the plugin, nothing else. If, for instance, there is no .zip.md5 file, at least Kodi starts showing some info as in "Downloading 0%", then saying "Installation failed". Of course in that case the log entry would say something in the line of "MD5 mismatch after download. Expected <!DOCTYPE" because instead of a checksum the server would return a 404 page. But I digress.
I was curious as of what in the heck was going on during the 30 seconds of idleness. So I started a sniffer. Here is what I get when I do the request with a regular, well basically anything else but Kodi:
Operation, Status: OK (200), GET /repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5, Version: HTTP/1.1
However, when initiated from Kodi, we get:
Operation, Status: Partial Content (206), GET /repo.rtvslo/plugin.rtvslo.live/plugin.rtvslo.live-1.0.0.zip.md5, Version: HTTP/1.1
Looks like Kodi is issuing a ranged request, then what? Which data is it unable to read? I'd say the md5 data is now read ok because Kodi stopped complaining about the mismatch - HOWEVER, if the md5 file contains garbage Kodi doesn't seem to detect that either.
So, does anyone know what is going on here? Much appreciated!