Hellowlol / bw_plex

binge watching for plex
MIT License
368 stars 23 forks source link

Chromecast issue #113

Closed wastingaeons closed 4 years ago

wastingaeons commented 4 years ago

Running the latest container image I can't get Chromecast to work.

I verified I can find my two Chromecasts running pychromecast.get_chromecasts() in a test script inside the container. Am I missing something?

Logs:

[ Chromecast('192.168.1.160', port=8009, device=DeviceStatus(friendly_name='CC-Livingroom', model_name='Chromecast Ultra', manufacturer='Unknown manufacturer', uuid=UUID('xxx'), cast_type='cast')), Chromecast('192.168.1.244', port=8009, device=DeviceStatus(friendly_name='CC-Bedroom', model_name='Chromecast', manufacturer='Google Inc.', uuid=UUID('xxx'), cast_type='cast')) ]

2019-12-26 17:00:19,260 :: bw_plex :: DEBUG :: plex.py:1229 :: Parks.and.Recreation.s02e02 is in the correct time range theme_end 2019-12-26 17:00:19,260 :: bw_plex :: DEBUG :: plex.py:1157 :: Called jump with Parks.and.Recreation.s02e02 51 123.87845804988662 None 2019-12-26 17:00:19,261 :: bw_plex :: INFO :: plex.py:931 :: Called client_action with 123.87845804988662 02:03 51 None 2019-12-26 17:00:19,270 :: bw_plex :: INFO :: plex.py:964 :: sessionkey 51 media_sessionkey 51 2019-12-26 17:00:19,270 :: bw_plex :: INFO :: plex.py:968 :: client Chromecast 101.0 2019-12-26 17:00:19,270 :: bw_plex :: DEBUG :: plex.py:981 :: The client is a chromecast and on the local network. 2019-12-26 17:00:19,299 :: bw_plex :: ERROR :: plex.py:89 :: There was an exception in client_action

Traceback (most recent call last): File "/app/bw_plex/bw_plex/plex.py", line 84, in inner return func(*args) File "/app/bw_plex/bw_plex/plex.py", line 985, in client_action pc, cast = log_exception(get_chromecast_player(client.address, 'Chromecast')) TypeError: 'function' object is not iterable

Hellowlol commented 4 years ago

I dont know, easiest would be to just try the get_chromecasts_player manually. I think this will fail if we cant use the host as you have two chromecasts and non of them is named Chromecast :P, The host should work tho. Ill look it later.

wastingaeons commented 4 years ago

Thank you Hellowlol.

FYI, I ran get_chromecasts_player manually and I get:

(<bw_plex.chromecast.get_chromecast_player.<locals>.PlexController object at 0x152797e82cc0>, Chromecast('192.168.1.244', port=8009, device=DeviceStatus(friendly_name='CC-Bedroom', model_name='Eureka Dongle', manufacturer='Google Inc.', uuid=UUID('xxx'), cast_type='cast')))

I also tried changing line 985 from 'Chromecast' to 'CC-Bedroom' and get the same error

EDIT: As an update I removed the log_exception() function from line 985 and it's working now on both my Chromecasts. pc, cast = get_chromecast_player(client.address)