diff --git a/.gitignore b/.gitignore index dd116cf..56a7f43 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ - +db.sqlite3 videos/ channel_archiver/yt-dlp-archive.txt channel_archiver/UnusualVideos* diff --git a/core/__pycache__/urls.cpython-38.pyc b/core/__pycache__/urls.cpython-38.pyc index 37bba7e..03b43c4 100644 Binary files a/core/__pycache__/urls.cpython-38.pyc and b/core/__pycache__/urls.cpython-38.pyc differ diff --git a/core/__pycache__/views.cpython-38.pyc b/core/__pycache__/views.cpython-38.pyc index f6535e1..695bc09 100644 Binary files a/core/__pycache__/views.cpython-38.pyc and b/core/__pycache__/views.cpython-38.pyc differ diff --git a/core/templates/base.html b/core/templates/base.html index bf3a68b..0efd746 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -69,6 +69,7 @@

Explore

+ @@ -81,13 +82,13 @@ {% for v in videos %}
- +
{% if v.thumbnail %} - Dist Photo 1 + Dist Photo 1 {% else %} - Dist Photo 1 + Dist Photo 1 {% endif %}
V{{ v.id }}
diff --git a/core/templates/view.html b/core/templates/view.html new file mode 100644 index 0000000..45c0330 --- /dev/null +++ b/core/templates/view.html @@ -0,0 +1,122 @@ +{% load static %} + + + + + + +UnusualArchive + + + + + + + + + + +
+ + + + +
+ +
+
+
+
+

UNUSUAL MEMES V{{video.id}}

+
+ +
+
+
+ + +
+
+ {% block content %} +
+ +
+ + + +
+ + + +
+ {% endblock %} +
+
+ +
+ + + + + +
+ +
+Für die Nachwelt. +
+ +Copyright © 2023 Siebenhirten +
+
+ + + + + + + + + + diff --git a/core/urls.py b/core/urls.py index b8389ef..3c5407b 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,8 +1,10 @@ from django.urls import path from . import views + urlpatterns = [ path('', views.core, name='core'), path('status/', views.status, name='status'), path('about/', views.about, name='about'), + path('view/', views.view, name='view'), ] diff --git a/core/views.py b/core/views.py index 9337ffa..ee05937 100644 --- a/core/views.py +++ b/core/views.py @@ -23,7 +23,10 @@ def status(request): return render(request, 'status.html', {'video_list': video_list[::-1]}) - +def view(request, id): + vid = Video.objects.get(id = id) + if vid: + return render(request, "view.html", {'video': vid}) def about(request): return render(request, 'about.html') diff --git a/db.sqlite3 b/db.sqlite3 index 00128a3..053009c 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/import.py b/import.py index da17b83..615918d 100644 --- a/import.py +++ b/import.py @@ -28,7 +28,7 @@ def extract_version(filename): return None def find_image_file(name_pattern, folder): - pattern = re.compile('.*{}.*\.(jpg|png|webp)'.format(name_pattern), re.IGNORECASE) + pattern = re.compile('.*{} .*\.(jpg|png|webp)'.format(name_pattern), re.IGNORECASE) for root, dirs, files in os.walk(folder): for filename in files: if pattern.match(filename): diff --git a/ragnarok/__pycache__/settings.cpython-38.pyc b/ragnarok/__pycache__/settings.cpython-38.pyc index 431c4ca..d64f6da 100644 Binary files a/ragnarok/__pycache__/settings.cpython-38.pyc and b/ragnarok/__pycache__/settings.cpython-38.pyc differ diff --git a/ragnarok/__pycache__/urls.cpython-38.pyc b/ragnarok/__pycache__/urls.cpython-38.pyc index b8a6655..8307fc3 100644 Binary files a/ragnarok/__pycache__/urls.cpython-38.pyc and b/ragnarok/__pycache__/urls.cpython-38.pyc differ diff --git a/ragnarok/settings.py b/ragnarok/settings.py index 05d136a..b1ed7a6 100644 --- a/ragnarok/settings.py +++ b/ragnarok/settings.py @@ -39,6 +39,8 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'rest_framework', + 'sage_stream', 'core' ] diff --git a/ragnarok/urls.py b/ragnarok/urls.py index 91f4ed6..accda0b 100644 --- a/ragnarok/urls.py +++ b/ragnarok/urls.py @@ -24,6 +24,7 @@ urlpatterns = [ path('', include('core.urls')), path('/', include('core.urls')), path('status/', include('core.urls')), + path('api/', include('sage_stream.api.urls')), ] if settings.DEBUG: diff --git a/static/dist/img/default.png b/static/dist/img/default.png new file mode 100644 index 0000000..86d69dc Binary files /dev/null and b/static/dist/img/default.png differ