formatted all
This commit is contained in:
9
grpoppro
9
grpoppro
@@ -164,8 +164,11 @@ function sourceData {
|
|||||||
# Perform menu search
|
# Perform menu search
|
||||||
function menuSearch {
|
function menuSearch {
|
||||||
# Two requests to the api
|
# Two requests to the api
|
||||||
[[ "$INTERACTIVE" == "on" ]] && title=$(echo "" | wofi --dmenu --insensitive --prompt="Search Series" --width=300 --height=50)
|
if [[ "$INTERACTIVE" == "on" ]]; then
|
||||||
[[ "$INTERACTIVE" == "off" ]] && [[ -z "$title" ]] && read -r -p "Search Series: " title
|
title=$(echo "" | wofi --dmenu --insensitive --prompt="Search Series" --width=300 --height=50)
|
||||||
|
else
|
||||||
|
read -r -p "Search Series: " title
|
||||||
|
fi
|
||||||
if [[ -z "$title" ]]; then
|
if [[ -z "$title" ]]; then
|
||||||
message "Nothing given"
|
message "Nothing given"
|
||||||
exit 0
|
exit 0
|
||||||
@@ -323,6 +326,7 @@ if [[ "$#" -eq 3 ]]; then
|
|||||||
episode="$3"
|
episode="$3"
|
||||||
response="$(curlRequest "$apiurl/uploads/playlists/$internalid.txt")"
|
response="$(curlRequest "$apiurl/uploads/playlists/$internalid.txt")"
|
||||||
streamurl="$(echo "$response" | grep "mp4" | grep "${season}x${episode}" | head -n1 | awk -F\" '{print $8}')"
|
streamurl="$(echo "$response" | grep "mp4" | grep "${season}x${episode}" | head -n1 | awk -F\" '{print $8}')"
|
||||||
|
message "Loading $title at season $season on episode $episode"
|
||||||
play
|
play
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -333,6 +337,7 @@ if [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[
|
|||||||
basics "$1" # Gets the title, performs one request to imdb and gets the complete url
|
basics "$1" # Gets the title, performs one request to imdb and gets the complete url
|
||||||
getInternalID "$simpleurl" # Gets the complete url and performs one request to get the internal id or inform us it does not exist
|
getInternalID "$simpleurl" # Gets the complete url and performs one request to get the internal id or inform us it does not exist
|
||||||
getMovieStreamUrl "$internalid" # Gets the internal id and performs one request to get the stream url
|
getMovieStreamUrl "$internalid" # Gets the internal id and performs one request to get the stream url
|
||||||
|
message "Loading $title"
|
||||||
play # It uses mpv to stream the file
|
play # It uses mpv to stream the file
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user