Jump to content

Actual machineID for Kodi


Delphi

Recommended Posts

Delphi

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...

  • Like 1
Link to comment
Share on other sites

Delphi

You'll need to include those two libraries subprocess and _winreg, but yes otherwise

  • Like 1
Link to comment
Share on other sites

Angelblue05

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 by Angelblue05
  • Like 1
Link to comment
Share on other sites

Delphi

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 by Delphi
  • Like 1
Link to comment
Share on other sites

Angelblue05

@

 

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

Delphi
## 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 by Delphi
Link to comment
Share on other sites

Angelblue05

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...