b-jesch / skin.estuary.modv2

A Skin for Matrix/Nexus/Omega
Other
103 stars 31 forks source link

getFileSize ignore #160

Closed quickmic closed 1 month ago

quickmic commented 1 month ago

Hello, please do me a favor and exclude my plugin from getFileSize.

helpers.py:

Line: fs = 0 if sys.argv[2][0:9] == 'plugin://' else xbmcvfs.File(sys.argv[2]).size() Replace it with: fs = 0 if sys.argv[2][0:9] == 'plugin://' or sys.argv[2][0:17] == '/emby_addon_mode/' else xbmcvfs.File(sys.argv[2]).size()

I hope Kodi will fix the Listitem.size issue one day.

Thanks.

b-jesch commented 1 month ago

Yes, no problem. Could you explain in short why this helper part impacts your plugin?

b-jesch commented 1 month ago

Done https://github.com/b-jesch/skin.estuary.modv2/commit/79b4197e02c68adda242118fba193e7b50a4c16f

quickmic commented 1 month ago

In (very) short, I use a Kodi design flaw (to compensate another Kodi design flaw) and "/emby_addon_mode/" actually redirects to a localhost http link.

Ergo, a file stat request (like size) requests an URL, Kodi is not aware of, otherwise it would block it. The request actually works but puts unnecessary load on the server. Even worse, file stat is an http GET request instead of a HEAD request (I could intercept) and in some cases it could "break" another Kodi workaround (for content multiversions -> episodes and musicvideos) I use. It's complicated... I'm the dev of https://emby.media/community/index.php?/forum/185-emby-for-kodi-next-gen/