fix login issue from watch page

closes issue #3

You can finally log in from the watch page and be redirected back to it. :3
merge-requests/6/head
4 raccoons in a trenchcoat. / luna vivian 2023-04-20 12:20:01 +02:00
parent a078e3f813
commit f69e6589e3
2 changed files with 3 additions and 2 deletions

View File

@ -15,7 +15,7 @@
{{start ?unfav}}<a href='unfav.shs?v={{.id}}' target='_blank'>Remove from favourites</a><br>{{else ?unfav}}{{end ?unfav}}
{{start ?sub}}<a href='subscribe.shs?id={{.channel_id}}' target='_blank'>Subscribe to {{.uploader}}!</a><br>{{end ?sub}}
{{start ?unsub}}<a href='unsubscribe.shs?id={{.channel_id}}' target='_blank'>Unsubscribe from {{.uploader}}!</a><br>{{end ?unsub}}
{{start ?login}}<b><a href='/login.shs?r={{.r}}'>Log in</a> to add this video to your favourites and/or subscribe to this channel!</b><br>{{end ?login}}
{{start ?login}}<b><a href='/login.shs?r={{.login_r}}'>Log in</a> to add this video to your favourites and/or subscribe to this channel!</b><br>{{end ?login}}
</td>
<td style="text-align: right; vertical-align: top;">
<b>{{.view_count}}</b> views<br>

View File

@ -156,7 +156,8 @@ if [[ "${get_data[v]}" ]]; then
fi
else
strings[?login]=true
strings[login_r]=$(sed -s 's/?/___/' <<< "${r[url]}")
#strings[login_r]=$(sed -s 's/?/___/' <<< "${r[url]}")
strings[login_r]="watch___v=${get_data[v]}"
fi
strings[description]=$(jq -r '.description' <<< "$video")