mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 15:59:21 +02:00
added history instances usage
This commit is contained in:
parent
04bda6adc4
commit
09c2fd191e
|
@ -1,3 +1,4 @@
|
||||||
playlist.m3u8
|
playlist.m3u8
|
||||||
podcast.m3u8
|
podcast.m3u8
|
||||||
preload
|
preload
|
||||||
|
instance.hist
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
instance=$(jj -i config.json instance)
|
instance=$(jj -i config.json instance)
|
||||||
|
instance_hist='instance.hist'
|
||||||
ordering='title'
|
ordering='title'
|
||||||
default_player_command='mpv --no-vid --no-ytdl --network-timeout=30'
|
default_player_command='mpv --no-vid --no-ytdl --network-timeout=30'
|
||||||
|
|
||||||
|
@ -143,23 +144,34 @@ case "$choice" in
|
||||||
|
|
||||||
|
|
||||||
"$changepod")
|
"$changepod")
|
||||||
if [ 'Choice from list' = "$(echo 'Choice from list\nManual input' | fzy)" ]; then
|
empty=0
|
||||||
instance=$(jj -l -i config.json public_list_instances | sed 's/"//g' | fzy)
|
case $(echo 'Recently used\nChoice from list\nManual input' | fzy) in
|
||||||
else
|
"Recently used")
|
||||||
echo "Type instance (ex. $instance):"
|
if [ -s $instance_hist ]; then
|
||||||
read instance
|
touch $instance_hist && instance=$(cat $instance_hist | fzy)
|
||||||
fi
|
else
|
||||||
|
echo 'No recently used instances...'
|
||||||
export instance
|
empty=1
|
||||||
export instance_point="https://$instance/api/v1"
|
fi ;;
|
||||||
conf_instance_state=$(echo 'Permanent\nTemporaly' | fzy)
|
|
||||||
if [ "$conf_instance_state" = 'Permanent' ]; then
|
"Choice from list") instance=$(jj -l -i config.json public_list_instances | sed 's/"//g' | fzy) ;;
|
||||||
jj -i config.json instance -v $instance -o config.json
|
|
||||||
else
|
"Manual input") echo "Type instance (ex. $instance):" && read instance ;;
|
||||||
echo ''
|
esac
|
||||||
fi
|
if [ $empty -eq 0 ]; then
|
||||||
clear
|
echo $instance >> $instance_hist
|
||||||
get_all_avalaible_count_tracks ;;
|
cat $instance_hist | sort | uniq | tee $instance_hist 1>>/dev/null
|
||||||
|
export instance
|
||||||
|
export instance_point="https://$instance/api/v1"
|
||||||
|
conf_instance_state=$(echo 'Permanent\nTemporaly' | fzy)
|
||||||
|
if [ "$conf_instance_state" = 'Permanent' ]; then
|
||||||
|
jj -i config.json instance -v $instance -o config.json
|
||||||
|
else
|
||||||
|
echo ''
|
||||||
|
fi
|
||||||
|
clear
|
||||||
|
get_all_avalaible_count_tracks
|
||||||
|
fi ;;
|
||||||
|
|
||||||
|
|
||||||
"$checkapilimits")
|
"$checkapilimits")
|
||||||
|
|
Loading…
Reference in New Issue