diff --git a/ninjastreamFunctions.fn b/ninjastreamFunctions.fn index b6e459c..50ff930 100644 --- a/ninjastreamFunctions.fn +++ b/ninjastreamFunctions.fn @@ -27,10 +27,11 @@ function upload_to_ninjastream () { # echo "hoster_url: $hoster_url" >&2 hoster_url=$(echo $hoster_url | jq ".result") + hoster_filename=$(echo $hoster_url | jq ".name") hoster_url=$(echo $hoster_url | jq ".id") hoster_url=${hoster_url//\"} - if [ $hoster_url != '' ] && [ $hoster_url != 'null' ]; then + if [ "$hoster_url" != "" ] && [ "$hoster_url" != "null" ]; then echo "https://ninjastream.to/watch/$hoster_url" else echo "" @@ -55,7 +56,7 @@ function ninjastream_check_if_file_is_alive () { # is_alive=$(echo $is_alive | jq "first(.[])") # is_alive=$(echo $is_alive | jq ".status") - echo $is_alive + >&2 echo $is_alive if [ "$is_alive" == "\"File not found\"" ]; then echo "false"