From dde18b5aad1ed0141a1b202b99fe218f532c7621 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 10 Feb 2022 00:19:49 +0100 Subject: [PATCH] Fix logo sourcing, update privacy policy accordingly --- Pages/Info.cshtml | 21 +++++++++++++++------ Pages/Privacy.cshtml | 5 ++--- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Pages/Info.cshtml b/Pages/Info.cshtml index d4bb34a..6259db6 100644 --- a/Pages/Info.cshtml +++ b/Pages/Info.cshtml @@ -1,5 +1,8 @@ @page @using global::c3stream.DataModels +@using System.Net.Http +@using System.Net +@using System.IO @model InfoModel @{ ViewData["Title"] = "Info"; @@ -51,13 +54,19 @@ }; } -@if (System.IO.File.Exists(logoPath)) { - Conference logo -} -else { - Conference logo +@if (!System.IO.File.Exists(logoPath)) { + if (!Directory.Exists(System.IO.Path.Combine(c3stream.CachePath, conference.Acronym))) { + Directory.CreateDirectory(System.IO.Path.Combine(c3stream.CachePath, conference.Acronym)); + } + + using var httpClient = new HttpClient(); + await using var stream = httpClient.GetStreamAsync(conference.LogoUri).Result; + await using var fileStream = new FileStream(logoPath, FileMode.CreateNew); + await stream.CopyToAsync(fileStream); } +Conference logo + @if (isWatched) {

@title - @speakers

} @@ -114,4 +123,4 @@ else {

Share this talk:
-https://@Request.Host.Value/Info?guid=@Request.Query["guid"] \ No newline at end of file +https://@Request.Host.Value/Info?guid=@Request.Query["guid"] diff --git a/Pages/Privacy.cshtml b/Pages/Privacy.cshtml index 87316aa..c72ce6c 100644 --- a/Pages/Privacy.cshtml +++ b/Pages/Privacy.cshtml @@ -5,12 +5,11 @@ }

Privacy Policy

- Last update: 2022-02-09

+ Last update: 2022-02-10

All data saved about you on this website is the watched status of talks you marked in association with your randomly generated bookmark UUID.
No logs are kept, no trackers used.

Keep in mind that you are forwarded to media.ccc.de when you watch a talk (except when using our mirror).
- Furthermore, when you open the info page for a talk, your IP address is shared with media.ccc.de, due to the fetched icon.
You should therefore reference their privacy policy as well.
-

\ No newline at end of file +