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 namemaster
parent
21845a0823
commit
dc670adb45
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue