Delphi 83 Posted August 7, 2016 Share Posted August 7, 2016 (edited) https://github.com/delphiactual/machineID/blob/master/machineID.py New Repo: https://github.com/d...ript.machine.id Edited August 7, 2016 by Delphi Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted August 7, 2016 Share Posted August 7, 2016 Nice! Out of curiosity, how "permanent" is this Id? Anything that could cause it to change? Link to comment Share on other sites More sharing options...
Delphi 83 Posted August 7, 2016 Author Share Posted August 7, 2016 These are permanent based, the only ones that could possibly change are ATV2 and iOS, because they check the MAC id, which could be spoofed by the user... 1 Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted August 7, 2016 Share Posted August 7, 2016 Fully works with python 2.6? If so, I'm sold Link to comment Share on other sites More sharing options...
Delphi 83 Posted August 7, 2016 Author Share Posted August 7, 2016 You'll need to include those two libraries subprocess and _winreg, but yes otherwise 1 Link to comment Share on other sites More sharing options...
Delphi 83 Posted August 7, 2016 Author Share Posted August 7, 2016 new repository with some quick refactoring since _winreg only exist on windows if i made this into a module what would be the best way to return data? https://github.com/delphiactual/script.machine.id 1 Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted August 7, 2016 Share Posted August 7, 2016 (edited) As a string would be good enough. Do you want to make a pull request? Or you want me to take care of it? Sent from my iPhone using Tapatalk Edited August 7, 2016 by Angelblue05 1 Link to comment Share on other sites More sharing options...
Delphi 83 Posted August 7, 2016 Author Share Posted August 7, 2016 (edited) Go for it angel, I'm lost on how to get it to return data, I can make the popup with info, but not figure out how to return data in an easy manner... EDIT: It has been tested on Windows, and Linux only so far, I'm awaiting use of my main android box to run the test... I do not have an OSX machine available to test on either so that section needs tested. Edited August 7, 2016 by Delphi 1 Link to comment Share on other sites More sharing options...
Delphi 83 Posted August 7, 2016 Author Share Posted August 7, 2016 @@Angelblue05, after testing on multiple android devices, I believe this is complete with the exception of testing on Apple based products... Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted August 7, 2016 Share Posted August 7, 2016 @ What do you think? Could remove any need for manual intervention / or having the file inside the add-on directory. It would work across profiles. Link to comment Share on other sites More sharing options...
Delphi 83 Posted August 7, 2016 Author Share Posted August 7, 2016 (edited) ## OS agnostic version, will always return same uuid based of of url formed from "http://kodi.emby.media/"+ macaddress ## so if macaddress changes somehow a new uuid would be generated. or if a mac address is not detected because then getnode returns a random value... ## CODE Below ##------------------------------------------------------------------------------------------------------------- import xbmcaddon import xbmcgui import uuid addon = xbmcaddon.Addon() addonname = addon.getAddonInfo('name') node = uuid.getnode() if node != uuid.getnode(): ## Random value!! Doh! ## This is the case where you would need to save it as you currently are, should only be edge cases tho node = 'temp' url = "http://kodi.emby.media/" + str(node) ### Could even make url, the server url but that could change... ### appended with device name or alternate device name id = uuid.uuid3(uuid.NAMESPACE_URL, url) xbmcgui.Dialog().ok(addonname, str(id)) Edited August 7, 2016 by Delphi Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted August 7, 2016 Share Posted August 7, 2016 There's no problem really. It's an alternative solution. I do think it would simplify the current way we do things in the fact alone that we don't need a machine_guid file inside the addon folder. It would reflect a real machine device id which never changes, therefore will persist reinstalls (this means no duplicated devices being reported in emby dashboard > devices). Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Delphi 83 Posted August 7, 2016 Author Share Posted August 7, 2016 @ fair enough Link to comment Share on other sites More sharing options...
Recommended Posts