Skip to content

Commit 40d5c2d

Browse files
authored
refactor: remove unnecessary code (#291)
* refactor: remove unnecessary code Removed error handling for API response in lobster.sh.
1 parent 931aaa4 commit 40d5c2d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lobster.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
LOBSTER_VERSION="4.5.8"
3+
LOBSTER_VERSION="4.5.9"
44

55
### General Variables ###
66
config_file="$HOME/.config/lobster/lobster_config.sh"
@@ -605,16 +605,6 @@ EOF
605605

606606
final_url="${API_URL}/?url=${embed_link}&payload=${payload}&signature=${signature}&nonce=${nonce}"
607607
json_data=$(curl -s "${final_url}")
608-
609-
case "$json_data" in
610-
*"error"*)
611-
api_error_msg=$(printf "%s" "$json_data" | $sed -n 's/.*"error":"\([^"]*\)".*/\1/p')
612-
send_notification "API Error: $api_error_msg"
613-
return 1
614-
;;
615-
*) ;;
616-
esac
617-
618608
video_link=$(printf "%s" "$json_data" | $sed -nE "s_.*\"file\":\"([^\"]*\.m3u8)\".*_\1_p" | head -1)
619609

620610
[ -n "$quality" ] && video_link=$(printf "%s" "$video_link" | sed -e "s|/playlist.m3u8|/$quality/index.m3u8|")

0 commit comments

Comments
 (0)