Skip to content

Commit a10cf5f

Browse files
committed
updating docs
1 parent b6653b7 commit a10cf5f

File tree

4 files changed

+66
-3
lines changed

4 files changed

+66
-3
lines changed

docs/index.html

+15-1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ <h2 id="table-of-contents">Table of Contents <span style="padding-left: 10px;"><
122122
<li><a href="#specifying-a-station&#39;s-referer-url">Specifying a station’s Referer URL</a>
123123
<ul>
124124
<li><a href="#a-note-of-caution">A note of caution</a></li>
125+
<li><a href="#note-about-mplayer">Note about MPlayer</a></li>
125126
</ul></li>
126127
<li><a href="#extra-player-parameters">Extra Player Parameters</a>
127128
<ul>
@@ -1767,7 +1768,7 @@ <h3 id="changing-player-mid-session">Changing player mid-session</h3>
17671768
<p>If <strong>recording is on</strong> while using the previously activated player, it will remain on with the newly activated one. This actually means that the recording will stop when the old player is stopped and resumed when the new player is activated (creating a new recorder file). There is just one exception to that; selecting <strong>VLC</strong> is not possible on <strong>Windows</strong>, since <strong>VLC</strong> does not support recording on this platform.</p>
17681769
<p style="margin: 1.5em 4em 0 4em; text-indent: -2.5em;"><strong>Note:</strong> The activated player will not be saved; <strong>PyRadio</strong> will still use the player defined at its config next time it is executed.</p>
17691770
<h3 id="specifying-a-stations-referer-url">Specifying a station’s Referer URL</h3>
1770-
<p>Although <strong>PyRadio</strong> is meant to be a readio station player, it can also be used to listen to video stations transmitting m3u8 playlists (HTTP Live Streaming or HLS).</p>
1771+
<p>Although <strong>PyRadio</strong> is meant to be a radio station player, it can also be used to listen to video stations transmitting m3u8 playlists (HTTP Live Streaming or HLS).</p>
17711772
<p>The thing with these transmissions is that usually a <strong>Referer URL</strong> has to be provided so that the connection does not fail.</p>
17721773
<p><strong>PyRadio</strong> now does support the declaration of a <strong>Referer URL</strong> for individual stations; it does it in an “anorthodox” way, but it is possible.</p>
17731774
<p>So, let us imagine that a station called “<em>My video station</em>” has been added to a playlist. The user tries to play it but it fails; the referer URL is missing.</p>
@@ -1777,6 +1778,19 @@ <h3 id="specifying-a-stations-referer-url">Specifying a station’s Referer URL<
17771778
<h4 id="a-note-of-caution">A note of caution</h4>
17781779
<p>If such a file has been created for a station, please do not rename the station in the playlist manually; the “link” to the referer file will be lost.</p>
17791780
<p>Rename the station using <strong>PyRadio</strong> rename functionality and save the playlist instead; the referer file will be renamed as well.</p>
1781+
<h4 id="note-about-mplayer">Note about MPlayer</h4>
1782+
<p>This will unfortunately not work with <strong>MPlayer</strong>.</p>
1783+
<p>It seems it will not use the <strong>Referer</strong> provided, as shown in the following part of the command execution output:</p>
1784+
<pre>[tcp @ 0x7f4a42c7fa60]Successfully connected to XX.XX.XXX.XX port 443
1785+
[https @ 0x7f4a42c7fa60]request: GET /live/XXXXXXXX.m3u8 HTTP/1.1
1786+
User-Agent: Lavf/60.16.100
1787+
Accept: */*
1788+
Range: bytes=0-
1789+
Connection: close
1790+
Host: XXXXXX-XXXXXXXXX.XXXXXX.XXX.XXX.XX
1791+
Icy-MetaData: 1
1792+
1793+
[https @ 0x7f4a42c7fa60]HTTP error 403 Forbidden</pre>
17801794
<h3 id="extra-player-parameters">Extra Player Parameters</h3>
17811795
<p>All three supported players can accept a significant number of “<em>command line options</em>”, which are well documented and accessible through man pages (on linux and MacOs) or the documentation (on Windows).</p>
17821796
<p><strong>PyRadio</strong> uses some of these parameters in order to execute and communicate with the players. In particular, the following parameters are in use <strong>by default</strong>:</p>

docs/index.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ To ensure the correct operation, please take these actions:
8484
* [Changing player mid-session](#changing-player-mid-session)
8585
* [Specifying a station's Referer URL](#specifying-a-station's-referer-url)
8686
* [A note of caution](#a-note-of-caution)
87+
* [Note about MPlayer](#note-about-mplayer)
8788
* [Extra Player Parameters](#extra-player-parameters)
8889
* [Using the Configuration Window](#using-the-configuration-window)
8990
* [Player connection protocol](#player-connection-protocol)
@@ -751,7 +752,7 @@ If **recording is on** while using the previously activated player, it will rema
751752

752753
### Specifying a station's Referer URL
753754

754-
Although **PyRadio** is meant to be a readio station player, it can also be used to listen to video stations transmitting m3u8 playlists (HTTP Live Streaming or HLS).
755+
Although **PyRadio** is meant to be a radio station player, it can also be used to listen to video stations transmitting m3u8 playlists (HTTP Live Streaming or HLS).
755756

756757
The thing with these transmissions is that usually a **Referer URL** has to be provided so that the connection does not fail.
757758

@@ -771,6 +772,25 @@ If such a file has been created for a station, please do not rename the station
771772

772773
Rename the station using **PyRadio** rename functionality and save the playlist instead; the referer file will be renamed as well.
773774

775+
#### Note about MPlayer
776+
777+
This will unfortunately not work with **MPlayer**.
778+
779+
It seems it will not use the **Referer** provided, as shown in the following part of the command execution output:
780+
781+
```
782+
[tcp @ 0x7f4a42c7fa60]Successfully connected to XX.XX.XXX.XX port 443
783+
[https @ 0x7f4a42c7fa60]request: GET /live/XXXXXXXX.m3u8 HTTP/1.1
784+
User-Agent: Lavf/60.16.100
785+
Accept: */*
786+
Range: bytes=0-
787+
Connection: close
788+
Host: XXXXXX-XXXXXXXXX.XXXXXX.XXX.XXX.XX
789+
Icy-MetaData: 1
790+
791+
[https @ 0x7f4a42c7fa60]HTTP error 403 Forbidden
792+
```
793+
774794
### Extra Player Parameters
775795

776796
All three supported players can accept a significant number of "*command line options*", which are well documented and accessible through man pages (on linux and MacOs) or the documentation (on Windows).

docs/pyradio.1

+26-1
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ The activated player will not be saved; **PyRadio** will still use the player de
843843

844844
.SH Specifying a station's Referer URL
845845

846-
Although \fBpyradio\fR is meant to be a readio station player, it can also be used to listen to video stations transmitting m3u8 playlists (HTTP Live Streaming or HLS).
846+
Although \fBpyradio\fR is meant to be a radio station player, it can also be used to listen to video stations transmitting m3u8 playlists (HTTP Live Streaming or HLS).
847847

848848
The thing with these transmissions is that usually a \fBReferer URL\fR has to be provided so that the connection does not fail.
849849

@@ -866,6 +866,31 @@ If such a file has been created for a station, please do not rename the station
866866
Rename the station using \fBpyradio\fR rename functionality and save the playlist instead; the referer file will be renamed as well.
867867
.RE
868868

869+
\fBNote\fR
870+
.RS 2
871+
872+
This will unfortunately not work with \fBMPlayer\fR.
873+
874+
It seems it will not use the \fIReferer\fR provided, as shown in the following part of the command execution output:
875+
876+
\fI[tcp @ 0x7f4a42c7fa60]Successfully connected to XX.XX.XXX.XX port 443
877+
.br
878+
[https @ 0x7f4a42c7fa60]request: GET /live/XXXXXXXX.m3u8 HTTP/1.1
879+
.br
880+
\fBUser-Agent: Lavf/60.16.100\fI
881+
.br
882+
Accept: */*
883+
.br
884+
Range: bytes=0-
885+
.br
886+
Connection: close
887+
.br
888+
Host: XXXXXX-XXXXXXXXX.XXXXXX.XXX.XXX.XX
889+
.br
890+
Icy-MetaData: 1
891+
892+
[https @ 0x7f4a42c7fa60]\fBHTTP error 403 Forbidden\fR
893+
.RE
869894

870895

871896
.SH Extra Player Parameters

pyradio/radio.py

+4
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ def _update_selection(self):
233233
self._win.refresh()
234234

235235
def keypress(self, char):
236+
# select player keypress
236237
if char in (
237238
ord('j'), curses.KEY_DOWN,
238239
ord('k'), curses.KEY_UP
@@ -6190,6 +6191,9 @@ def keypress(self, char):
61906191
elif char in range(48, 58) or char in range(97, 123):
61916192
self._cnf.register_to_open = chr(char).lower()
61926193
self._update_status_bar_right(status_suffix='')
6194+
# elif char == ord('*'):
6195+
# # open favorites
6196+
# self._update_status_bar_right(status_suffix='')
61936197
else:
61946198
self._update_status_bar_right(status_suffix='')
61956199
return

0 commit comments

Comments
 (0)