palinek / pvr.sledovanitv.cz

Kodi's sledovanitv.cz client addon
GNU General Public License v2.0
30 stars 14 forks source link

More android devices have the same serial id #34

Closed Efkovole closed 5 years ago

Efkovole commented 5 years ago

Nelze přehrávat na dvou android zařízeních najednou. Každé android zařízení odesílá pomocí API sérievé číslo na sledovanitv.cz, který je na každém zařízení: 4f9f10b304cfe9b2b11fcb1387f694e18f08ea358c7e9f567434d3ad6cbd7fc4 a název local host, což asi nevadí. Ovšem když chci koukat na dvou zařízeních na televizi najednou, tak jde televize vždy jen na jenom zařízení. "Jelikož se obě zařízení hlásí pod stejným sériovým číslem.?" Podle logu nemůže plugin získat MAC adresu. Testováno na android 9 a 7.1 a oboje odesílá stejné sériové číslo. Nešlo by to prosím nějak opravit, nebo přidat do nastavení políčko serial, které by si mohl uživatel sám nastavit ? Moc děkuji za vaší práci

Moc programování nerozumím, ale ve skriptu apimanager.cpp mi příjde, že si má plugin zjistit mac adresu a tu odeslat jako sériové číslo, pokud selže, tak má vygenerovat pomocí picosha2.h hash, který odešle místo sériového čísla.

System Information
Kodi's Log

2019-07-10 21:31:43.950 T:11851 NOTICE: AddOnLog: PVR Client for sledovanitv.cz (unofficial): Can't get MAC address with target Android API < 24 (no getifaddrs() support) 2019-07-10 21:31:43.950 T:11851 NOTICE: AddOnLog: PVR Client for sledovanitv.cz (unofficial): While getting MAC address getifaddrs() failed, Operation not supported on transport endpoint 2019-07-10 21:31:43.950 T:11851 NOTICE: AddOnLog: PVR Client for sledovanitv.cz (unofficial): Unable to get MAC address, using a dummy for serial 2019-07-10 21:32:13.955 T:11851 ERROR: AddOnLog: PVR Client for sledovanitv.cz (unofficial): Error indicated in response. status: 0, error: not logged 2019-07-10 21:32:14.055 T:11851 ERROR: AddOnLog: PVR Client for sledovanitv.cz (unofficial): Error indicated in response. status: 0, error: bad login

palinek commented 5 years ago

že si má plugin zjistit mac adresu a tu odeslat jako sériové číslo, pokud selže, tak má vygenerovat pomocí picosha2.h hash, který odešle místo sériového čísla

No. If we can't get the MAC address, we use a dummy value -> https://github.com/palinek/pvr.sledovanitv.cz/blob/Matrix/src/apimanager.cpp#L271. But we don't want to disclose MAC address of the device to sledovanitv. Therefore the "serial" is assembled as the SHA256 hash of the original string (MAC address or dummy).

přidat do nastavení políčko serial, které by si mohl uživatel sám nastavit

This is a good idea and I'll try to implement it this way -> user will be able to override device ID (MAC address) in configuration. But note that this new feature won't get into Leia (18.*) as there is a feature freeze and just bugs are backported.

@ksooo Am I right with the "feature freeze" statement?

Efkovole commented 5 years ago

If I understood it correctly, the module should find out the MAC address and generate SHA according to it and send it to TV. If it does not detect the MAC address, will it use the following read code and generate SHA from it? "MC-> Log (LOG_NOTICE," Unable to get MAC address, using dummy for serial "); macAddr = "11223344"; "

Yes, if you run on two devices with kodi, so do television freeze

palinek commented 5 years ago

if you run on two devices with kodi, so do television freeze

Only if MAC address detection fails on both devices.

Efkovole commented 5 years ago

Yes, that's exactly how it happens, see. log. This problem is on all android devices. Or, at least I suppose, since I tried the add-on on 3 different android devices.