unzipping problems
#1
I've been working on the marketplace a while now and lately I've found that more and more files have trouble unzipping and writing to the xbox. Are there limitations to that? I've left it on a while hoping it was just taking a long time, but it never seems to finish writing. I know the box isn't frozen because I can still hit buttons (i.e. change volume, bring up shutdown), so I was wondering if the size of a file can cause a timeout in writing etc. does anyone know or experienced similar problems?
Reply
#2
http://forum.xbmc.org/showthread.php?tid=20387

Could also be a FATX limitation
Quote:The Xbox built-in harddrive is formated in FATX which has a 4GB file-size limitation, and only supports file/folder-names up to 42 characters, a maximum of 255 in total file-structure character-deept and a maximum number of 4096 files/folders in a single subfolder, plus in the root of each partition the maximum number of files/folders is 256. FATX does not either support all ACSII characters in file/folder names (like for example < > = ? : ; " * + , / \ | ¤ &). XBMC will automaticly rename any files/folders you transfer to the Xbox by these limitations. (None of these are XBMC issues that can be fixed as the limitation is in the Xbox itself).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
manturafs:
Are you using pythons zipping libary or xbmc's extract builtin command?

I know the pyhton lib one had issues reguarding unzipping of large files, thats why i coded up the built in, thou someone said that teh builtin wasn't work latley. So just wondering?

Thanks, Donno
** Team XBMC Tester** XBMC 4 ever

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
i think it's python's library. this is the code that's in all the scripts:

Code:
def unzip(path, filename): #Unzips files to path
        try:
            printDebug(msg, "Unzipping file")
            zip = zipfile.ZipFile(filename, 'r')
            namelist = zip.namelist()
            if os.path.exists(path + namelist[0]):
                if xbmcgui.Dialog().yesno('Overwrite?', 'The file ' + namelist[0] + ' already exists.', 'Overwrite this file?') != True:
                    os.remove(path + 'temp.zip')
                    return False, None
            isdir = os.path.isdir
            join = os.path.join
            norm = os.path.normpath
            split = os.path.split
            dirlist = []
            xbmcgui.DialogProgress().update(95,"Unzipping file ...")
            for item in namelist:
                if not item.endswith('/'):
                    root, name = split(item)
                    directory = norm(join(path, root))
                    if not isdir(directory):
                        os.makedirs(directory)
                    file(join(directory, name), 'wb').write(zip.read(item))
            zip.close()
            del zip
            #namelist[0][0:-1] returns the name of the folder the script was installed into (root folder in zip).
            return True, namelist[0][0:-1]
        except:
            printDebug(msg, "An error occoured while unzipping.\nCorrupt file or not a zip file.")
            printDebug(error, "An error occoured while unzipping.\nCorrupt file or not a zip file.")
            return False, None


def install(installpath, url, callback, scriptinfo):
        
        data = download(url, callback)
        if data != None:
            f = open(installpath + 'temp.zip', 'wbo')
            xbmcgui.DialogProgress().update(85,"Unzipping file ...")
            f.write(data)
            xbmcgui.DialogProgress().update(90,"Unzipping file ...")
            f.close()
            state = unzip(installpath, installpath + 'temp.zip')
            if settings.showfolder == 1 and state[0] == True:
                os.remove(installpath + 'temp.zip')
            return state[0]
        else:
            print "DATA = NONE"
            return false

So i could be wrong and it's not the zipping that's giving problems, but the opening or writing. I don't get any error messages either. I'm sure there is a better way to do this, but this is what i came up with.
Reply

Logout Mark Read Team Forum Stats Members Help
unzipping problems0