From 3fd4570dbd2595cc74d2d8d5882e5b059f6caaa8 Mon Sep 17 00:00:00 2001 From: perro Date: Mon, 20 Mar 2023 11:06:03 -0700 Subject: [PATCH 1/5] =?UTF-8?q?Adici=C3=B3n=20de=20t=C3=ADtulo=20a=20la=20?= =?UTF-8?q?p=C3=A1gina=20de=20inicio=20de=20sesi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/templates/registration/login.html | 1 + 1 file changed, 1 insertion(+) diff --git a/source/templates/registration/login.html b/source/templates/registration/login.html index 410524c..e0eea07 100644 --- a/source/templates/registration/login.html +++ b/source/templates/registration/login.html @@ -5,6 +5,7 @@
{% csrf_token %} +

Inicio de sesión

From 6810cf11c435b849570ad259b07c84127e5d300a Mon Sep 17 00:00:00 2001 From: perro Date: Mon, 20 Mar 2023 11:17:45 -0700 Subject: [PATCH 2/5] =?UTF-8?q?Arreglo=20que=20hacia=20random=20en=20a=20p?= =?UTF-8?q?artir=20de=20cien=20pelis,=20cuando=20deber=C3=ADa=20ser=20a=20?= =?UTF-8?q?partir=20de=20101?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/main/models.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source/main/models.py b/source/main/models.py index 7ee9f1c..9ce8971 100644 --- a/source/main/models.py +++ b/source/main/models.py @@ -7,7 +7,6 @@ import wikipediaapi from bs4 import BeautifulSoup from django.conf import settings from django.db import models -from pathlib import Path from unidecode import unidecode @@ -86,7 +85,7 @@ class MovieQuerySet(models.QuerySet): all = list(Movie.objects.filter(**kwargs).values()) if len(all) < min_items: return None - elif len(all) < random_max: + elif len(all) <= random_max: return all else: return random.sample(all, random_max) @@ -173,7 +172,7 @@ class MovieQuerySet(models.QuerySet): movie["count_formatted"] = self.format_count(movie["count"]) movie["stars_icons"] = self.format_stars(movie["stars"]) movie["file_name"] = self._fix_path_movie(movie["file_name"]) - movie["cartel"] = self._fix_path_cartel(movie['cartel']) + movie["cartel"] = self._fix_path_cartel(movie["cartel"]) if wikipedia: movie["wiki"] = self.get_wiki(movie) @@ -182,16 +181,16 @@ class MovieQuerySet(models.QuerySet): Enmienda ruta a medio. """ if not file_name: - return '' + return "" letter = file_name[0].upper() if letter.isdigit(): - letter = '0' + letter = "0" url = f"{settings.URL_CDN}/{letter}/{file_name}" return url def _fix_path_cartel(self, file_name): - """ Si no existe el cartel regresa el default """ + """Si no existe el cartel regresa el default""" url = f"{settings.MEDIA_URL}{file_name}" path = Path(f"{settings.MEDIA_ROOT}{file_name}") @@ -200,7 +199,6 @@ class MovieQuerySet(models.QuerySet): return url - def fix_summ(self, raw): """ Enmienda sinopsis de Wikipedia. From d05b85a87897c879609071b01c68e5a3745dfcb4 Mon Sep 17 00:00:00 2001 From: perro Date: Mon, 20 Mar 2023 11:25:22 -0700 Subject: [PATCH 3/5] =?UTF-8?q?Deshabilitaci=C3=B3n=20de=20selecci=C3=B3n?= =?UTF-8?q?=20de=20texto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/static/css/main.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/static/css/main.css b/source/static/css/main.css index a4ab280..ca42f6d 100644 --- a/source/static/css/main.css +++ b/source/static/css/main.css @@ -259,6 +259,9 @@ top: 0; left: 0; transition: opacity 0.3s; + -webkit-user-select: none; /* Safari */ + -ms-user-select: none; /* IE 10 and IE 11 */ + user-select: none; /* Standard syntax */ } /* Show the tooltip text when you mouse over the tooltip container */ From 0237d468c4491d75771022f431238c9a64841840 Mon Sep 17 00:00:00 2001 From: perro Date: Mon, 20 Mar 2023 11:33:25 -0700 Subject: [PATCH 4/5] =?UTF-8?q?Deshabilitaci=C3=B3n=20de=20selecci=C3=B3n?= =?UTF-8?q?=20de=20texto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/main/static/css/main.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/main/static/css/main.css b/source/main/static/css/main.css index 38adeee..7fe590b 100644 --- a/source/main/static/css/main.css +++ b/source/main/static/css/main.css @@ -263,6 +263,9 @@ top: 0; left: 0; transition: opacity 0.3s; + -webkit-user-select: none; /* Safari */ + -ms-user-select: none; /* IE 10 and IE 11 */ + user-select: none; /* Standard syntax */ } /* Show the tooltip text when you mouse over the tooltip container */ From 33bf5c202c94e0542b66f27870ed4f95686289c1 Mon Sep 17 00:00:00 2001 From: perro Date: Mon, 20 Mar 2023 11:44:30 -0700 Subject: [PATCH 5/5] =?UTF-8?q?Arreglo=20de=20tecla=20r=C3=A1pida=20'espac?= =?UTF-8?q?io'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/main/static/js/player.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/main/static/js/player.js b/source/main/static/js/player.js index 36dd692..55dcc5a 100644 --- a/source/main/static/js/player.js +++ b/source/main/static/js/player.js @@ -1,9 +1,16 @@ // Deshabilita scroll con la tecla de espacio // Esto es para que en 'player' quede habilitado para reproducción window.addEventListener('keydown', (e) => { - if (e.keyCode === 32 && e.target === document.body) { - e.preventDefault(); - } + if (e.keyCode === 32) { + if (e.target === document.body) { + e.preventDefault(); + } + // Por alguna razón la tecla rápida 'espacio' no funciona en toggle como + // la tecla rápida 'k', así que se fuerza para el mismo comportamiento + window.dispatchEvent(new KeyboardEvent('keydown', { + 'key': 'k' + })); + } }); // Añade un aviso