formatted all

This commit is contained in:
2024-12-30 21:48:31 +02:00
parent 2776baba9f
commit 1c4e50669d

View File

@@ -164,8 +164,11 @@ function sourceData {
# Perform menu search
function menuSearch {
# Two requests to the api
[[ "$INTERACTIVE" == "on" ]] && title=$(echo "" | wofi --dmenu --insensitive --prompt="Search Series" --width=300 --height=50)
[[ "$INTERACTIVE" == "off" ]] && [[ -z "$title" ]] && read -r -p "Search Series: " title
if [[ "$INTERACTIVE" == "on" ]]; then
title=$(echo "" | wofi --dmenu --insensitive --prompt="Search Series" --width=300 --height=50)
else
read -r -p "Search Series: " title
fi
if [[ -z "$title" ]]; then
message "Nothing given"
exit 0
@@ -323,6 +326,7 @@ if [[ "$#" -eq 3 ]]; then
episode="$3"
response="$(curlRequest "$apiurl/uploads/playlists/$internalid.txt")"
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
exit 0
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
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
message "Loading $title"
play # It uses mpv to stream the file
exit 0
fi