Skip to content

Commit 3f06c9e

Browse files
authored
Merge pull request #33 from marianozunino/main
feat: enable to use TERMV_API_URL as env variable
2 parents d2ec83e + ffd66ae commit 3f06c9e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
`termv` is a small bash script that allows you to select an iptv stream using `fzf` and play it using `mpv`.
1212

13-
the list of channels is obtained from [https://github.com/iptv-org/iptv](https://github.com/iptv-org/iptv)
13+
The list of channels is obtained from [https://github.com/iptv-org/iptv](https://github.com/iptv-org/iptv)
14+
For an example for a custom channels list and how to make one yourself, visit [this gist](https://gist.github.com/Roshan-R/7eddda0789297d86219fda21876b2632)
1415

1516

1617
## Dependencies
@@ -41,6 +42,8 @@ Options:
4142
TERMV_SWALLOW Always swallow terminal during playback. (default: false)
4243
TERMV_FULL_SCREEN Always open mpv in fullscreen. (default: false)
4344
TERMV_DEFAULT_MPV_FLAGS Default arguments which are passed to mpv. (default: --no-resume-playback)
45+
TERMV_API_URL URL to the channel list. (default: https://iptv-org.github.io/iptv/channels.json)
46+
Any other URL must be in the same format as the default one.
4447

4548
Improve me on GitHub:
4649
https://github.com/Roshan-R/termv

termv

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ BASH_BINARY="$(which bash)"
55
TERMV_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/termv"
66
TERMV_AUTO_UPDATE=${TERMV_AUTO_UPDATE:-true}
77
TERMV_FULL_SCREEN=${TERMV_FULL_SCREEN:-false}
8-
TERMV_API_URL="https://iptv-org.github.io/iptv/channels.json"
8+
TERMV_API_URL=${TERMV_API_URL:-"https://iptv-org.github.io/iptv/channels.json"}
9+
910
FZF_VERSION=$(fzf --version | cut -d '.' -f 2- | cut -d ' ' -f 1 )
11+
1012
declare -x TERMV_SWALLOW=${TERMV_SWALLOW:-false}
1113
declare -x TERMV_MPV_FLAGS="${TERMV_DEFAULT_MPV_FLAGS:---no-resume-playback}"
1214

@@ -54,7 +56,8 @@ usage() {
5456
_phi "TERMV_SWALLOW Always swallow terminal during playback. (default: false)"
5557
_phi "TERMV_FULL_SCREEN Always open mpv in fullscreen. (default: false)"
5658
_phi "TERMV_DEFAULT_MPV_FLAGS Default arguments which are passed to mpv. (default: --no-resume-playback)"
57-
_pht
59+
_phi "TERMV_API_URL URL to the channel list. (default: https://iptv-org.github.io/iptv/channels.json)"
60+
_phi " Any other URL must be in the same format as the default one."
5861
_pht " Improve me on GitHub:"
5962
_phi "https://github.com/Roshan-R/termv"
6063
}

0 commit comments

Comments
 (0)