fix ordering of no-links error message

This commit is contained in:
2020-05-13 00:57:40 -05:00
parent a1e1b66cf8
commit 2baddc6b04

6
subs
View File

@@ -141,8 +141,6 @@ update_subs() {
# Grab current cache of subscriptions, sort by date uploaded # Grab current cache of subscriptions, sort by date uploaded
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* # -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
cat_subs() { cat_subs() {
[ -d "$SUBS_CACHE" ] || die 'Subs cache has not been retrieved.'
sort -r "$SUBS_CACHE"/* | \ sort -r "$SUBS_CACHE"/* | \
while read -r line ; do while read -r line ; do
chan=${line#*$SEP} chan=${line#*$SEP}
@@ -159,7 +157,11 @@ cat_subs() {
# Split the concatenated lines into entities, send to menu program. # Split the concatenated lines into entities, send to menu program.
# Finally, play the result with mpv. # Finally, play the result with mpv.
get_sel() { get_sel() {
if [ -d "$SUBS_CACHE" ] ; then
sel=$(cat_subs | $SUBS_MENU_PROG) sel=$(cat_subs | $SUBS_MENU_PROG)
else
die 'Subs cache has not been retrieved.'
fi
[ "$sel" ] || die Interrupted [ "$sel" ] || die Interrupted