From 91b970b3873d751f1bae78720c1c4cb890ba7fec Mon Sep 17 00:00:00 2001 From: konsthol Date: Wed, 1 Jan 2025 20:44:25 +0200 Subject: [PATCH] Chuck Norris Emailed Me This Patch... I'm Not Going To Question It --- grpoppro | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/grpoppro b/grpoppro index 55db291..bf59ebe 100755 --- a/grpoppro +++ b/grpoppro @@ -432,6 +432,18 @@ function openInBrowser { exit 0 } +function getHistory { + if [[ ! -f "$GRPOPPRO_HISTORY_FILE" ]]; then + message "No history found" + exit 0 + fi + + history="$(awk -F'|' '{print $1,":<=> At =>",$2}' "$GRPOPPRO_HISTORY_FILE" | column -t -s':')" + + message "$history" + +} + ### Program starts here ### # Ensure curl-impersonate is installed @@ -462,10 +474,11 @@ fi [[ "$1" == "--resume" ]] && resume [[ "$1" == "--finish" ]] && resumeUnfinishedEpisode [[ "$1" == "--select" ]] && resumeSeries +[[ "$1" == "--history" ]] && getHistory # One arguement and it contains the imdb id # Two requests to the api -if [[ "$1" == *"tt"* ]] && [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ "$1" != "--finish" ]] && [[ "$1" != "--select" ]]; then +if [[ "$1" == *"tt"* ]] && [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ "$1" != "--finish" ]] && [[ "$1" != "--select" ]] && [[ "$1" != "--history" ]]; then simpleurl="$1" getInternalID "$simpleurl" getMovieStreamUrl "$internalid" @@ -493,7 +506,7 @@ if [[ "$#" -eq 3 ]]; then fi # Movies URL -if [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ "$1" != "--finish" ]] && [[ "$1" != "--select" ]]; then +if [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ "$1" != "--finish" ]] && [[ "$1" != "--select" ]] && [[ "$1" != "--history" ]]; then # Two requests to the api 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