From dc670adb45788d5c8d5421a503ed0bdf2f0df987 Mon Sep 17 00:00:00 2001 From: "4 raccoons in a trenchcoat. / luna vivian" Date: Sun, 23 Apr 2023 22:48:28 +0200 Subject: [PATCH] fix some stuff regarding the /channel page :3 + fixed issue where it would say "Unsubscribe from {CHANNEL}!" even tho you aren't subscribed to it (fixes #20) + fixed issue where the channel name would contain "Uploads from" as a prefix to the actual channel's name --- webroot/channel.shs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webroot/channel.shs b/webroot/channel.shs index b2712d8..d8f9b53 100644 --- a/webroot/channel.shs +++ b/webroot/channel.shs @@ -19,7 +19,7 @@ fi if [[ "${get_data[id]}" ]]; then if [[ "${cookies[sh_session]}" != '' ]]; then - if [[ $(grep $(session_get_username "${cookies[sh_session]}") storage/subscribed | grep "${strings[channel_id]}") == '' ]]; then + if [[ $(grep $(session_get_username "${cookies[sh_session]}") storage/subscribed | grep "${get_data[id]}") == '' ]]; then strings[?sub]=true strings[channel_id]="${get_data[id]}" else @@ -33,7 +33,7 @@ if [[ "${get_data[id]}" ]]; then fi elif [[ "${params[id]}" ]]; then if [[ "${cookies[sh_session]}" != '' ]]; then - if [[ $(grep $(session_get_username "${cookies[sh_session]}") storage/subscribed | grep "${strings[channel_id]}") == '' ]]; then + if [[ $(grep $(session_get_username "${cookies[sh_session]}") storage/subscribed | grep "${params[id]}") == '' ]]; then strings[?sub]=true strings[channel_id]="${params[id]}" else @@ -64,7 +64,7 @@ video_id=($(jq -r '.entries[].id' <<< $data)) if [[ $title != 'null' ]]; then strings[?cnnc]=true - strings[subscribe]="$(html_encode "$title" | sed -E "s/ - Videos//g")" + strings[subscribe]="$(html_encode "$title" | sed -E "s/ - Videos//g" | sed -E "s/Uploads from //g")" fi nested_declare meow