Skip to content

Commit a68bb52

Browse files
committed
adding _backslash to radio.py
1 parent ebc0012 commit a68bb52

File tree

2 files changed

+78
-21
lines changed

2 files changed

+78
-21
lines changed

pyradio/browser.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ class PyRadioStationsBrowser(object):
2222
Actual implementations should be subclasses of this one.
2323
"""
2424

25+
BASE_URL = ''
26+
_raw_stations = []
27+
_last_search = None
28+
_have_to_retrieve_url = False
29+
_internal_header_height = 0
30+
_url_timeout = 3
31+
_search_timeout = 3
32+
33+
# Normally outer boddy (holding box, header, internal header) is
34+
# 2 chars wider that the internal body (holding the stations)
35+
# This property value is half the difference (normally 2 / 2 = 1)
36+
# Used to chgat the columns' separators in internal body
37+
# Check if the cursor is divided as required and adjust
38+
_outer_internal_body_diff = 1
39+
2540
def __init__(self, search=None):
2641
"""Initialize the station's browser.
2742
@@ -35,19 +50,7 @@ def __init__(self, search=None):
3550
Search parameters to be used instead of the default.
3651
"""
3752

38-
self._raw_stations = []
39-
self._last_search = None
40-
self._have_to_retrieve_url = False
41-
self._internal_header_height = 0
42-
self._url_timeout = 3
43-
self._search_timeout = 3
44-
45-
# Normally outer boddy (holding box, header, internal header) is
46-
# 2 chars wider that the internal body (holding the stations)
47-
# This property value is half the difference (normally 2 / 2 = 1)
48-
# Used to chgat the columns' separators in internal body
49-
# Check if the cursor is divided as required and adjust
50-
self._outer_internal_body_diff = 1
53+
pass
5154

5255
@property
5356
def outer_internal_body_diff(self):
@@ -134,31 +137,28 @@ def format_station_line(self, id_in_list, pad, width):
134137

135138

136139
class PyRadioBrowserInfoBrowser(PyRadioStationsBrowser):
140+
137141
BASE_URL = 'www.radio-browser.info'
142+
138143
_open_url = \
139-
'http://www.radio-browser.info/webservice/json/stations/topvote/100'
144+
'http://www.radio-browser.info/webservice/json/stations/topvote/100'
140145
_open_headers = {'user-agent': 'PyRadio/dev'}
141146

142147
_raw_stations = []
143148

144149
# the output format to use based on window width
145150
# Default value: -1
146-
# Possible values: 0..4
151+
# Possible values: 0..5
147152
# Look at format_station_line() for info
148153
_output_format = -1
149154
_info_len = []
150155
_info_name_len = 0
151156

157+
_raw_stations = []
152158
_have_to_retrieve_url = True
153159
_internal_header_height = 1
154160

155-
156161
def __init__(self, search=None):
157-
if PY3:
158-
super().__init__()
159-
else:
160-
super(PyRadioBrowserInfoBrowser, self).__init__()
161-
self._raw_stations = []
162162
if search:
163163
self.search(search)
164164
else:

0 commit comments

Comments
 (0)