MikeSiLVO / script.skinshortcuts

GNU General Public License v2.0
18 stars 21 forks source link

Submenu gets de-linked from main menu item #3

Closed BobCratchett closed 3 years ago

BobCratchett commented 5 years ago

When changing the action for a main menu item, the submenu is getting de-linked - e.g. clicking on 'Edit submenu' takes you to a blank menu, even if the menu item previously had submenu items.

Internally, this is likely linked to the none type error you've been getting when editing menu items. When changing items, copies are made and properties are added to it - most likely, at some point the properties which tell the script which submenu was originally linked to it aren't getting copied across.

MikeSiLVO commented 5 years ago

Not sure if latest commits have fixed this but I can't reproduce it ATM.

What are the exact steps?

I changed action then clicked edit submenu. I also tried changing the action, let the menu rebuild, and tried to edit submenu and it is working for me.

MikeSiLVO commented 5 years ago

@BobCratchett Just curious if the submenu is still getting de-linked?

Thanks 😃

BobCratchett commented 5 years ago

We now testing against the python3 branch? I'll try to test tomorrow morning, otherwise I should be able to Sunday afternoon/evening.

MikeSiLVO commented 5 years ago

Yes sir. I really messed something up in the test_branch so I deleted it and added everything to python_3.

I am now trying to fix the last error I keep getting which is:

2019-09-06 12:10:00.116 T:18446744073709551614   DEBUG: script.skinshortcuts: Unable to generate hash for b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\16x9\\script-skinshortcuts-includes.xml'
2019-09-06 12:10:00.116 T:18446744073709551614   DEBUG: script.skinshortcuts: (ea7112d8dd88c63a16f35784ceb572ed > ?)

Any pointers on where to focus on in the code? Seems like the same need to encode the file read as before but not sure where, if it even is a different place, this one is coming from.

MikeSiLVO commented 5 years ago

Looks like it is adding \\ so maybe there is another check like this one or I messed that up.

BobCratchett commented 5 years ago

Can't give you line numbers as my local code is out of kilter with the current, but that hash is generated at the end of the writexml function in xmlfunctions - the code block

        # Save the tree
        DATA.indent( tree.getroot() )
        for path in paths:
            tree.write( path, encoding="UTF-8" )

            # Save the hash of the file we've just written
            with open(path, "r+") as f:
                DATA._save_hash( path, f.read() )
                f.close()

is saving the includes file and then generating its hash.

MikeSiLVO commented 5 years ago

Not sure if I am getting this right but the problem seems to be reading the hash and not generating it.

I am not sure so just want to explain what I see to check if that is correct.

This (ea7112d8dd88c63a16f35784ceb572ed > ?) looks like it is getting the hash[1] which is the one from the .hash file or maybe somewhere else and not the one from the actual xml file using hasher.hexdigest()?

I don't know if I am making any sense...

MikeSiLVO commented 5 years ago

I swear I could remember some comments explaining what hash[0] and hash[1] was but I can't seem to find it ATM...

BobCratchett commented 5 years ago

Hash[0] tells the script what type of information is contained in hash[1] - for example, if hash[0] is ::XBMCVER::, then hash[1] contains the Kodi version number that the script last built against. But fundamentally, you're right - it looks like its generated the hash correctly when writing the includes and the .hash file.

If it isn't something what ::'s around it, then hash[0] contains the path and name of the file whose hash is contained in hash[1]. First instinct, is the path contained in hash[0] exactly correct...?

Second instinct, remove the try: except: block - leave the code within the try block (obviously re-indenting after removing the try command), and remove the except entirely. The script will crash, but it will produce a full error message and traceback and tell you exactly why it failed!

BobCratchett commented 5 years ago

(edit - the path in hash[0] isn't correct - it's a byte, not a string so its encoding is wrong - so the script can't load that path to try and check the hash)

BobCratchett commented 5 years ago
        # Save the tree
        DATA.indent( tree.getroot() )
        for path in paths:
            tree.write( path, encoding="UTF-8" )

            # Save the hash of the file we've just written
            with open(path, "r+") as f:
                DATA._save_hash( path, f.read() )
                f.close()

in the DATA._save_hash line, path needs encoding/decoding/etc before being passed to the _save_hash function

MikeSiLVO commented 5 years ago

Could this part be messing it up also? https://github.com/mikesilvo164/script.skinshortcuts/blob/python_3/resources/lib/xmlfunctions.py#L85 or not related?

Something like this maybe?

            # Save the hash of the file we've just written
            with open(path.decode("utf-8"), "r+") as f:
                DATA._save_hash( path, f.read().encode("utf-8"))
                f.close()
MikeSiLVO commented 5 years ago

Nope that's wrong no attribute decode for str...

BobCratchett commented 5 years ago

Yes, that could be messing it up also. There shouldn't (unless it just can't be worked around) be any strings anywhere in the script that are b"" - technically they're not strings, they're byte arrays.

