stigger / trakt-for-appletv

Trakt.tv scrobbler for Apple TV
49 stars 7 forks source link

Identify the Error Device & Cannot track on tvos15 #20

Closed rxrw closed 2 years ago

rxrw commented 2 years ago

Thanks for support tvOS 15!

I connected to trakt and it told me to input code on apple tv, but there was no code. After I check config.yml, its mac equalled 0e:15:1a:7e:17:11 which is another dlna device. I scan using pyatv and there's 3 devices in my network:

Scan Results
========================================
       Name: 客厅的电视
   Model/SW: Gen3 tvOS
    Address: 192.168.31.248
        MAC: 0e:15:1a:7e:17:11
 Deep Sleep: False
Identifiers:
 - 0e:15:1a:7e:17:11
 - 0e151a7e1711
Services:
 - Protocol: AirPlay, Port: 52244, Credentials: None, Requires Password: False, Password: None, Pairing: Mandatory
 - Protocol: RAOP, Port: 52244, Credentials: None, Requires Password: False, Password: None, Pairing: NotNeeded

       Name: 卧室
   Model/SW: HomePod tvOS 15.1
    Address: 192.168.31.109
        MAC: D4:A3:3D:64:49:EE
 Deep Sleep: False
Identifiers:
 - D4:A3:3D:64:49:EE
 - D4A33D6449EE
Services:
 - Protocol: AirPlay, Port: 7000, Credentials: None, Requires Password: False, Password: None, Pairing: NotNeeded
 - Protocol: Companion, Port: 49152, Credentials: None, Requires Password: False, Password: None, Pairing: Unsupported
 - Protocol: RAOP, Port: 7000, Credentials: None, Requires Password: False, Password: None, Pairing: NotNeeded

       Name: 客厅
   Model/SW: AppleTV4KGen2 tvOS 15.0
    Address: 192.168.31.9
        MAC: F0:B3:EC:0A:14:12
 Deep Sleep: False
Identifiers:
 - F0:B3:EC:0A:14:12
 - F0B3EC0A1412
Services:
 - Protocol: Companion, Port: 49152, Credentials: None, Requires Password: False, Password: None, Pairing: Disabled
 - Protocol: AirPlay, Port: 7000, Credentials: None, Requires Password: False, Password: None, Pairing: Mandatory
 - Protocol: RAOP, Port: 7000, Credentials: None, Requires Password: False, Password: None, Pairing: Mandatory

the last one is apple tv.

After I changed the mac address manually, it works.

Besides, It worked not very well on Apple TV + and Infuse.

I played Ted Lasso using Apple TV +, the scripts told an error:

ready!
/home/sky/trakt-for-appletv/scrobbling.py:324: RuntimeWarning: coroutine 'MrpProtocol.send' was never awaited
  self.protocol.send(msg)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
^CTraceback (most recent call last):
  File "./tvscrobbler.py", line 32, in <module>
    asyncio.run(launch(ScrobblingRemoteProtocol(load_config())))
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
    self._run_once()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.8/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt

And when I use Infuse play sth,` the script had no change.

Both of them support standard display on iphone, so maybe there is some code to edit?

Thanks again for this awesome project!

stigger commented 2 years ago

There is no support for Infuse. It can probably be implemented, but why not use Infuse's built-in scrobbling feature?

Regarding Apple TV+, I'll take a look.