-
Notifications
You must be signed in to change notification settings - Fork 47
Description
@wuub
After your changes for #58 I went ahead and tried 0.7.0rc2 on my RX-A2010
It failed with some errors, I'm not an expert in python so I can't really send a PR but I'm sure I have enough info for you to fix it quickly. This was the main error after executing
rx.net_radio('My Stations>Favourites>MNM')
Traceback (most recent call last):
File "test.py", line 3, in <module>
rx.net_radio('My Stations>Favourites>MNM')
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 865, in net_radio
self.menu_reset()
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 708, in menu_reset
while self.menu_status().layer > 1:
File "/usr/local/lib/python3.8/site-packages/rxv/rxv.py", line 608, in menu_status
ready = (next(res.iter("Menu_Status")).text == "Ready")
StopIteration
The call for
<NET_RADIO><List_Info>GetParam</List_Info></NET_RADIO>
responds on this system with:
<YAMAHA_AV rsp="GET" RC="0"><NET_RADIO><List_Info><Menu_Layer>2</Menu_Layer><Menu_Name>Radiobrowser</Menu_Name><Current_List><Line_1><Txt>Genres</Txt><Attribute>Container</Attribute></Line_1><Line_2><Txt>Countries</Txt><Attribute>Container</Attribute></Line_2><Line_3><Txt>Languages</Txt><Attribute>Container</Attribute></Line_3><Line_4><Txt>Most Popular</Txt><Attribute>Container</Attribute></Line_4><Line_5><Txt></Txt><Attribute>Unselectable</Attribute></Line_5><Line_6><Txt></Txt><Attribute>Unselectable</Attribute></Line_6><Line_7><Txt></Txt><Attribute>Unselectable</Attribute></Line_7><Line_8><Txt></Txt><Attribute>Unselectable</Attribute></Line_8></Current_List><Cursor_Position><Current_Line>1</Current_Line><Max_Line>4</Max_Line></Cursor_Position></List_Info></NET_RADIO></YAMAHA_AV>
In this receiver, there is no Menu_Status. I hacked it on my local install by doing - not sure if we can do something smarter there to set it to "not_available" or something (see later)
ready = 1
Inside the loop I did sleep as well (since there is no ready) state, maybe we can only sleep if "not_available" is set ?
868 if menu.ready:
869 time.sleep(1)
870 for line, value in menu.current_list.items():
This went a little further, until the CURSOR_RETURN which does not seem to exist here.
I changed CURSOR_RETURN to "Back" and that seems to work.
CURSOR_RETURN = "Back"
So with these 3 changes it should also work on RX-A20** models I suppose. If you need some desc.xml posted, just let me know, glad to assist!