Nope, nothing like that. It's just the saving of the path string that's not working. Saving the file itself and generating its hash is working fine, so something like

            with open(path, "r+") as f:
                DATA._save_hash( path.encode("utf-8"), f.read())
                f.close()

(or possibly decode - my brain can't remember right now!)

MikeSiLVO commented 5 years ago

Alright changed that but no effect on the unable to get the hash issue and removing the b causes the below error which made me add it in the first place.

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
   - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
  Error Type: <class 'TypeError'>
  Error Contents: a bytes-like object is required, not 'str'
  Traceback (most recent call last):
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\default.py", line 449, in <module>
      Main()
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\default.py", line 89, in __init__
      XML.buildMenu( self.MENUID, self.GROUP, self.LEVELS, self.MODE, self.OPTIONS, self.MINITEMS )
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 85, in buildMenu
      if "://" in dir and sys.version_info.major == 3:
  TypeError: a bytes-like object is required, not 'str'
-->End of Python script error report<--

Still learning the basics here so my apologies and please bare with me here as I make a fool of myself 😜

MikeSiLVO commented 5 years ago

Just wondering if I can delete all that if "//" and just default to translatepath...?

BobCratchett commented 5 years ago

What is now showing in your .hash file? Preferably, all the entries (aside from the :: one's), should be something on the lines of

['/full/path/to/file/file.xml','hashstring']

or possibly, due to py2/3 differences

[u'/full/path/to/file/file.xml',u'hashstring']

(note, non should be [b'/full/path/to/file/file.xml','hashstring'])

If they are, then we're now saving them as strings, so your code that is throwing an error is no longer required (we're not now loading a bytes array - we're loading a string!).

There may still be some py2/3 differences if one is saving them with a u before the string and one not - but ideally they will both be saving them the same way (from what I gather, the big BIG difference between py2/3 on Kodi is that Kodi itself will return strings in different formats dependant on the version - ideally, anything the script is saving itself will be saved in the same format on both.) We definitely won't need to be checking if if b"://" because we're not saving it as a byte array.

Does that make sense?

And please don't worry about making a fool of yourself when it comes to all this encoding/decoding stuff. It's an absolute bloody nightmare. Remember that 'try_decode()' block I said was a bodge? I wrote that because I just got to the point where I couldn't be arsed trying to work out if I should be decoding something or not, and thought I might as well throw it to a block that will try and not give an error if it can't 😏

MikeSiLVO commented 5 years ago

Currently after making the changes you said and fixing some other errors on my part that did not come to light before those changes it looks like this: [['::PROFILELIST::', [['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\', 'String.IsEqual(System.ProfileName,Master user)', 'Master user']]], ['::SCRIPTVER::', '1.0.20'], ['::XBMCVER::', '19'], ['::HIDEPVR::', 'false'], ['::SHARED::', 'true'], ['::SKINDIR::', 'skin.aeon.nox.silvo'], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\overrides.xml', '39b1c16685a38957bb7e7d2ea1cbf317'], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\template.xml', 'f7e0ef8faf2cba2bd5c677bdb7c1838c'], ['::FULLMENU::', 'True'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\mainmenu.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\mainmenu.DATA.xml', '743915f4c146e2fed7313bb3b2d07a8b'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\overrides.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\mainmenu.DATA.xml', '743915f4c146e2fed7313bb3b2d07a8b'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\pictures.DATA.xml', '5bcd60d1f73d0e171a3fe578c297b256'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\1-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\1-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\1-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\1-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\1-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\1-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\music.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\music.DATA.xml', 'af6d0e4bff5766c8d0345aab43308adb'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\music-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\music-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\music-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\music-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\20342.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\movies.DATA.xml', '905523884ea3c3ee249c19d3fe0d1b5d'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\20342-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\20342-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\20342-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\20342-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\tvshows.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\tvshows.DATA.xml', '130fa44814485da7da95711b38bc19aa'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\tvshows-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\tvshows-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\tvshows-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\tvshows-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\31502.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\livetv.DATA.xml', 'a75b3ce76253bdd15eebcdd691f0f479'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\31502-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31502-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31502-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\31502-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31502-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31502-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\videos.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\videos.DATA.xml', '1783e1a991681f953a21921c0be2519f'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\videos-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\videos-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\videos-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\videos-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\31957.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\programs.DATA.xml', 'b00920f9704f6f79a93a8d00fc34cc8f'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\31957-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31957-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\31957-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31957-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\15016.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\games.DATA.xml', '48aa3134b8b33ed873e2937008be99d3'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\15016-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\15016-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\15016-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\15016-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\15016-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\15016-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\13000.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\settings.DATA.xml', '6115c8cbc133ece28074944e42078f47'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\13000-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\13000-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\13000-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\13000-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\137.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\search.DATA.xml', '48aa3134b8b33ed873e2937008be99d3'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\137-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\137-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\137-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\137-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\137-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\137-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\31958.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\playdisc.DATA.xml', 'c44c3e67ba791781178206ae0d7d2d37'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\31958-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31958-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\31958-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31958-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\33060.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\power.DATA.xml', '6ff3e500a0f24f05dc6aba1021965649'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\33060-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\33060-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\33060-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\33060-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\33060-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\33060-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\1036.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\favourites.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\favourites.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\1036-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\1036-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\1036-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\1036-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\1036-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\1036-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\weather.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\weather.DATA.xml', '48aa3134b8b33ed873e2937008be99d3'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\weather-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\weather-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\weather-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\weather-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\weather-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\weather-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\musicvideos.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\musicvideos.DATA.xml', 'e7d34e999a125d4b92c99584f90c8a3f'], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\musicvideos-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\musicvideos-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\musicvideos-1.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\userdata\\special:\\\\masterprofile\\addon_data\\script.skinshortcuts\\musicvideos-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\musicvideos-2.DATA.xml', None], ['C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\musicvideos-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\16x9\\script-skinshortcuts-includes.xml', '1aa03c88dab6169e31d2bc768ef15cd5'], ['::SKINVER::', '7.9.2']]

MikeSiLVO commented 5 years ago

I see at least one 'b' but before I made these last changes they were, I think all prefaced with a 'b'.

I commented out the if"//" stuff just to get the script to run and made another change adding decode here to fix yet another error that popped: dir = xbmc.translatePath(os.path.join("special://masterprofile", dir.decode("utf-8")))

My previous .hash file before these changes is in the last comment in https://github.com/mikesilvo164/script.skinshortcuts/issues/5

BobCratchett commented 5 years ago

Can I get a .hash file from py2 to compare? 👼

MikeSiLVO commented 5 years ago

That is the old one listed in issue 5. I can post it here if it's more convenient. https://github.com/mikesilvo164/script.skinshortcuts/issues/5

BobCratchett commented 5 years ago

I can't see a .hash file in that (getting a 404 error following the link) - I'm actually just curious if they're prepended with a u or not. But I do see two with b's in this file. So let's sort them.

The first is the template.xml file. This is in template.py - quick fix would be in _save_hash function, something alongs the lines of (if py3)

filename = filename.decode("utf-8")

Then the includes.xml is still being saved with a b, so that probably wants to be decode() rather then encode() (hence why I've gone for decode in template.py).

They're the only 2 I can see from a quick scan of the .hash file...

MikeSiLVO commented 5 years ago

I see a 'u' from my master branch using latest Kodi Leia. Will post it below just in case it is helpful. Weird about the link it just goes to issue 5...

MikeSiLVO commented 5 years ago
[['::PROFILELIST::', [[u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\', u'String.IsEqual(System.ProfileName,Master user)', u'Master user'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\', u'String.IsEqual(System.ProfileName,Guest)', u'Guest'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\', u'String.IsEqual(System.ProfileName,Kids)', u'Kids']]], ['::SCRIPTVER::', '1.0.20'], ['::XBMCVER::', '18'], ['::HIDEPVR::', 'false'], ['::SHARED::', 'false'], ['::SKINDIR::', 'skin.aeon.nox.silvo'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\overrides.xml', '9cbd409a00763c0a5921041f145a0de4'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\template.xml', '2cda790c2e846e77cc12df2e61914b2b'], ['::FULLMENU::', 'True'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-mainmenu.DATA.xml', '101951f32a616f1ba674a59f05fb0b4a'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\overrides.xml', None], ['C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo.properties', '03459e22e96d197cfde784a57a1cc2a2'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\mainmenu.DATA.xml', '6f2a3dea8b92cf92a0916ec101bad243'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-games.DATA.xml', '379c0cb0f0c8c3963235d19fe6e1308b'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-games-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\games-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\games-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-games-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\games-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\games-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-music.DATA.xml', '7072d3b425ef367a68e4e37be0458d11'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-music-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\music-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-music-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\music-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-tvshows.DATA.xml', '8665a0518e8c209ab84fbaa49e1fa792'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-tvshows-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\tvshows-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-tvshows-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\tvshows-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-20342.DATA.xml', 'c54e774b9d04efb72c8853e7bcf3dcbd'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-20342-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\20342-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-20342-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\20342-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-videos.DATA.xml', '84605e580f0b2fc9393a6f4e59d65482'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-videos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\videos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-videos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\videos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31957.DATA.xml', '6c7c6b3e04347dad9629ad0e286abdfb'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31957-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31957-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31957-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31957-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-13000.DATA.xml', 'b40b4a79c2948a009268273ef7cf44f0'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-13000-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\13000-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-13000-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\13000-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31958.DATA.xml', 'febfa78ff3be36181571a55dd7ca1304'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31958-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31958-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31958-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31958-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-2.DATA.xml', None], ['::FULLMENU::', 'True'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-mainmenu.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\mainmenu.DATA.xml', '6f2a3dea8b92cf92a0916ec101bad243'], ['C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo.properties', 'b25053358e96e2ed44822baf52ca9c66'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\mainmenu.DATA.xml', '6f2a3dea8b92cf92a0916ec101bad243'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\pictures.DATA.xml', 'e20936999c984c7b01edb1772ff81392'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\1-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\1-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\1-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\1-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-music.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\music.DATA.xml', '2e9a71a151aa2cc996c24beb4f6628c8'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-music-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\music-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-music-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\music-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-20342.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\movies.DATA.xml', '731bf78febe8ec5d84ffa2b2de76c833'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-20342-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\20342-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-20342-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\20342-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-tvshows.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\tvshows.DATA.xml', '7f1330fbb9a900bb279d1744cadee1df'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-tvshows-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\tvshows-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-tvshows-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\tvshows-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31502.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\livetv.DATA.xml', '5eb9539fbee3222dc4e29739f26d5abe'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31502-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31502-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31502-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31502-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31502-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31502-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-videos.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\videos.DATA.xml', '219ca09edc52f2dc50b7214411448998'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-videos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\videos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-videos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\videos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31957.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\programs.DATA.xml', '3f424aa8e2b39202f99469dfb7b0c727'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31957-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31957-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31957-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31957-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-15016.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\games.DATA.xml', '57f8fb6d7a0362d75cc460ae611109d3'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-15016-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\15016-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\15016-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-15016-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\15016-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\15016-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-13000.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\settings.DATA.xml', '66240cc073e845e801ce31824dbdc930'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-13000-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\13000-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-13000-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\13000-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-137.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\search.DATA.xml', '57f8fb6d7a0362d75cc460ae611109d3'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-137-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\137-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\137-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-137-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\137-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\137-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31958.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\playdisc.DATA.xml', '08c7a4c887e76c3ee19d59708d2723fa'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31958-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31958-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31958-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31958-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-33060.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\power.DATA.xml', 'a1148ef2705c54440920a30d9ac3041b'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-33060-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\33060-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\33060-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-33060-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\33060-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\33060-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1036.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\favourites.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\favourites.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1036-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\1036-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\1036-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1036-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\1036-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\1036-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-weather.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\weather.DATA.xml', '57f8fb6d7a0362d75cc460ae611109d3'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-weather-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\weather-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\weather-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-weather-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\weather-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\weather-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-musicvideos.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\musicvideos.DATA.xml', 'c4f029dc0222de03d9075bc6be27d09e'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-musicvideos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\musicvideos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\musicvideos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Guest\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-musicvideos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\musicvideos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\musicvideos-2.DATA.xml', None], ['::FULLMENU::', 'True'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-mainmenu.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\mainmenu.DATA.xml', '6f2a3dea8b92cf92a0916ec101bad243'], ['C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo.properties', '3ebea811c8dcf0b851bd7b6e7ac0a76e'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\mainmenu.DATA.xml', '6f2a3dea8b92cf92a0916ec101bad243'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\pictures.DATA.xml', 'e20936999c984c7b01edb1772ff81392'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\1-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\1-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\1-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\1-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-music.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\music.DATA.xml', '2e9a71a151aa2cc996c24beb4f6628c8'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-music-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\music-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-music-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\music-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-20342.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\movies.DATA.xml', '731bf78febe8ec5d84ffa2b2de76c833'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-20342-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\20342-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-20342-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\20342-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-tvshows.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\tvshows.DATA.xml', '7f1330fbb9a900bb279d1744cadee1df'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-tvshows-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\tvshows-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-tvshows-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\tvshows-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31502.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\livetv.DATA.xml', '5eb9539fbee3222dc4e29739f26d5abe'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31502-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31502-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31502-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31502-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31502-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31502-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-videos.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\videos.DATA.xml', '219ca09edc52f2dc50b7214411448998'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-videos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\videos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-videos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\videos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31957.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\programs.DATA.xml', '3f424aa8e2b39202f99469dfb7b0c727'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31957-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31957-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31957-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31957-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-15016.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\games.DATA.xml', '57f8fb6d7a0362d75cc460ae611109d3'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-15016-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\15016-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\15016-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-15016-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\15016-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\15016-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-13000.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\settings.DATA.xml', '66240cc073e845e801ce31824dbdc930'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-13000-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\13000-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-13000-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\13000-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-137.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\search.DATA.xml', '57f8fb6d7a0362d75cc460ae611109d3'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-137-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\137-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\137-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-137-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\137-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\137-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31958.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\playdisc.DATA.xml', '08c7a4c887e76c3ee19d59708d2723fa'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31958-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31958-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-31958-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\31958-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-33060.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\power.DATA.xml', 'a1148ef2705c54440920a30d9ac3041b'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-33060-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\33060-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\33060-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-33060-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\33060-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\33060-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1036.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\favourites.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\favourites.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1036-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\1036-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\1036-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-1036-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\1036-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\1036-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-weather.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\weather.DATA.xml', '57f8fb6d7a0362d75cc460ae611109d3'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-weather-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\weather-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\weather-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-weather-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\weather-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\weather-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-musicvideos.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\musicvideos.DATA.xml', 'c4f029dc0222de03d9075bc6be27d09e'], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-musicvideos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\musicvideos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\musicvideos-1.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\userdata\\profiles\\Kids\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo-musicvideos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\shortcuts\\musicvideos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\script.skinshortcuts\\resources\\shortcuts\\musicvideos-2.DATA.xml', None], [u'C:\\Users\\mikes\\AppData\\Roaming\\Kodi\\addons\\Aeon-Nox-SiLVO\\16x9\\script-skinshortcuts-includes.xml', 'c9454f10c1a9a40be473d6d6cd2aa303'], ['::SKINVER::', '7.0.6']]
BobCratchett commented 5 years ago

Thanks for confirming. I'm starting to get the feeling we're setting ourselves up here for major problems with our international friends - the 'u' denotes unicode, which helps us with paths with ß's and é's and the like. It's possible the b is just py3's equivalent and we actually want it. But, let's start by getting the code saving and loading everything in one encoding before we worry about that (and I have a VM here somewhere set up to test for issues like that, so once we've got the code working with one encoding, I should be easily able to adjust it to work for another - so leave that with me)

MikeSiLVO commented 5 years ago

Getting error saving:

ERROR: Traceback (most recent call last):
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR:   File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\template.py", line 55, in __init__
                                                self._save_hash( templatepath, xbmcvfs.File( templatepath ).read() )
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR:   File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\template.py", line 914, in _save_hash
                                                filename = filename.decode("utf-8")
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR: AttributeError: 'str' object has no attribute 'decode'
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR: 
                                            During handling of the above exception, another exception occurred:
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR: Traceback (most recent call last):
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR:   File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 113, in buildMenu
                                                self.writexml( profilelist, mainmenuID, groups, numLevels, buildMode, progress, options, minitems )
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR:   File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 355, in writexml
                                                Template = template.Template()
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR:   File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\template.py", line 61, in __init__
                                                self._save_hash( templatepath, xbmcvfs.File( templatepath ).read() )
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR:   File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\template.py", line 914, in _save_hash
                                                filename = filename.decode("utf-8")
2019-09-06 15:19:30.889 T:18446744073709551614   ERROR: AttributeError: 'str' object has no attribute 'decode'

I'll paste full log in new post below.

MikeSiLVO commented 5 years ago

LOG

MikeSiLVO commented 5 years ago

From my limited understanding all strings are unicode by default in Python 3. 🤔

Found this explanation if it helps:

Literal strings are unicode by default in Python3.

Assuming that text is a bytes object, just use text.decode('utf-8')

unicode of Python2 is equivalent to str in Python3, so you can also write:

str(text, 'utf-8')
BobCratchett commented 5 years ago

I'm about at the limit of what I can do - I don't have the ability to actually touch code at this moment. But where we're at is that we need to get all the paths in the hash saving with the same encoding (then we can easily modify them all if that encoding is wrong, depending on the encoding decoding; load them all in the same way, so forth). We've identified the two file names (did you spot any more in the .hash?) which aren't saving in the same way as the others, and where in the code they're saving. We just haven't got the encoding right.

Is that about right?

If so, I'll try to look properly in the morning, otherwise I definitely will have the ability Sunday :)

(But ultimately, it's the encoding/decoding of path and filename at the two places we've identified ... I think!)

(And thanks for that - so, if I'm reading that correctly we want and expect the 'u' on py2, we want and expect no leading letter on py3)

MikeSiLVO commented 5 years ago

I just see the two currently.

I think it is encode and decode consistently or remove them except where we need to specify to avoid an error.

I think I may be onto something here just gonna spend some time with it and test to find out.

Thanks :)

MikeSiLVO commented 5 years ago

@BobCratchett Quick update.

I was having a lot more trouble adding the code you suggested so it was easier for me to make it all bytes since you said it would be ok if they were all the same encoding.

I will push a new test_branch for you to peruse when you get a chance.

The new .hash file looks like this now:

[['::PROFILELIST::', [['C:\\Kodi (Python 3)\\portable_data\\userdata\\', 'String.IsEqual(System.ProfileName,Master user)', 'Master user']]], ['::SCRIPTVER::', '1.0.20'], ['::XBMCVER::', '19'], ['::HIDEPVR::', 'false'], ['::SHARED::', 'true'], ['::SKINDIR::', 'skin.aeon.nox.silvo'], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\overrides.xml', '39b1c16685a38957bb7e7d2ea1cbf317'], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\template.xml', 'f7e0ef8faf2cba2bd5c677bdb7c1838c'], ['::FULLMENU::', 'True'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\mainmenu.DATA.xml', '20ece20e0c618ffc62f74c2f11ab8c6b'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\overrides.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\skin.aeon.nox.silvo.properties', 'f7bc1791fc112307567bd9c039041cd5'], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\mainmenu.DATA.xml', '743915f4c146e2fed7313bb3b2d07a8b'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\15016.DATA.xml', '379c0cb0f0c8c3963235d19fe6e1308b'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\15016-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\15016-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\15016-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\15016-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\15016-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\15016-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\music.DATA.xml', 'd8c3c1682adb6dd6cde4c607db7322cd'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\music-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\music-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\music-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\music-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\music-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\20342.DATA.xml', '6eeaf46b98d5ea899b98b12f7780f2cf'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\20342-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\20342-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\20342-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\20342-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\20342-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\tvshows.DATA.xml', 'f5954bf276ec46f3fbc89b89db83b198'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\tvshows-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\tvshows-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\tvshows-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\tvshows-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\tvshows-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\videos.DATA.xml', '1d975c3924bb206bf8ea27255f4339db'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\videos-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\videos-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\videos-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\videos-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\videos-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\31957.DATA.xml', '0d43c87dba81165c0b6f5dcf55a6d2f6'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\31957-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31957-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\31957-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31957-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31957-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\13000.DATA.xml', 'c71f3dab22b68294168a3461d44dd1ba'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\13000-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\13000-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\13000-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\13000-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\13000-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\31958.DATA.xml', '16715120710f7a36e36ecf320ab05cf9'], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\31958-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31958-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-1.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\userdata\\addon_data\\script.skinshortcuts\\31958-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\31958-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\script.skinshortcuts\\resources\\shortcuts\\31958-2.DATA.xml', None], [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\16x9\\script-skinshortcuts-includes.xml', 'b646098886be03429de15da137f2a3bc'], ['::SKINVER::', '7.9.2']]
BobCratchett commented 5 years ago

The best solution is always the one that works :wink:. Can I presume now that all the files in the .hash file are saved with the same encoding in the file, and so we can load them all with the same code? If so, that's great - we're at a point where everything is working, and we can now adjust all of them at once rather than try to manage them individually.

My suspicion is the best way to get the script to the ideal point (which is where we're saving everything as strings, not bytes - and that being the best solution because, without diving into the code, my suspicion is in the vast majority of cases we're going to be encoding/decoding at load, and then inverting that at save) is to get all of them into the correct format (string, as primarily we're using them as just strings) as early as possible, especially when they're coming from xbmcvfs, which I suspect is where the byte array version is coming from. I'll do my best when I'm actually in a position to mess with code rather than just look at it, to see how early and easily we can possibly do that :)

MikeSiLVO commented 5 years ago

Everything appears to be bytes except the beginning profile location:

[['::PROFILELIST::', [['C:\\Kodi (Python 3)\\portable_data\\userdata\\', 'String.IsEqual(System.ProfileName,Master user)', 'Master user']]], ['::SCRIPTVER::', '1.0.20'], ['::XBMCVER::', '19'], ['::HIDEPVR::', 'false'], ['::SHARED::', 'true'], ['::SKINDIR::', 'skin.aeon.nox.silvo']

Past this all 63 of them start with b.

Also everything works except the unable to hash the script-skinshortcuts-includes.xml file. Can't find anything that doesn't work.

That and probably the single build mode due to a basestring still there: if buildMode == "single" and not isinstance( item, basestring ):

BobCratchett commented 5 years ago

Sorry, should have been clear - I was asking specifically about the filenames/hashes (as these are saved in three - that I can think of - places, but all processed by one code block, so it's important that they're all saved the same so they can be processed the same. The :: encased blocks are all saved and processed individually, so their encoding is less important.

If you still can't hash the includes file, take a look at my earlier comment about removing the try: except: block - that will give a more specific error - but is likely still that the script can't convert the bytes array to a string that it can understand - and I'll take a proper look when I'm able in the next day or two.

I'm not aware of the single build mode issue, so again post a debug log and I'll look in the next day or two :)

MikeSiLVO commented 5 years ago

Pretty sure the bytes array is from me encoding the filename to stop the build loop due to needing to encode the hash to prevent TypeError: Unicode-objects must be encoded before hashing:

            hasher.update(file.encode("utf8"))
            hashlist.list.append([filename.encode("utf8"), hasher.hexdigest()])
        else:
            hashlist.list.append([filename.encode("utf8"), None])

I don't know if there is an issue for single buildmode I just assume there will be because basestring isn't available in Python 3.

I'm not sure which try: except: to remove...?

MikeSiLVO commented 5 years ago

If the hashes also need to be bytes can't I just add encoding to the hexdigest as well?

EDIT: Yep it is bytes now after encoding that. [b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\overrides.xml', b'39b1c16685a38957bb7e7d2ea1cbf317']

BobCratchett commented 5 years ago

I can't honestly remember what single build mode is off hand, so I'll just add that to my list of things the check :wink:

In xmlfunctions, the shouldwerun function, changing the code from

                else:
                    try:
                        hasher = hashlib.md5()
                        hasher.update(xbmcvfs.File(hash[0]).read().encode("utf-8"))
                        if hasher.hexdigest() != hash[1]:
                            log( "Hash does not match on file " + hash[0] )
                            log( "(" + hash[1] + " > " + hasher.hexdigest() + ")" )
                            return True
                    except:
                        log( "Unable to generate hash for %s" %( hash[ 0 ] ) )
                        log( "(%s > ?)" %( hash[ 1 ] ) )

to

                else:
                    hasher = hashlib.md5()
                    hasher.update(xbmcvfs.File(hash[0]).read().encode("utf-8"))
                    if hasher.hexdigest() != hash[1]:
                        log( "Hash does not match on file " + hash[0] )
                        log( "(" + hash[1] + " > " + hasher.hexdigest() + ")" )
                        return True

means the error wouldn't be caught by the try: except: block so, though the script would crash, it will give a full traceback on the error.

If it works, sure, add the encoding there. As the script only uses bytes for reading and writing files (file.read, file.write operations) the ideal solution is that they are strings at all other times, and are converted into bytes only when necessary. But, as I said, the best solution is always the one that works (and, once everything is being written/read/processed consistently, it's easier to change them all, rather than working on each one individually.)

edit: sorry, only required to use bytes for, not only uses bytes for

MikeSiLVO commented 5 years ago

Now it is the same error I had with the profile logging. I fixed it by changing: log("Profile found: " + name + " (" + dir + ")") to log("Profile found: " + name.decode("utf-8") + " (" + dir.decode("utf-8") + ")")

Probably cause it is encoded with:

                name = profile.find( "name" ).text.encode( "utf-8" )
                dir = profile.find( "directory" ).text.encode( "utf-8" )

Here is the error without the try except block:

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
   - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
  Error Type: <class 'TypeError'>
  Error Contents: can only concatenate str (not "bytes") to str
  Traceback (most recent call last):
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\default.py", line 449, in <module>
      Main()
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\default.py", line 89, in __init__
      XML.buildMenu( self.MENUID, self.GROUP, self.LEVELS, self.MODE, self.OPTIONS, self.MINITEMS )
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 100, in buildMenu
      if self.shouldwerun( profilelist ) == False:
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 308, in shouldwerun
      log( "Hash does not match on file " + hash[0] )
  TypeError: can only concatenate str (not "bytes") to str
  -->End of Python script error report<--
BobCratchett commented 5 years ago

OK, should have expected that :wink:

There's still a logging line, and it still expects a string and not a bytes array. Interestingly, though, it appears as if the hasher function is managing to generate a hash for the file it's being passed. Whether it can actually generate that from the bytes array that is being passed into it, or whether it has its own error handling is another matter. (a bytes array really isn't what we want to be dealing with here!)

It ultimately still comes down to what we want to be saving/loading is a string, and not a bytes array (but, as I say, I'll look into this). You could try adding the following lines before the if statement, just as a general debugging exercise:

print(hash[0])
print(hash[1])
print(hasher.hexdigest)

(note, the built-in Python print function isn't allowed in Kodi addons within the Kodi repo, but its fantastic for debugging because it will output to the Kodi log pretty much anything you throw at it, without any thought of encoding!)

MikeSiLVO commented 5 years ago

This is right before the exception occurs:

2019-09-06 18:50:02.830 T:18446744073709551614   DEBUG: script.skinshortcuts: Profile found: Master user (special://masterprofile/)
2019-09-06 18:50:02.832 T:18446744073709551614   DEBUG: b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\overrides.xml'
2019-09-06 18:50:02.832 T:18446744073709551614   DEBUG: b'39b1c16685a38957bb7e7d2ea1cbf317'
2019-09-06 18:50:02.832 T:18446744073709551614   DEBUG: <built-in method hexdigest of _hashlib.HASH object at 0x000001AEEECDE3C8>
MikeSiLVO commented 5 years ago

Missed the closing ()

DEBUG: b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\overrides.xml'
DEBUG: b'39b1c16685a38957bb7e7d2ea1cbf317'
DEBUG: 39b1c16685a38957bb7e7d2ea1cbf317

Looks the hexdigest isn't bytes like the others...

BobCratchett commented 5 years ago

OK, that's hexdigest basically telling you it's chocked on what you're sending it - hasher.update(xbmcvfs.File(hash[0]).read().encode("utf-8")). You almost certainly shouldn't be encoding here (you're not dealing with a string that has been read/written - you're directly reading a file, and chances are the .read function knows what encoding it should be using!)

edit: My energy levels have gone - did I read the hasher.update line in one of your posts, or am I imagining that...?

BobCratchett commented 5 years ago

Looks like hexdigest result is just a string - which honestly is what the hash file should be...

MikeSiLVO commented 5 years ago

We need though for the hashing right?

   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
   - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
  Error Type: <class 'TypeError'>
  Error Contents: Unicode-objects must be encoded before hashing
  Traceback (most recent call last):
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\default.py", line 449, in <module>
      Main()
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\default.py", line 89, in __init__
      XML.buildMenu( self.MENUID, self.GROUP, self.LEVELS, self.MODE, self.OPTIONS, self.MINITEMS )
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 100, in buildMenu
      if self.shouldwerun( profilelist ) == False:
    File "C:\Kodi (Python 3)\portable_data\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 306, in shouldwerun
      hasher.update(xbmcvfs.File(hash[0]).read())
  TypeError: Unicode-objects must be encoded before hashing
  -->End of Python script error report<--
BobCratchett commented 5 years ago

This is where we're getting, once again, past the point where I can help without being able to play with the code. If it needs to be encoded, it needs to be encoded. However,

DEBUG: b'39b1c16685a38957bb7e7d2ea1cbf317' DEBUG: 39b1c16685a38957bb7e7d2ea1cbf317

means that we're checking two objects encoded differently - one as a bytes array, one as a string. So if we have to encode to send it to the hasher, then we need to decode it from the hasher. A bytes array will never be == to a string, the same as "one" will never be == to "1"

MikeSiLVO commented 5 years ago

Yeah changing the logging and commenting out the part that cause an exception shows this:

script.skinshortcuts: Hash does not match on file
2019-09-06 19:04:49.244 T:18446744073709551614   DEBUG: b'C:\\Kodi (Python 3)\\portable_data\\addons\\skin.aeon.nox.silvo\\shortcuts\\overrides.xml'
2019-09-06 19:04:49.244 T:18446744073709551614   DEBUG: b'39b1c16685a38957bb7e7d2ea1cbf317'
2019-09-06 19:04:49.244 T:18446744073709551614   DEBUG: 39b1c16685a38957bb7e7d2ea1cbf317
MikeSiLVO commented 5 years ago

That cause a build loop again so I need to encode the digest and it should work...

Right?

BobCratchett commented 5 years ago

As it is (and, as I say, ideally the .hash file should be saved as a string but we can deal with that once we've got this sorted) the hasher function is returning a string, so you need to encode that to a bytes array the same as the .hash file if hasher.hexdigest().encode("utf-8") != hash[1]: OR you need to decode the hash to a string if hasher.hexdigest() != hash[1].decode("utf-8"):. Both should work, but the best solution is for hash[1] to already be a string, the same as the hasher...

MikeSiLVO commented 5 years ago

Nope still build loop when encoding hexdigest and exception cause of AttributeError: 'str' object has no attribute 'decode'

MikeSiLVO commented 5 years ago

Is there another place in the code where hexdigest is set or possibly decoded?