diff --git a/base/static/css/main.css b/base/static/css/main.css
index 74e4488..8120679 100644
--- a/base/static/css/main.css
+++ b/base/static/css/main.css
@@ -77,6 +77,11 @@ article.message {
}
#hero {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
background: radial-gradient(
circle 50vh at calc(100vw - 4rem) 50%,
var(--pico-primary-background),
@@ -85,41 +90,19 @@ article.message {
color-mix(in hsl, var(--pico-primary-background) 30%, var(--pico-background-color)) 60%,
color-mix(in hsl, var(--pico-primary-background) 10%, var(--pico-background-color)) 80%,
var(--pico-background-color));
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- height: 100%;
- overflow-y: auto;
+ display: grid;
+ grid-template-rows: 1fr min-content;
+ align-items: center;
padding: 4rem;
- main {
- display: contents;
+ .big-logo {
+ font-size: 8rem;
}
- section {
- max-width: 20rem;
+
+ h1 {
+ font-size: 4rem;
}
}
-.full-page {
- height: 100%;
- display: grid;
- grid-template-rows: 1fr;
- align-items: center;
- margin-bottom: 4rem;
-
- &.r {
- -ms-grid-column-align: end;
- }
- .big-logo {
- font-size: 8rem;
- }
-
- h1 {
- font-size: 4rem;
- }
-}
-
h1,
h2,
@@ -218,7 +201,3 @@ table.results, table.musics {
}
}
}
-
-.brand-name {
- color: var(--pico-primary);
-}
diff --git a/base/static/favicon/apple-touch-icon.png b/base/static/favicon/apple-touch-icon.png
deleted file mode 100644
index abb8a48..0000000
Binary files a/base/static/favicon/apple-touch-icon.png and /dev/null differ
diff --git a/base/static/favicon/favicon-96x96.png b/base/static/favicon/favicon-96x96.png
deleted file mode 100644
index beab288..0000000
Binary files a/base/static/favicon/favicon-96x96.png and /dev/null differ
diff --git a/base/static/favicon/favicon.ico b/base/static/favicon/favicon.ico
deleted file mode 100644
index 178d60c..0000000
Binary files a/base/static/favicon/favicon.ico and /dev/null differ
diff --git a/base/static/favicon/favicon.svg b/base/static/favicon/favicon.svg
deleted file mode 100644
index 63c10e0..0000000
--- a/base/static/favicon/favicon.svg
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/base/static/favicon/site.webmanifest b/base/static/favicon/site.webmanifest
deleted file mode 100644
index af6d059..0000000
--- a/base/static/favicon/site.webmanifest
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "MyWebSite",
- "short_name": "MySite",
- "icons": [
- {
- "src": "/web-app-manifest-192x192.png",
- "sizes": "192x192",
- "type": "image/png",
- "purpose": "maskable"
- },
- {
- "src": "/web-app-manifest-512x512.png",
- "sizes": "512x512",
- "type": "image/png",
- "purpose": "maskable"
- }
- ],
- "theme_color": "#aa40bf",
- "background_color": "#ffffff",
- "display": "standalone"
-}
diff --git a/base/static/favicon/web-app-manifest-192x192.png b/base/static/favicon/web-app-manifest-192x192.png
deleted file mode 100644
index f7f97da..0000000
Binary files a/base/static/favicon/web-app-manifest-192x192.png and /dev/null differ
diff --git a/base/static/favicon/web-app-manifest-512x512.png b/base/static/favicon/web-app-manifest-512x512.png
deleted file mode 100644
index 9e4e381..0000000
Binary files a/base/static/favicon/web-app-manifest-512x512.png and /dev/null differ
diff --git a/base/templates/base.html b/base/templates/base.html
index 504228f..16be674 100644
--- a/base/templates/base.html
+++ b/base/templates/base.html
@@ -11,7 +11,7 @@
Musik
{% endblock title %}
- {% include "favicon.html" %}
+
-
-
-
-
-
-
diff --git a/base/templates/footer.html b/base/templates/footer.html
index 6c57641..52895f6 100644
--- a/base/templates/footer.html
+++ b/base/templates/footer.html
@@ -1 +1 @@
-Musik {{ VERSION }} – © Edgar P. Burkhart – Mentions légales et confidentialité
+Musik {{ VERSION }} – © Edgar P. Burkhart – Mentions légales
diff --git a/base/templates/hero.html b/base/templates/hero.html
index 813c011..04c2aee 100644
--- a/base/templates/hero.html
+++ b/base/templates/hero.html
@@ -1,25 +1,11 @@
{% load static %}
-
-
-
-
- Musik Le jeu où ta playlist devient ton arme secrète !
-
-
- Invite ta bande, ajoute tes sons fétiches, et c’est parti ! Une playlist Youtube apparaît, mélangeant les coups de cœur de tout le monde. Le jeu ? Écoute, devine qui a choisi quoi, et découvre les secrets musicaux de tes potes. Entre pièges, révélations et fous rires, Musik c’est le jeu parfait pour tester vos oreilles… et vos amitiés. Prêt à jouer le DJ incognito ?
-
-
-
+
+ Musik
+
+ Jouer
+
{% include "footer.html" %}
diff --git a/base/templates/privacy.html b/base/templates/privacy.html
index 1549403..8e78465 100644
--- a/base/templates/privacy.html
+++ b/base/templates/privacy.html
@@ -16,7 +16,6 @@
Youtube est une marque de Google LLC.
- Les données saisies dans Musik (groupes créés, listes de musiques) sont conservées jusqu'à demande de suppression. La suppression du compte entraîne la suppression de l'ensemble des données qui y sont liées.
- La suppression du compte peut être demandée dans les paramètres du compte. La suppression des données est immédiate et définitive.
+ La suppression des données stockée par le service Musik pour son utilisation peut être demandée par email à Edgar P. Burkhart .
{% endblock content %}
diff --git a/compose.yaml b/compose.yaml
index a6ee8b3..04838ec 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -32,12 +32,10 @@ services:
rabbitmq:
image: rabbitmq
container_name: musik_rabbitmq
- restart: unless-stopped
postgres:
image: postgres:17
container_name: musik_postgres
- restart: unless-stopped
env_file: stack.env
volumes:
- /docker/musik/postgres:/var/lib/postgresql/data
diff --git a/game/models.py b/game/models.py
index 153583f..18912a0 100644
--- a/game/models.py
+++ b/game/models.py
@@ -99,9 +99,6 @@ def generateYoutubePlaylist(sender, instance, created, **kwargs):
if creds := instance.group.owner.youtubecredentials:
tasks.generate_playlist.delay_on_commit(creds.credentials, instance.pk)
- else:
- instance.playlist_loading = False
- instance.save()
@receiver(post_delete, sender=MusikGame)
@@ -121,10 +118,13 @@ class MusicGameOrder(models.Model):
value = models.PositiveIntegerField(default=0)
def update_value(self):
- x = self.musicgameanswer_set.filter(game__player=F("answer")).count()
- n = self.game.players.count()
- n = max(3, n)
- self.value = 1000 * 2 ** (-(x - 2) / (n - 2))
+ n_right = self.musicgameanswer_set.filter(game__player=F("answer")).count()
+ if n_right == 0:
+ self.value = 1000
+ else:
+ self.value = 1000 / (
+ 1 + ((n_right - 1) / (self.game.players.count() - 1)) ** 0.5
+ )
self.save()
class Meta:
diff --git a/game/tasks.py b/game/tasks.py
index 61937d0..22a7dc0 100644
--- a/game/tasks.py
+++ b/game/tasks.py
@@ -18,7 +18,7 @@ def generate_playlist(creds, game_pk):
"description": "Playlist générée par Musik",
},
"status": {
- "privacyStatus": "unlisted",
+ "privacyStatus": "private",
},
},
)
diff --git a/game/templates/game/musikgame_answer.html b/game/templates/game/musikgame_answer.html
index f947802..84e055d 100644
--- a/game/templates/game/musikgame_answer.html
+++ b/game/templates/game/musikgame_answer.html
@@ -21,6 +21,6 @@
{% endfor %}
- {% if not musikgame.over %}Sauvegarder mes réponses {% endif %}
+ {% if not musikgame.over %}Valider mes réponses {% endif %}
{% endblock content %}
diff --git a/game/templates/game/musikgame_detail.html b/game/templates/game/musikgame_detail.html
index 66708c0..67b9921 100644
--- a/game/templates/game/musikgame_detail.html
+++ b/game/templates/game/musikgame_detail.html
@@ -9,31 +9,31 @@
{% endif %}
{{ musikgame.date }}
-
+ {% endif %}
Joueurs
diff --git a/game/templates/game/musikgame_form.html b/game/templates/game/musikgame_form.html
index 655723a..38ed5b6 100644
--- a/game/templates/game/musikgame_form.html
+++ b/game/templates/game/musikgame_form.html
@@ -5,12 +5,10 @@
{{ group.name }}
- {% if group.owner.youtubecredentials.credentials %}
- Une playlist sera générée automatiquement sur le compte Youtube de {{ group.owner }} ({{ group.owner.youtubecredentials.title }} ).
- {% elif user == group.owner %}
- Connecter mon compte Youtube
+ {% if not user.youtubecredentials.credentials %}
+ Me connecter au compte Youtube
{% else %}
- Aucune playlist Youtube ne sera générée car {{ group.owner }} n'a pas lié son compte Youtube.
+ Une playlist sera générée automatiquement sur le compte Youtube {{ user.youtubecredentials.title }} .
{% endif %}
{% form form %}
diff --git a/game/views.py b/game/views.py
index 45685aa..d5f3b7d 100644
--- a/game/views.py
+++ b/game/views.py
@@ -327,12 +327,15 @@ class GameCreateView(LoginRequiredMixin, CreateView):
pm_list = list(zip(players, musics))
random.shuffle(pm_list)
for (player, music), order in zip(pm_list, range(1, len(pm_list) + 1)):
+ music.blacklisted = True
+ music.save()
models.MusicGameOrder.objects.create(
game=form.instance, player=player, music_video=music, order=order
)
- form.instance.playlist_loading = True
- form.instance.save()
+ if models.YoutubeCredentials.objects.filter(user=self.request.user).exists():
+ form.instance.playlist_loading = True
+ form.instance.save()
return res
@@ -478,9 +481,6 @@ class GameEndView(LoginRequiredMixin, SingleObjectMixin, View):
if not game.group.is_leader(request.user):
raise PermissionDenied()
game.over = True
- models.MusicVideo.objects.filter(musicgameorder__game=game).update(
- blacklisted=True
- )
for go in game.musicgameorder_set.all():
go.update_value()
diff --git a/musik/settings.py b/musik/settings.py
index 0f097d7..b69b0cb 100644
--- a/musik/settings.py
+++ b/musik/settings.py
@@ -13,7 +13,7 @@ https://docs.djangoproject.com/en/5.2/ref/settings/
import os
from pathlib import Path
-VERSION = "0.4.4"
+VERSION = "0.4.1"
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
diff --git a/pyproject.toml b/pyproject.toml
index 0be7cd8..93cda42 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "musik"
-version = "0.4.4"
+version = "0.4.1"
description = "Le jeu de Musik."
readme = "README.md"
requires-python = ">=3.12"
diff --git a/uv.lock b/uv.lock
index 21e0387..44c8b62 100644
--- a/uv.lock
+++ b/uv.lock
@@ -423,7 +423,7 @@ wheels = [
[[package]]
name = "musik"
-version = "0.4.4"
+version = "0.4.1"
source = { virtual = "." }
dependencies = [
{ name = "celery" },