From 7f40743d831353b59b1ea58e509794ccbd1e392a Mon Sep 17 00:00:00 2001 From: "Weblate (bot)" Date: Wed, 8 Jan 2025 11:48:31 +0100 Subject: [PATCH 1/9] chore(legacy): translations update from Hosted Weblate (#3129) Translations update from [Hosted Weblate](https://hosted.weblate.org) for [LibreTime/Legacy](https://hosted.weblate.org/projects/libretime/legacy/). Current translation status: ![Weblate translation status](https://hosted.weblate.org/widget/libretime/legacy/horizontal-auto.svg) Co-authored-by: marmotte --- legacy/locale/fr_FR/LC_MESSAGES/libretime.po | 230 ++++++++++--------- 1 file changed, 125 insertions(+), 105 deletions(-) diff --git a/legacy/locale/fr_FR/LC_MESSAGES/libretime.po b/legacy/locale/fr_FR/LC_MESSAGES/libretime.po index 953d8a633..cb7e2c320 100644 --- a/legacy/locale/fr_FR/LC_MESSAGES/libretime.po +++ b/legacy/locale/fr_FR/LC_MESSAGES/libretime.po @@ -12,15 +12,16 @@ msgstr "" "Project-Id-Version: LibreTime\n" "Report-Msgid-Bugs-To: https://github.com/libretime/libretime/issues\n" "POT-Creation-Date: 2024-12-09 02:37+0000\n" -"PO-Revision-Date: 2023-03-06 23:45+0000\n" -"Last-Translator: \"Jonas L.\" \n" -"Language-Team: French \n" +"PO-Revision-Date: 2025-01-08 09:00+0000\n" +"Last-Translator: marmotte \n" +"Language-Team: French \n" "Language: fr_FR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.16.2-dev\n" +"X-Generator: Weblate 5.10-dev\n" #: application/common/DateHelper.php:216 #, php-format @@ -227,7 +228,7 @@ msgstr "Interlingue" #: application/common/LocaleHelper.php:68 msgid "Inupiak" -msgstr "Inupiak" +msgstr "Inupiaq" #: application/common/LocaleHelper.php:69 msgid "Indonesian" @@ -275,7 +276,7 @@ msgstr "Cambodgien" #: application/common/LocaleHelper.php:80 msgid "Kannada" -msgstr "Kannada" +msgstr "Canarais" #: application/common/LocaleHelper.php:81 msgid "Korean" @@ -359,7 +360,7 @@ msgstr "Nauru" #: application/common/LocaleHelper.php:101 msgid "Norwegian Bokmål" -msgstr "" +msgstr "Norvégien Bokmål" #: application/common/LocaleHelper.php:102 msgid "Nepali" @@ -407,7 +408,7 @@ msgstr "Romanche" #: application/common/LocaleHelper.php:113 msgid "Kirundi" -msgstr "Kirundi" +msgstr "Roundi" #: application/common/LocaleHelper.php:114 msgid "Romanian" @@ -431,7 +432,7 @@ msgstr "Sindhi" #: application/common/LocaleHelper.php:119 msgid "Sangro" -msgstr "Sangro" +msgstr "Sango" #: application/common/LocaleHelper.php:120 msgid "Serbo-Croatian" @@ -471,11 +472,11 @@ msgstr "Serbe" #: application/common/LocaleHelper.php:129 msgid "Siswati" -msgstr "Siswati" +msgstr "Swati" #: application/common/LocaleHelper.php:130 msgid "Sesotho" -msgstr "Sesotho" +msgstr "Sotho" #: application/common/LocaleHelper.php:131 msgid "Sundanese" @@ -519,7 +520,7 @@ msgstr "Tagalog" #: application/common/LocaleHelper.php:141 msgid "Setswana" -msgstr "Setswana" +msgstr "Tswana" #: application/common/LocaleHelper.php:142 msgid "Tonga" @@ -605,7 +606,9 @@ msgstr "Vous n'avez pas encore programmé d'émissions. %sCréer une émission%s #: application/common/UsabilityHints.php:89 msgid "To start broadcasting, cancel the current linked show by clicking on it and selecting 'Cancel Show'." -msgstr "Pour commencer la diffusion, annulez l'émission liée actuelle en cliquant dessus puis en sélectionnant « Annuler l'émission »." +msgstr "" +"Pour commencer la diffusion, annulez l'émission actuellement liée en " +"cliquant dessus puis en sélectionnant \"Annuler l'émission\"." #: application/common/UsabilityHints.php:92 #, php-format @@ -613,12 +616,16 @@ msgid "" "Linked shows need to be filled with tracks before it starts. To start broadcasting cancel the current linked show and schedule an unlinked show.\n" " %sCreate an unlinked show now%s." msgstr "" -"Les émissions liées doivent être remplies avec des pistes avant de commencer. Pour commencer à diffuser, annulez l'émission liée actuelle et programmer une émission dé-liée.\n" -" %sCréer une émission dé-liée%s." +"Les émissions liées doivent être remplies avec des pistes avant de " +"commencer. Pour commencer à diffuser, annulez l'émission liée actuelle et " +"programmer une émission dé-lié\n" +"…%sCréer une émission non liée%s." #: application/common/UsabilityHints.php:96 msgid "To start broadcasting, click on the current show and select 'Schedule Tracks'" -msgstr "Pour commencer la diffusion, cliquez sur une émission et sélectionnez « Ajouter des pistes »" +msgstr "" +"Pour commencer la diffusion, cliquez sur une émission et sélectionnez " +"\"Ajouter des pistes\"" #: application/common/UsabilityHints.php:100 #, php-format @@ -627,7 +634,7 @@ msgstr "L'émission actuelle est vide. %sAjouter des pistes audio%s." #: application/common/UsabilityHints.php:107 msgid "Click on the show starting next and select 'Schedule Tracks'" -msgstr "Cliquez sur l'émission suivante et sélectionner « Ajouter des pistes »" +msgstr "Cliquez sur l'émission suivante et sélectionner \"Ajouter des pistes\"" #: application/common/UsabilityHints.php:111 #, php-format @@ -960,7 +967,9 @@ msgstr "Copie de %s" #: application/controllers/ListenerstatController.php:46 msgid "Please make sure admin user/password is correct on Settings->Streams page." -msgstr "Veuillez vous assurer que l’administrateur·ice a un mot de passe correct dans la page Préférences -> Flux." +msgstr "" +"Veuillez vous assurer que l’administrateur a un mot de passe correct dans la " +"page Préférences -> Flux." #: application/controllers/LocaleController.php:27 msgid "Audio Player" @@ -1190,7 +1199,7 @@ msgstr "Titre" #: application/services/HistoryService.php:1087 #: application/services/HistoryService.php:1102 msgid "Creator" -msgstr "Créateur.ice" +msgstr "Créateur" #: application/controllers/LocaleController.php:90 #: application/models/Criteria.php:146 @@ -1200,7 +1209,7 @@ msgstr "Album" #: application/controllers/LocaleController.php:91 msgid "Bit Rate" -msgstr "Taux d'echantillonage" +msgstr "Débit (kbs)" #: application/controllers/LocaleController.php:92 #: application/models/Criteria.php:149 @@ -1212,20 +1221,20 @@ msgstr "BPM" #: application/services/HistoryService.php:1058 #: application/services/HistoryService.php:1105 msgid "Composer" -msgstr "Compositeur.ice" +msgstr "Compositeur" #: application/controllers/LocaleController.php:94 #: application/models/Criteria.php:151 #: application/services/HistoryService.php:1063 msgid "Conductor" -msgstr "Conducteur" +msgstr "Chef d'orchestre" #: application/controllers/LocaleController.php:95 #: application/models/Criteria.php:152 #: application/services/HistoryService.php:1060 #: application/services/HistoryService.php:1106 msgid "Copyright" -msgstr "Droit d'Auteur.ice" +msgstr "Droit d'Auteur" #: application/controllers/LocaleController.php:96 #: application/models/Criteria.php:156 @@ -1277,7 +1286,7 @@ msgstr "Durée" #: application/controllers/LocaleController.php:104 #: application/models/Criteria.php:166 msgid "Mime" -msgstr "Mime" +msgstr "MIME" #: application/controllers/LocaleController.php:105 #: application/models/Criteria.php:167 @@ -1293,11 +1302,11 @@ msgstr "Propriétaire" #: application/controllers/LocaleController.php:107 #: application/models/Criteria.php:169 msgid "Replay Gain" -msgstr "Replay Gain" +msgstr "ReplayGain" #: application/controllers/LocaleController.php:108 msgid "Sample Rate" -msgstr "Taux d'échantillonnage" +msgstr "Taux Échantillonnage" #: application/controllers/LocaleController.php:109 #: application/models/Criteria.php:172 @@ -1362,7 +1371,7 @@ msgstr "Téléversement en cours..." #: application/controllers/LocaleController.php:122 msgid "Retrieving data from the server..." -msgstr "Récupération des données du serveur..." +msgstr "Récupération des données du serveur ..." #: application/controllers/LocaleController.php:124 msgid "Import" @@ -1409,7 +1418,10 @@ msgstr "Section Podcast" #: application/controllers/LocaleController.php:135 #, php-format msgid "You are currently uploading files. %sGoing to another screen will cancel the upload process. %sAre you sure you want to leave the page?" -msgstr "Vous êtes en train de téléverser des fichiers. %s Aller vers un autre écran pour annuler le processus de téléversement. %s Êtes-vous sûr·e de vouloir quitter la page ?" +msgstr "" +"Vous êtes en train de téléverser des fichiers. %s Aller vers un autre écran " +"pour annuler le processus de téléversement. %s Êtes-vous sûr de vouloir " +"quitter la page ?" #: application/controllers/LocaleController.php:137 msgid "Open Media Builder" @@ -1450,11 +1462,11 @@ msgstr "Airtime n'est pas sûr de l'état de ce fichier. Cela peut arriver lorsq #: application/controllers/LocaleController.php:147 #, php-format msgid "Listener Count on %s: %s" -msgstr "Nombre d'auditeur·ice·s sur %s : %s" +msgstr "Nombre d'auditeurs sur %s : %s" #: application/controllers/LocaleController.php:149 msgid "Remind me in 1 week" -msgstr "Me le rappeler dans une semain" +msgstr "Me le rappeler dans une semaine" #: application/controllers/LocaleController.php:150 msgid "Remind me never" @@ -1462,12 +1474,12 @@ msgstr "Ne jamais me le rappeler" #: application/controllers/LocaleController.php:151 msgid "Yes, help Airtime" -msgstr "Oui, aider Airtime" +msgstr "Oui, aider LibreTime" #: application/controllers/LocaleController.php:152 #: application/controllers/LocaleController.php:196 msgid "Image must be one of jpg, jpeg, png, or gif" -msgstr "L'Image doit être du type jpg, jpeg, png, ou gif" +msgstr "L'image doit être du type jpg, jpeg, png, ou gif" #: application/controllers/LocaleController.php:154 msgid "A static smart block will save the criteria and generate the block content immediately. This allows you to edit and view it in the Library before adding it to a show." @@ -1557,8 +1569,8 @@ msgid "" "Are you sure you want to change the storage folder?\n" "This will remove the files from your Airtime library!" msgstr "" -"Êtes-vous sûr que vous voulez changer le répertoire de stockage ? \n" -"Cela supprimera les fichiers de votre médiathèque Airtime !" +"Êtes-vous sûr que vous voulez changer le répertoire de stockage ? \n" +"Cela supprimera les fichiers de votre médiathèque LibreTime !" #: application/controllers/LocaleController.php:177 msgid "Manage Media Folders" @@ -1643,7 +1655,9 @@ msgstr "Aucun résultat trouvé" #: application/controllers/LocaleController.php:200 msgid "This follows the same security pattern for the shows: only users assigned to the show can connect." -msgstr "Cela suit le même modèle de sécurité que pour les émissions : seul·e·s les utilisateur·ice·s affectés à l' émission peuvent se connecter." +msgstr "" +"Cela suit le même modèle de sécurité que pour les émissions : seul les " +"utilisateurs affectés à l' émission peuvent se connecter." #: application/controllers/LocaleController.php:201 msgid "Specify custom authentication which will work only for this show." @@ -1698,8 +1712,9 @@ msgid "60m" msgstr "60m" #: application/controllers/LocaleController.php:219 +#, fuzzy msgid "Retreiving data from the server..." -msgstr "Récupération des données du serveur..." +msgstr "Récupération des données du serveur ..." #: application/controllers/LocaleController.php:220 msgid "This show has no scheduled content." @@ -1715,7 +1730,7 @@ msgstr "Janvier" #: application/controllers/LocaleController.php:226 msgid "February" -msgstr "Fevrier" +msgstr "Février" #: application/controllers/LocaleController.php:227 msgid "March" @@ -1760,47 +1775,47 @@ msgstr "Décembre" #: application/controllers/LocaleController.php:237 msgid "Jan" -msgstr "Jan" +msgstr "janv." #: application/controllers/LocaleController.php:238 msgid "Feb" -msgstr "Fev" +msgstr "févr." #: application/controllers/LocaleController.php:239 msgid "Mar" -msgstr "Mar" +msgstr "mars" #: application/controllers/LocaleController.php:240 msgid "Apr" -msgstr "Avr" +msgstr "avr." #: application/controllers/LocaleController.php:242 msgid "Jun" -msgstr "Jun" +msgstr "juin" #: application/controllers/LocaleController.php:243 msgid "Jul" -msgstr "Jui" +msgstr "juill." #: application/controllers/LocaleController.php:244 msgid "Aug" -msgstr "Aou" +msgstr "août" #: application/controllers/LocaleController.php:245 msgid "Sep" -msgstr "Sep" +msgstr "sept." #: application/controllers/LocaleController.php:246 msgid "Oct" -msgstr "Oct" +msgstr "oct." #: application/controllers/LocaleController.php:247 msgid "Nov" -msgstr "Nov" +msgstr "nov." #: application/controllers/LocaleController.php:248 msgid "Dec" -msgstr "Dec" +msgstr "déc." #: application/controllers/LocaleController.php:249 msgid "Today" @@ -2015,11 +2030,11 @@ msgstr "Les caractéristiques de la forme d'onde sont disponibles dans un naviga #: application/controllers/LocaleController.php:309 msgid "Select all" -msgstr "Tout Selectionner" +msgstr "Tout Sélectionner" #: application/controllers/LocaleController.php:310 msgid "Select none" -msgstr "Ne Rien Selectionner" +msgstr "Ne Rien Sélectionner" #: application/controllers/LocaleController.php:311 msgid "Trim overbooked shows" @@ -2068,26 +2083,26 @@ msgstr "Ouvrir" #: application/controllers/LocaleController.php:330 #: application/forms/AddUser.php:100 msgid "Admin" -msgstr "Administrateur·ice" +msgstr "Administrateur" #: application/controllers/LocaleController.php:331 #: application/forms/AddUser.php:98 msgid "DJ" -msgstr "DeaJee" +msgstr "DJ" #: application/controllers/LocaleController.php:332 #: application/forms/AddUser.php:99 msgid "Program Manager" -msgstr "Programmateur·ice" +msgstr "Programmateur" #: application/controllers/LocaleController.php:333 #: application/forms/AddUser.php:97 msgid "Guest" -msgstr "Invité·e" +msgstr "Invité" #: application/controllers/LocaleController.php:334 msgid "Guests can do the following:" -msgstr "Les Invité·e·s peuvent effectuer les opérations suivantes :" +msgstr "Les invités peuvent effectuer les opérations suivantes :" #: application/controllers/LocaleController.php:335 msgid "View schedule" @@ -2135,7 +2150,7 @@ msgstr "Gérez tout le contenu de l'audiothèque" #: application/controllers/LocaleController.php:346 msgid "Admins can do the following:" -msgstr "Les Administrateur·ice·s peuvent effectuer les opérations suivantes :" +msgstr "Les administrateurs peuvent effectuer les opérations suivantes :" #: application/controllers/LocaleController.php:347 msgid "Manage preferences" @@ -2143,7 +2158,7 @@ msgstr "Gérer les préférences" #: application/controllers/LocaleController.php:348 msgid "Manage users" -msgstr "Gérer les utilisateur·ice·s" +msgstr "Gérer les utilisateurs" #: application/controllers/LocaleController.php:349 msgid "Manage watched folders" @@ -2439,7 +2454,7 @@ msgstr "Aucun résultat correspondant trouvé." #: application/controllers/LocaleController.php:437 msgid "Author" -msgstr "Auteur·ice" +msgstr "Auteur" #: application/controllers/LocaleController.php:438 #: application/forms/StreamSettingSubForm.php:132 @@ -2473,7 +2488,7 @@ msgstr "Succès de l'importation" #: application/controllers/LocaleController.php:446 msgid "Show _MENU_" -msgstr "Afficher _MENU_" +msgstr "Afficher le _MENU_" #: application/controllers/LocaleController.php:447 msgid "Show _MENU_ entries" @@ -2563,7 +2578,7 @@ msgstr "Préférences des podcasts enregistrées" #: application/controllers/LocaleController.php:467 msgid "Are you sure you want to delete this user?" -msgstr "Êtes-vous sûr·e de vouloir supprimer cet·te utilisateur·ice ?" +msgstr "Êtes-vous sûr de vouloir supprimer cet utilisateur ?" #: application/controllers/LocaleController.php:468 msgid "Can't delete yourself!" @@ -2595,7 +2610,7 @@ msgstr "Bloc intelligent" #: application/controllers/LocaleController.php:475 msgid "Webstream preview" -msgstr "Aperçu du webstream" +msgstr "Aperçu du flux web" #: application/controllers/LocaleController.php:476 msgid "You don't have permission to view the library." @@ -2672,7 +2687,8 @@ msgstr "Il y a un problème avec l'identifiant ou adresse courriel que vous avez #: application/controllers/LoginController.php:222 msgid "Wrong username or password provided. Please try again." -msgstr "Mauvais nom d'utilisateur·ice ou mot de passe fourni. Veuillez essayer à nouveau." +msgstr "" +"Mauvais nom d'utilisateur ou mot de passe fourni. Veuillez essayer à nouveau." #: application/controllers/PlaylistController.php:52 #, php-format @@ -2710,7 +2726,7 @@ msgstr "Préférences mises à jour." #: application/controllers/PreferenceController.php:210 msgid "Stream Setting Updated." -msgstr "Réglages du Flux mis à jour." +msgstr "Réglages du flux mis à jour." #: application/controllers/PreferenceController.php:255 msgid "path should be specified" @@ -2735,7 +2751,7 @@ msgstr "Sélectionner le Curseur" #: application/controllers/ShowbuilderController.php:134 msgid "Remove cursor" -msgstr "Enlever le Curseur" +msgstr "Enlever le curseur" #: application/controllers/ShowbuilderController.php:152 msgid "show does not exist" @@ -2751,11 +2767,11 @@ msgstr "Type de piste mis à jour avec succès !" #: application/controllers/UserController.php:78 msgid "User added successfully!" -msgstr "Utilisateur·ice ajouté avec succès !" +msgstr "Utilisateur ajouté avec succès !" #: application/controllers/UserController.php:80 msgid "User updated successfully!" -msgstr "Utilisateur·ice mis à jour avec succès !" +msgstr "Utilisateur mis à jour avec succès !" #: application/controllers/UserController.php:184 msgid "Settings updated successfully!" @@ -2781,12 +2797,12 @@ msgstr "Valeurs du formulaire non valides." #: application/forms/ShowListenerStat.php:35 #: application/forms/ShowListenerStat.php:65 msgid "Invalid character entered" -msgstr "Caractère Invalide saisi" +msgstr "Caractère invalide saisi" #: application/forms/AddShowAbsoluteRebroadcastDates.php:64 #: application/forms/AddShowRebroadcastDates.php:69 msgid "Day must be specified" -msgstr "Le Jour doit être spécifié" +msgstr "Le jour doit être spécifié" #: application/forms/AddShowAbsoluteRebroadcastDates.php:69 #: application/forms/AddShowRebroadcastDates.php:74 @@ -2812,7 +2828,7 @@ msgstr "Répéter la playlist jusqu'à ce que l'émission soit pleine ?" #: application/forms/AddShowAutoPlaylist.php:42 msgid "Default" -msgstr "" +msgstr "Par défaut" #: application/forms/AddShowAutoPlaylist.php:42 #: application/models/Library.php:36 application/models/Library.php:57 @@ -2821,11 +2837,11 @@ msgstr "Vide" #: application/forms/AddShowAutoPlaylist.php:45 msgid "Select Intro Playlist" -msgstr "" +msgstr "Sélectionner la playlist Intro" #: application/forms/AddShowAutoPlaylist.php:52 msgid "Select Outro Playlist" -msgstr "" +msgstr "Sélectionner la playlist Outro" #: application/forms/AddShowLiveStream.php:10 #, php-format @@ -2838,15 +2854,15 @@ msgstr "Utiliser l'authentification personnalisée :" #: application/forms/AddShowLiveStream.php:25 msgid "Custom Username" -msgstr "Nom d'utilisateur·ice personnalisé" +msgstr "Nom d'utilisateur personnalisé" #: application/forms/AddShowLiveStream.php:38 msgid "Custom Password" -msgstr "Mot de Passe personnalisé" +msgstr "Mot de passe personnalisé" #: application/forms/AddShowLiveStream.php:50 msgid "Host:" -msgstr "Hôte :" +msgstr "Hôte :" #: application/forms/AddShowLiveStream.php:56 msgid "Port:" @@ -2858,11 +2874,11 @@ msgstr "Point de Montage :" #: application/forms/AddShowLiveStream.php:80 msgid "Username field cannot be empty." -msgstr "Le champ Nom d'Utilisateur·ice ne peut pas être vide." +msgstr "Le champ nom d'utilisateur ne peut pas être vide." #: application/forms/AddShowLiveStream.php:85 msgid "Password field cannot be empty." -msgstr "Le champ Mot de Passe ne peut être vide." +msgstr "Le champ mot de passe ne peut être vide." #: application/forms/AddShowRR.php:9 msgid "Record from Line In?" @@ -2932,7 +2948,7 @@ msgstr "Sans fin ?" #: application/forms/AddShowRepeats.php:107 msgid "End date must be after start date" -msgstr "La Date de Fin doit être postérieure à la Date de Début" +msgstr "La date de fin doit être postérieure à la Date de Début" #: application/forms/AddShowRepeats.php:116 msgid "Please select a repeat day" @@ -3021,7 +3037,7 @@ msgstr "Vous ne pouvez pas modifier la date / heure de début de l'émission qui #: application/forms/AddShowWhen.php:166 application/models/Show.php:378 msgid "End date/time cannot be in the past" -msgstr "La date/heure de Fin ne peut être dans le passé" +msgstr "La date/heure de fin ne peut être dans le passé" #: application/forms/AddShowWhen.php:174 msgid "Cannot have duration < 0m" @@ -3043,7 +3059,7 @@ msgstr "Ne peut pas programmer des émissions qui se chevauchent" #: application/forms/AddShowWho.php:9 msgid "Search Users:" -msgstr "Recherche d'utilisateur·ice·s :" +msgstr "Recherche d'utilisateurs :" #: application/forms/AddShowWho.php:23 msgid "DJs:" @@ -3073,17 +3089,17 @@ msgstr "Analyser les points d'entrée et de sortie :" #: application/forms/LiveStreamingPreferences.php:40 #: application/forms/Login.php:39 msgid "Username:" -msgstr "Utilisateur·ice :" +msgstr "Utilisateur :" #: application/forms/AddUser.php:36 application/forms/EditUser.php:47 #: application/forms/LiveStreamingPreferences.php:52 #: application/forms/Login.php:53 msgid "Password:" -msgstr "Mot de Passe :" +msgstr "Mot de passe :" #: application/forms/AddUser.php:44 application/forms/EditUser.php:56 msgid "Verify Password:" -msgstr "Vérification du mot de Passe :" +msgstr "Vérification du mot de passe :" #: application/forms/AddUser.php:53 application/forms/EditUser.php:66 msgid "Firstname:" @@ -3111,11 +3127,11 @@ msgstr "Jabber :" #: application/forms/AddUser.php:93 msgid "User Type:" -msgstr "Type d'utilisateur·ice :" +msgstr "Type d'utilisateur :" #: application/forms/AddUser.php:118 application/forms/EditUser.php:143 msgid "Login name is not unique." -msgstr "Le Nom de connexion n'est pas unique." +msgstr "Le nom de d'utilisateur n'est pas unique." #: application/forms/DangerousPreferences.php:12 msgid "Delete All Tracks in Library" @@ -3132,7 +3148,7 @@ msgstr "Titre :" #: application/forms/EditAudioMD.php:62 msgid "Creator:" -msgstr "Créateur·ice :" +msgstr "Artiste :" #: application/forms/EditAudioMD.php:72 msgid "Album:" @@ -3156,19 +3172,19 @@ msgstr "Année :" #: application/forms/EditAudioMD.php:156 msgid "Label:" -msgstr "Étiquette :" +msgstr "Label :" #: application/forms/EditAudioMD.php:166 msgid "Composer:" -msgstr "Compositeur·ice :" +msgstr "Compositeur :" #: application/forms/EditAudioMD.php:176 msgid "Conductor:" -msgstr "Conducteur :" +msgstr "Chef d'orchestre :" #: application/forms/EditAudioMD.php:186 msgid "Mood:" -msgstr "Atmosphère :" +msgstr "Humeur :" #: application/forms/EditAudioMD.php:196 msgid "BPM:" @@ -3274,7 +3290,7 @@ msgstr "Si cette option est activée, un nouveau bloc intelligent et une playlis #: application/forms/GeneralPreferences.php:163 msgid "Trim overbooked shows after autoloading?" -msgstr "" +msgstr "Supprimer les émissions surbookées après le chargement automatique ?" #: application/forms/GeneralPreferences.php:170 msgid "Public LibreTime API" @@ -3294,7 +3310,7 @@ msgstr "" #: application/forms/GeneralPreferences.php:189 msgid "Default Language" -msgstr "Langage par défaut" +msgstr "Langue par défaut" #: application/forms/GeneralPreferences.php:196 #: application/forms/SetupLanguageTimezone.php:22 @@ -3312,6 +3328,8 @@ msgstr "Afficher le bouton de connexion sur votre page radio ?" #: application/forms/GeneralPreferences.php:233 msgid "Disable the public radio page and redirect to the login page?" msgstr "" +"Désactiver la page de la radio pour le public et rediriger directement vers " +"la page de connexion ?" #: application/forms/GeneralPreferences.php:238 msgid "Feature Previews" @@ -3395,7 +3413,7 @@ msgstr "En Lecture" #: application/forms/Player.php:25 msgid "Select Stream:" -msgstr "Sélectionnez un flux :" +msgstr "Sélectionnez un flux :" #: application/forms/Player.php:28 msgid "Auto detect the most appropriate stream to use." @@ -3439,7 +3457,7 @@ msgstr "Privé" #: application/forms/SetupLanguageTimezone.php:17 msgid "Station Language" -msgstr "Langage de la station" +msgstr "Langue de la station" #: application/forms/ShowBuilder.php:75 application/forms/ShowBuilder.php:92 msgid "Filter by Show" @@ -3505,11 +3523,11 @@ msgstr "Aléatoirement" #: application/forms/SmartBlockCriteria.php:46 msgid "Newest" -msgstr "Plus récent" +msgstr "Le plus récent" #: application/forms/SmartBlockCriteria.php:47 msgid "Oldest" -msgstr "Plus vieux" +msgstr "Le plus ancien" #: application/forms/SmartBlockCriteria.php:48 msgid "Most recently played" @@ -3517,9 +3535,10 @@ msgstr "Les plus joués récemment" #: application/forms/SmartBlockCriteria.php:49 msgid "Least recently played" -msgstr "Les moins jouées récemment" +msgstr "Les moins joués récemment" #: application/forms/SmartBlockCriteria.php:60 +#, fuzzy msgid "Select Track Type" msgstr "Sélectionner un type de piste" @@ -3536,6 +3555,7 @@ msgid "Static" msgstr "Statique" #: application/forms/SmartBlockCriteria.php:277 +#, fuzzy msgid "Select track type" msgstr "Sélectionner un type de piste" @@ -3561,7 +3581,7 @@ msgstr "Génération de la liste de lecture et sauvegarde des critères" #: application/forms/SmartBlockCriteria.php:422 msgid "Shuffle playlist content" -msgstr "Contenu de la liste de lecture alèatoire" +msgstr "Contenu de la liste de lecture aléatoire" #: application/forms/SmartBlockCriteria.php:424 msgid "Shuffle" @@ -3653,7 +3673,7 @@ msgstr "Métadonnées Hors Antenne" #: application/forms/StreamSetting.php:43 msgid "Enable Replay Gain" -msgstr "Activer" +msgstr "Activer le Niveau du Gain" #: application/forms/StreamSetting.php:50 msgid "Replay Gain Modifier" @@ -3763,11 +3783,11 @@ msgstr "'%value%' ne correspond pas au format de la date '%format%'" #: application/forms/helpers/ValidationTypes.php:60 msgid "'%value%' is less than %min% characters long" -msgstr "'%value%' est inférieur à %min% charactères" +msgstr "'%value%' est inférieur à %min% caractères" #: application/forms/helpers/ValidationTypes.php:65 msgid "'%value%' is more than %max% characters long" -msgstr "'%value%' est plus grand de %min% charactères" +msgstr "'%value%' est plus grand de %min% caractères" #: application/forms/helpers/ValidationTypes.php:77 msgid "'%value%' is not between '%min%' and '%max%', inclusively" @@ -3837,7 +3857,7 @@ msgstr "Ne peux pas fixer un point de sortie plus petit que le point d'entrée." #: application/models/Criteria.php:148 msgid "Bit Rate (Kbps)" -msgstr "Taux d'échantillonage (Kbps)" +msgstr "Débit (Kbps)" #: application/models/Criteria.php:170 msgid "Sample Rate (kHz)" @@ -3850,7 +3870,7 @@ msgstr "Type de piste" #: application/models/Criteria.php:175 msgid "File Name" -msgstr "" +msgstr "Nom de fichier" #: application/models/Criteria.php:184 msgid "Select criteria" @@ -3898,7 +3918,7 @@ msgstr "Vous ne pouvez pas ajouter des fichiers à des émissions enregistrées. #: application/models/Scheduler.php:157 #, php-format msgid "The show %s is over and cannot be scheduled." -msgstr "L émission %s est terminé et ne peut pas être programmé." +msgstr "L émission %s est terminée et ne peut pas être programmée." #: application/models/Scheduler.php:165 #, php-format @@ -3944,7 +3964,7 @@ msgstr "La durée doit être de la forme \"00h 00m\"" #: application/models/Webstream.php:182 msgid "URL should be of form \"https://example.org\"" -msgstr "URL doit être de la forme \"https://example.org\"" +msgstr "URL doit être de la forme \"https://exemple.org\"" #: application/models/Webstream.php:185 msgid "URL should be 512 characters or less" @@ -3968,7 +3988,7 @@ msgstr "Impossible d'analyser la Sélection PLS" #: application/models/Webstream.php:316 msgid "Could not parse M3U playlist" -msgstr "Impossible d'analyser la Séléction M3U" +msgstr "Impossible d'analyser la Sélection M3U" #: application/models/Webstream.php:329 msgid "Invalid webstream - This appears to be a file download." From 92ca6b0341aaf06848a2721ad6bfd01cee9b0da0 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Wed, 8 Jan 2025 16:53:45 +0000 Subject: [PATCH 2/9] ci: make libretime test user owner of test database (#3130) Fix the legacy tests --- .github/workflows/legacy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/legacy.yml b/.github/workflows/legacy.yml index 7bd3c5ccd..bab3fb5f7 100644 --- a/.github/workflows/legacy.yml +++ b/.github/workflows/legacy.yml @@ -62,6 +62,7 @@ jobs: sudo -u postgres psql -c 'CREATE DATABASE libretime;' sudo -u postgres psql -c "CREATE USER libretime WITH PASSWORD 'libretime';" sudo -u postgres psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;' + sudo -u postgres psql -c 'ALTER DATABASE libretime OWNER TO libretime;' sudo -u postgres psql -c 'ALTER USER libretime CREATEDB;' - name: Setup PHP From b1bdd6d9bee3a545e7f65e39ffbf2fa84f241b11 Mon Sep 17 00:00:00 2001 From: Keoni Mahelona Date: Thu, 9 Jan 2025 05:54:53 +1300 Subject: [PATCH 3/9] feat(api): added filters on genre & md5 for files api (#3127) ### Description Added filters for genre and md5 to the files API, e.g. `/api/v2/files?genre=soul` **This is a new feature**: Yes **I have updated the documentation to reflect these changes**: No There should be a schema and docs that are generated automatically. I don't know where that is. ### Testing Notes **What I did:** - Used docker to deploy locally - Confirmed filters work at http://localhost:8080/api/v2/files?genre=Soul **How you can replicate my testing:** - `make clean dev` - Upload some files! - Visit http://localhost:8080/api/v2/files - You can use the filters Screenshot 2024-12-23 at 01 36 01 Screenshot 2024-12-23 at 01 35 56 _How can the reviewer validate this PR?_ - See above - wrote tests to confirm filters work --- .../storage/tests/views/test_file.py | 33 +++++++++++++++++++ api/libretime_api/storage/views/file.py | 3 ++ api/schema.yml | 9 +++++ 3 files changed, 45 insertions(+) diff --git a/api/libretime_api/storage/tests/views/test_file.py b/api/libretime_api/storage/tests/views/test_file.py index ebe99f8f8..4a62c9801 100644 --- a/api/libretime_api/storage/tests/views/test_file.py +++ b/api/libretime_api/storage/tests/views/test_file.py @@ -61,3 +61,36 @@ class TestFileViewSet(APITestCase): file_id = "1" response = self.client.delete(f"/api/v2/files/{file_id}") self.assertEqual(response.status_code, 404) + + def test_filters(self): + file = baker.make( + "storage.File", + mime="audio/mp3", + filepath=AUDIO_FILENAME, + genre="Soul", + md5="5a11ffe0e6c6d70fcdbad1b734be6482", + ) + baker.make( + "storage.File", + mime="audio/mp3", + filepath=AUDIO_FILENAME, + genre="R&B", + md5="5a11ffe0e6c6d70fcdbad1b734be6483", + ) + self.client.credentials(HTTP_AUTHORIZATION=f"Api-Key {self.token}") + + path = "/api/v2/files" + results = self.client.get(path).json() + self.assertEqual(len(results), 2) + + path = f"/api/v2/files?md5={file.md5}" + results = self.client.get(path).json() + self.assertEqual(len(results), 1) + + path = "/api/v2/files?genre=Soul" + results = self.client.get(path).json() + self.assertEqual(len(results), 1) + + path = "/api/v2/files?genre=R%26B" + results = self.client.get(path).json() + self.assertEqual(len(results), 1) diff --git a/api/libretime_api/storage/views/file.py b/api/libretime_api/storage/views/file.py index 8565fbbc0..35176d4ba 100644 --- a/api/libretime_api/storage/views/file.py +++ b/api/libretime_api/storage/views/file.py @@ -5,6 +5,7 @@ from os import remove from django.conf import settings from django.http import HttpResponse from django.utils.encoding import filepath_to_uri +from django_filters import rest_framework as filters from rest_framework import status, viewsets from rest_framework.decorators import action from rest_framework.exceptions import APIException @@ -26,6 +27,8 @@ class FileViewSet(viewsets.ModelViewSet): queryset = File.objects.all() serializer_class = FileSerializer model_permission_name = "file" + filter_backends = (filters.DjangoFilterBackend,) + filterset_fields = ("md5", "genre") # pylint: disable=invalid-name,unused-argument @action(detail=True, methods=["GET"]) diff --git a/api/schema.yml b/api/schema.yml index 9962bf882..07ffd06fe 100644 --- a/api/schema.yml +++ b/api/schema.yml @@ -154,6 +154,15 @@ paths: /api/v2/files: get: operationId: files_list + parameters: + - in: query + name: genre + schema: + type: string + - in: query + name: md5 + schema: + type: string tags: - files security: From 267da9e4381c68437568096a59017f2b858d5659 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Thu, 9 Jan 2025 07:53:49 +0000 Subject: [PATCH 4/9] chore: add pre-commit API check (#3120) ### Description This is a way of ensuring the schema is up to date with every change. This should be extended by fixing the PR api schema pipeline to squash down all PR commits into a single change and checking the API schema for that. Otherwise people will fix the schema after a failed pipeline and the pipeline will continue to fail --- .pre-commit-config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 37760d99d..f7a7abd26 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -110,3 +110,11 @@ repos: pass_filenames: false language: script files: ^legacy + + - id: api-schema-update + name: api-schema-update + description: Ensure API schema is up to date + entry: make -C api schema + pass_filenames: false + language: system + files: ^api From 644d2b9ce51321b8219a9902b8bfcac8b9443506 Mon Sep 17 00:00:00 2001 From: Scott McGrath Date: Thu, 9 Jan 2025 03:34:13 -0500 Subject: [PATCH 5/9] fix(legacy): additional specifics added to CSVexport.js for RFC 4180 (#3131) ### Description The existing implementation for exporting playout logs to a CSV file incorporates a very simplified CSV format. Some aspects of the complete [RFC](https://www.rfc-editor.org/rfc/rfc4180) are missing, such as escaping of quotes, and quoting of fields that contain certain characters. This is problematic for common office spreadsheet tools, and practically, anything else. Many radio stations rely on this functionality to work well for exporting playout data, for example, in order to compile data for reporting requirements. **This is a new feature**: The changes in this PR add quoting of fields containing a comma, as well as those containing a CR/LF. It also escapes quotes by doubling them. I'm not sure it makes CSVexport.js completely RFC 4180 compliant, but it is much closer than it was. **I have updated the documentation to reflect these changes**: I don't think there are any documentation changes necessary; this is probably expected behavior for anyone trying to use the CSV exporter. ### Testing Notes **What I did:** To validate this, I did a clean install of Debian, cloned from the official libretime repo, and applied the code as a patch to the installer. I then proceeded with the install and then loaded a database from a running system (so that I had some playout data to test with). I then performed the playout history export and examined the resulting CSV file and after seeing previously problematic fields properly quoted, was convinced it looked the way I expected. I loaded the csv file into Libreoffice Calc and did not see any errors. **How you can replicate my testing:** See "What I did" above, basically run the patch after cloning the installer from the repo. You could also apply the changes to a running system by applying the patch to the file: /usr/share/libretime/legacy/public/js/libs/CSVexport.js Be sure to clear your browser cache and do a hard reload of the web interface, before re-testing. ### **Links** Closes: #2477 --- legacy/application/assets.json | 2 +- legacy/public/js/libs/CSVexport.js | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/legacy/application/assets.json b/legacy/application/assets.json index 6968c6759..96ffb6af7 100644 --- a/legacy/application/assets.json +++ b/legacy/application/assets.json @@ -122,7 +122,7 @@ "js/jplayer/skin/jplayer.airtime.audio.preview.css": "c721fe0587569391dcfa7d0f7b440d2b", "js/jplayer/skin/jplayer.audio-preview.blue.monday.css": "8565bf8e077eeb5bbba3c88bed42a590", "js/jplayer/skin/jplayer.blue.monday.css": "491c7a82ae4571ae4a73645bf9755eaf", - "js/libs/CSVexport.js": "07a91f824f41d2d0d1884b5dd10f63e4", + "js/libs/CSVexport.js": "42c1fcfff5c717482f21bff1a9002295", "js/libs/angular.min.js": "26680517e1024ca2c4f9ed4e0aa1619e", "js/libs/dayjs.min.js": "bea3f1180a3e2e45eccf9d76f990f3b4", "js/libs/dropzone.min.js": "f59ac59a89d9c569a27ca7ead38d2396", diff --git a/legacy/public/js/libs/CSVexport.js b/legacy/public/js/libs/CSVexport.js index bb246a767..ea60ee3b9 100644 --- a/legacy/public/js/libs/CSVexport.js +++ b/legacy/public/js/libs/CSVexport.js @@ -17,21 +17,29 @@ Compress with: http://jscompress.com/ csvEncoding = 'data:text/csv;charset=utf-8,', csvOutput = "", csvRows = [], - BREAK = '\r\n', + BREAK = '\r\n', // Use CRLF for line breaks DELIMITER = ',', - FILENAME = "export.csv"; + FILENAME = "export.csv"; // Get and Write the headers csvHeaders = Object.keys(csvData[0]); - csvOutput += csvHeaders.join(',') + BREAK; + csvOutput += csvHeaders.join(DELIMITER) + BREAK; for (var i = 0; i < csvData.length; i++) { - var rowElements = []; - for(var k = 0; k < csvHeaders.length; k++) { - rowElements.push(csvData[i][csvHeaders[k]]); - } // Write the row array based on the headers - csvRows.push(rowElements.join(DELIMITER)); - } + var rowElements = []; + for (var k = 0; k < csvHeaders.length; k++) { + var cell = csvData[i][csvHeaders[k]]; + if (typeof cell === 'string') { + if (cell.includes('"')) { + cell = '"' + cell.replace(/"/g, '""') + '"'; // Escape double quotes by doubling them + } else if (cell.includes(DELIMITER) || cell.includes('\r') || cell.includes('\n')) { + cell = '"' + cell + '"'; // Enclose in double quotes if it contains commas, CR, or LF + } + } + rowElements.push(cell); + } // Write the row array based on the headers + csvRows.push(rowElements.join(DELIMITER)); + } csvOutput += csvRows.join(BREAK); From 6f5275176e6ae08593c729e5e53bf3c7b2127aa6 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Thu, 9 Jan 2025 16:09:28 +0000 Subject: [PATCH 6/9] chore: update docker compose commands (#3132) ### Description Upstream has renamed docker-compose to docker compose for all commands **This is a new feature**: _Do the changes in this PR implement a new feature?_ **I have updated the documentation to reflect these changes**: Yes --- Makefile | 8 ++++---- docs/contributor-manual/development-environment.md | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index c06367a7c..c1a670d1c 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,10 @@ dev-certs: cat dev/certs/fake.{key,crt} > dev/certs/fake.pem dev: .env dev-certs - DOCKER_BUILDKIT=1 docker-compose build - docker-compose run --rm legacy make build - docker-compose run --rm api libretime-api migrate - docker-compose up -d + DOCKER_BUILDKIT=1 docker compose build + docker compose run --rm legacy make build + docker compose run --rm api libretime-api migrate + docker compose up -d .PHONY: VERSION VERSION: diff --git a/docs/contributor-manual/development-environment.md b/docs/contributor-manual/development-environment.md index 301cb4fa3..e9889fb15 100644 --- a/docs/contributor-manual/development-environment.md +++ b/docs/contributor-manual/development-environment.md @@ -14,16 +14,16 @@ To setup a docker-compose development environment, run the following commands: # Clean and build make clean cp .env.dev .env -DOCKER_BUILDKIT=1 docker-compose build +DOCKER_BUILDKIT=1 docker compose build # Setup make dev-certs -docker-compose run --rm legacy make build -docker-compose run --rm api libretime-api migrate +docker compose run --rm legacy make build +docker compose run --rm api libretime-api migrate # Run -docker-compose up -d -docker-compose logs -f +docker compose up -d +docker compose logs -f ``` :::info @@ -33,7 +33,7 @@ You may also use the following `make clean dev` shortcut: ```bash make clean dev -docker-compose logs -f +docker compose logs -f ``` ::: From 203c9275540289fa670b4e9ec62f41e5ea27e4fa Mon Sep 17 00:00:00 2001 From: nosbig Date: Fri, 10 Jan 2025 10:46:18 -0500 Subject: [PATCH 7/9] feat: add flac support to Web player (#3128) ### Description Added support for previewing FLAC files in the web interface, provided in #509 by marmotte32 on Github in the comments for this issue. I have tested this against a script-installed copy of 4.2.0, and FLAC preview is working, although auto-play isn't. I haven't tested to confirm if this behavior matches MP3 and OGG uploads. **This is a new feature**: _Do the changes in this PR implement a new feature?_ **I have updated the documentation to reflect these changes**: No changes needed; this bug is a missing file format in preview, and it requires no updates to the documentation. ### Testing Notes **What I did:** I installed a LibreTime 4.2.0 system using the default installation script against a fully-updated, brand new Debian 11 system. I logged into the web interface, uploaded some FLAC files, and attempted to preview them. They failed to preview. I then replaced the preview_jplayer.js file with the contents in this PR and then refreshed the page. I was able to preview the FLAC files and hear the results in my local browser audio output. **How you can replicate my testing:** Perform the same steps above, or replace the same file in the libretime_legacy_1 docker image to see the same results. ### **Links** Closes: #509 --------- Co-authored-by: Kyle Robbertze --- legacy/application/assets.json | 2 +- .../js/airtime/audiopreview/preview_jplayer.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/legacy/application/assets.json b/legacy/application/assets.json index 96ffb6af7..8f2535191 100644 --- a/legacy/application/assets.json +++ b/legacy/application/assets.json @@ -49,7 +49,7 @@ "css/users.css": "94c94817a8505ff4dfcd090987859a7e", "css/waveform.css": "4ce429708933e6da1a2f3bdb2a01db52", "js/airtime/airtime_bootstrap.js": "9575982385f6c74e2b4ec61e30214a7c", - "js/airtime/audiopreview/preview_jplayer.js": "133b4b9a3436716a8367d353f1658da3", + "js/airtime/audiopreview/preview_jplayer.js": "d3402345279a9f4b86b381bae87d6de8", "js/airtime/buttons/buttons.js": "1a984b1e01262816c899c5fa3f12e3cd", "js/airtime/common/audioplaytest.js": "93737dabc4cce4fcdcc6d54acf86d16d", "js/airtime/common/common.js": "8c0675f5a1c8d95323b2f3983c658f62", diff --git a/legacy/public/js/airtime/audiopreview/preview_jplayer.js b/legacy/public/js/airtime/audiopreview/preview_jplayer.js index 1cc60d0f8..d48715936 100644 --- a/legacy/public/js/airtime/audiopreview/preview_jplayer.js +++ b/legacy/public/js/airtime/audiopreview/preview_jplayer.js @@ -27,7 +27,7 @@ $(document).ready(function () { [], //array of songs will be filled with below's json call { swfPath: baseUrl + "js/jplayer", - supplied: "oga, mp3, m4v, m4a, wav", + supplied: "oga, mp3, m4v, m4a, wav, flac", size: { width: "0px", height: "0px", @@ -161,6 +161,12 @@ function buildplaylist(p_url, p_playIndex) { artist: data[index]["element_artist"], wav: data[index]["uri"], }; + } else if (data[index]["element_flac"] != undefined) { + media = { + title: data[index]["element_title"], + artist: data[index]["element_artist"], + flac: data[index]["uri"], + }; } else { // skip this track since it's not supported console.log("continue"); @@ -177,6 +183,8 @@ function buildplaylist(p_url, p_playIndex) { key = "m4a"; } else if (mime.search(/wav/i) > 0) { key = "wav"; + } else if (mime.search(/flac/i) > 0) { + key = "flac"; } if (key) { @@ -243,6 +251,8 @@ function playOne(uri, mime) { key = "m4a"; } else if (mime.search(/wav/i) > 0) { key = "wav"; + } else if (mime.search(/flac/i) > 0) { + key = "flac"; } if (key) { From a14f1bec0b3254e650d35e8792272f8955ded143 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Fri, 10 Jan 2025 16:56:39 +0000 Subject: [PATCH 8/9] ci: only check last commit for API schema in PRs (#3133) ### Description PRs are intended to be squashed to a single commit. Only checking the last commit gives us the intended state of the repo and ensures that if the author commits the schema fixes later, the CI passes as expected. Currently, the CI will fail because the earlier commits still have an out of date schema. --- .github/workflows/api-schema.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-schema.yml b/.github/workflows/api-schema.yml index a2519a65f..d79f1fd7d 100644 --- a/.github/workflows/api-schema.yml +++ b/.github/workflows/api-schema.yml @@ -42,7 +42,7 @@ jobs: - name: Get pull request commit range if: github.event_name == 'pull_request' - run: echo "COMMIT_RANGE=origin/${{ github.base_ref }}..${{ github.sha }}" >> $GITHUB_ENV + run: echo "COMMIT_RANGE=${{ github.sha }}~1...${{ github.sha }}" >> $GITHUB_ENV - name: Get push commit range if: github.event_name == 'push' From 5b4c720e10037e39b3405d6a55eb835a60e339a2 Mon Sep 17 00:00:00 2001 From: Scott McGrath Date: Fri, 17 Jan 2025 18:11:02 -0500 Subject: [PATCH 9/9] fix(playout): improve the way hashlib is called in libretime_playout/player (#3135) ### Description Improves the way hashlib is called in libretime_playout/player so that is isn't broken on systems with python < 3.9 The way it is currently called in site-packages/libretime_playout/player/file.py, in the section where scheduled files are copied to the cache dir for playout, specifies the usedforsecurity=False flag as follows: `hasher = hashlib.md5(usedforsecurity=False)` hashlib.md5 did not support this flag until Python 3.9. Attempting to specify the flag directly as an argument to hashlib.md5(), in an older python environment (such as that in Ubuntu Focal 20.04), is unsafe, and can cause hashlib.md5() to balk/throw an exception, which results in file copy operations failing. This then precipitates into playout problems, as scheduled media is missing from the cache folder. This PR instead calls using hashlib.new(), and passes the argument to that, as follows: `hasher = hashlib.new('md5', usedforsecurity=False)` This method of calling with the flag argument is safer, because the constructor will take it or leave it gracefully, regardless of whether the system has a version of hashlib that supports the `usedforsecurity` flag. AFAICT, it improves (fixes) function on older systems without negatively impacting others. ### Testing Notes **What I did:** Before applying this patch, we were experiencing occasional but fairly regular periods of silence when the system was supposed to be playing a song or track. This behavior was consistent with errors such as the following being present in the playout log: ``` 2025-01-15 14:01:28,331 | INFO | libretime_playout.player.file:copy_file:47 - copying file 19834 to cache /var/lib/libretime/playout/scheduler/19834.mp3 2025-01-15 14:01:28,466 | ERROR | libretime_playout.player.file:copy_file:77 - could not copy file 19834 to /var/lib/libretime/playout/scheduler/19834.mp3: 'usedforsecurity' is an invalid keyword argument for openssl_md5() Traceback (most recent call last): File "/opt/libretime/lib/python3.8/site-packages/libretime_playout/player/file.py", line 70, in copy_file file_event.filesize = self.report_file_size_and_md5_to_api( File "/opt/libretime/lib/python3.8/site-packages/libretime_playout/player/file.py", line 89, in report_file_size_and_md5_to_api hasher = hashlib.md5(usedforsecurity=False) TypeError: 'usedforsecurity' is an invalid keyword argument for openssl_md5() ``` _For more information about the characterization and results of this problem, see issue #3134_ **Testing on running systems** After the patch was applied, these errors were no longer seen. I first tested this on a dev server, and then on a live server, with approximately 100 distinct tracks of playout occurring over about 24 hours. There were no file copy failures, and no related playout problems, which was a major and immediate improvement. **Testing installer, fresh installs** ***Ubuntu 20.04*** I deployed a patch to the installer and installed it on a blank system running Ubuntu 20.04 and tested it to make sure the fix was applied and worked. ***Debian 11*** I deployed patch to the installer and installed it on a blank system running Debian Bullseye (which runs python = 3.9) , and tested it there to make sure it did not break anything or introduce a regression. ### **Links** Closes: #3134 --- playout/libretime_playout/player/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playout/libretime_playout/player/file.py b/playout/libretime_playout/player/file.py index c947289c5..5223d0880 100644 --- a/playout/libretime_playout/player/file.py +++ b/playout/libretime_playout/player/file.py @@ -86,7 +86,7 @@ class PypoFile(Thread): file_size = os.path.getsize(file_path) with open(file_path, "rb") as file_fd: - hasher = hashlib.md5(usedforsecurity=False) + hasher = hashlib.new("md5", usedforsecurity=False) while True: data = file_fd.read(8192) if not data: