Skip to content

Commit a69fb6e

Browse files
committed
- Playlist history works for Radio Browser as well
- Updating docs
1 parent e7a76e3 commit a69fb6e

File tree

7 files changed

+256
-155
lines changed

7 files changed

+256
-155
lines changed

Changelog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
2019-12-02 s-n-g
1+
2019-12-08 s-n-g
22
* Adding playlist history (for local playlists)
33
* WINDOWS: Volume will be saved when mplayer is installed in %APPDATA%\pyradio
4+
* Fixing station moving when appending station
45

56
2019-11-15 s-n-g
67
* PyRadio will not crush with mpv 0.30.0

README.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ <h3 id="managing-foreign-playlists">Managing “foreign” playlists</h3>
179179
<p>A playlist that does not reside within the program’s configuration directory is considered a “<strong><em>foreign</em></strong>” playlist. This playlist can only be opened by the <strong>-s</strong> command line option.</p>
180180
<p>When this happens, <strong>PyRadio</strong> will offer you the choice to copy the playlist in its configuration directory, thus making it available for manipulation within the program.</p>
181181
<p>If a playlist of the same name already exists in the configuration directory, the “<strong><em>foreign</em></strong>” playlist will be time-stamped. For example, if a “<strong><em>foreign</em></strong>” playlist is named “<em>stations.csv</em>”, it will be named “<em>2019-01-11_13-35-47_stations.csv</em>” (provided that the action was taken on January 11, 2019 at 13:35:47).</p>
182+
<h3 id="playlist-history">Playlist history</h3>
183+
<p><strong>PyRadio</strong> will keep a history of all the playlists opened (within a given session), so that navigating between them is made easy.</p>
184+
<p>In order to go back to the previous playlist, the user just has to press “<strong><em>\\</em></strong>” (double backslash). To get to the first playlist “<strong><em>\]</em></strong>” (backslash - closing square bracket) can be used.</p>
185+
<p>Going forward in history is not supported.</p>
182186
<h2 id="search-function">Search function <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></style></h2>
183187
<p>On any window presenting a list of items (stations, playlists, themes) a <strong>search function</strong> is available by pressing “<strong>/</strong>”.</p>
184188
<p>The <em>Search Window</em> supports normal and extend editing and in session history.</p>

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,13 @@ When this happens, **PyRadio** will offer you the choice to copy the playlist in
211211

212212
If a playlist of the same name already exists in the configuration directory, the "***foreign***" playlist will be time-stamped. For example, if a "***foreign***" playlist is named "*stations.csv*", it will be named "*2019-01-11_13-35-47_stations.csv*" (provided that the action was taken on January 11, 2019 at 13:35:47).
213213

214+
### Playlist history
215+
216+
**PyRadio** will keep a history of all the playlists opened (within a given session), so that navigating between them is made easy.
217+
218+
In order to go back to the previous playlist, the user just has to press "***\\\\***" (double backslash). To get to the first playlist "***\\]***" (backslash - closing square bracket) can be used.
219+
220+
Going forward in history is not supported.
214221

215222
## Search function
216223

pyradio.1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,16 @@ When this happens, \fBpyradio\fR will offer you the choise to copy the playlist
229229
If a playlist of the same name already exists in the configuration directory, the "\fIforeign\fR" playlist will be time-stamped. For example, if a "\fIforeign\fR" playlist is named "\fIstations.csv\fR", it will be named "\fI2019-01-11_13-35-47_stations.csv\fR" (provided that the action was taked on January 11, 2019 at 13:35:47).
230230

231231

232+
.PP
233+
.B
234+
PLAYLIST HISTORY
235+
236+
\fBpyradio\fR will keep a history of all the playlists opened (within a given session), so that navigating between them is made easy.
237+
238+
In order to go back to the previous playlist, the user just has to press "\fI\\\\\fR" (double backslash). To get to the first playlist "\fI\\]\fR" (backslash - closing square bracket) can be used.
239+
240+
Going forward in history is not supported.
241+
232242
.SH SEARCH FUNCTION
233243

234244
On any window presenting a list of items (stations, playlists, themes) a \fBsearch function\fR is available by pressing "\fI/\fR".

pyradio/browser.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class PyRadioStationsBrowser(object):
2323
"""
2424

2525
BASE_URL = ''
26+
TITLE = ''
2627
_raw_stations = []
2728
_last_search = None
2829
_have_to_retrieve_url = False
@@ -77,6 +78,14 @@ def have_to_retrieve_url(self):
7778
def have_to_retrieve_url(self, value):
7879
raise ValueError('property is read only')
7980

81+
@property
82+
def title(self):
83+
return self.TITLE
84+
85+
@title.setter
86+
def title(self, value):
87+
self.TITLE = value
88+
8089
def stations(self, playlist_format=1):
8190
return []
8291

@@ -140,6 +149,7 @@ def format_station_line(self, id_in_list, pad, width):
140149
class PyRadioBrowserInfoBrowser(PyRadioStationsBrowser):
141150

142151
BASE_URL = 'www.radio-browser.info'
152+
TITLE = 'Radio Browser'
143153

144154
_open_url = \
145155
'http://www.radio-browser.info/webservice/json/stations/topvote/100'

0 commit comments

Comments
 (0)