zach-morris / plugin.program.iagl

The Internet Archive Game Launcher (IAGL) will launch Games from the Internet using Kodi
GNU General Public License v3.0
344 stars 49 forks source link

Feature requests and small bugs #249

Closed 8-erl closed 1 year ago

8-erl commented 2 years ago

It would be really cool although minor if the download script showed the transferring kilobytes/megabytes per second.

This is from TeamXBMC Windows Kodi Installer addon if it helps. (script.kodi.windows.installer/default.py) I tried to do it but above my ability to hack it into your script on IAGL.(Yours is way more intricate. i tried this and i tried to add a few more download thread for Archive which was one of the best additions i might add.(JDownloader has 20 threads and the downloads from Archive fly!)

import os, time, datetime, traceback, re, threading, json import socket, subprocess, sys import xbmc, xbmcgui, xbmcvfs, xbmcaddon

from bs4 import BeautifulSoup from simplecache import SimpleCache from six.moves import urllib from contextlib import contextmanager

def pbhook(self, numblocks, blocksize, filesize, dia, start_time, fle):
    try: 
        percent = min(numblocks * blocksize * 100 / filesize, 100) 
        currently_downloaded = float(numblocks) * blocksize / (1024 * 1024) 
        kbps_speed = numblocks * blocksize / (time.time() - start_time) 
        if kbps_speed > 0: eta = (filesize - numblocks * blocksize) / kbps_speed 
        else: eta = 0 
        kbps_speed = kbps_speed / 1024 
        if eta < 0: eta = divmod(0, 60)
        else: eta = divmod(eta, 60)
        total   = (float(filesize) / (1024 * 1024))
        label   = '%s %s'%(LANGUAGE(30023),SETTINGS_LOC)
        label2  = '%.02f MB of %.02f MB'%(currently_downloaded,total)
        label2 += '%s %.02f Kb/s'%(LANGUAGE(30024),kbps_speed)
        label2 += '%s %02d:%02d'%(LANGUAGE(30025),eta[0],eta[1])
        dia.update(int(percent), '%s\n%s\n%s'%(label,fle,label2))

=============================================

this more a annoyance than a bug but If a download is broken before complete(UNLESS YOU FIXED THIS) it does not detect it and will not redownload because of bad hash or whatever. I opt to ask when file exists and this is fine but it gets quite annoying when lists like CDI, MAME, FBNEO, Naomi and DC have the bios included in the download of each individual ROM as required and would be cool if it did not ask to redownload these if they exist.

And lastly something that I think does qualify as a bug that causes an error until you figure it out is that if I exist a game too quickly after launch for some reason switches the bool on the Input > Enable Controller Support to off.

=============================================

Anyway before I finish I wanted to say that the netplay integration feature i feature requested i think back when IAGL was IARL is absolutely amazing! you rock dude and IARL/IAGL addon got me interested in and learning all this stuff. thank you Mr Morris.