Chuck Norris Emailed Me This Patch... I'm Not Going To Question It
This commit is contained in:
17
grpoppro
17
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
|
||||
|
||||
Reference in New Issue
Block a user