Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (84)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (4907)

  • Some download errors in my discrod musicbot

    24 avril 2021, par takugrano

    I am making my music bot for discord
but i am having some problem with uploading videos

    


     @client.command()
async def play(ctx, url : str):
    song_there=os.path.isfile("song.mp3")
    try:
        if song_there:
            os.remove("song.mp3")
    except PermissionError:
        await   ctx.send("music is playing right now, use !stop command")
        return
    voiceChannel=discord.utils.get(ctx.guild.voice_channels,name='General')
    await voiceChannel.connect()
    voice=discord.utils.get(client.voice_clients,guild=ctx.guild)



    ydl_opts={
        'format':'bestaudio/best',
        'postprocessors':[{
                  'key':'FFmpegExtractAudio',
                  'preferredcodec':'mp3',
                  'preferredquality': '192',
              }],
    }
    with youtube_dl.YoutubeDL(ydl_opts)as ydl:
        ydl.download([url])
    for file in os.listdir("./"):
        if file.endswith(".mp3"):
            os.rename(file,"song.mp3")
    voice.play(discord.FFmpegPCMAudio("song.mp3"))


    


    in my programm I have more code but it is not that important.
After compile i have this :

    


    [youtube] 5RGaoLpBASw: Downloading webpage
[download] Destination: F1 Tokyo Drift-5RGaoLpBASw.m4a
[download] 100% of 1.11MiB in 00:00                  
[ffmpeg] Correcting container in "F1 Tokyo Drift-5RGaoLpBASw.m4a"
    ERROR: 
    Ignoring exception in command play:


    


    and this :

    


    raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError


    


    and this :

    


    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: 


    


    and finally this :

    


    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: DownloadError: ERROR: 


    


    but on my discord server nothing but connecting the bot to the channel happens
however, a file with the .m4a extension appears in the programm directory, which I need to play.

    


    how can i fix these errors ?

    


  • Shades of black

    14 février 2011, par Mans — Random ramblings

    Some time ago now, I was looking for a new laptop. Having compared the technical specifications of a number of models, I turned my attention to the most important aspect : the colour. Everybody knows black is the best colour, but which particular shade of black ? There are, apparently, quite a … Continue reading

  • Révision 23678 : Bugfix dans recup_date() quand on lui passe une chaîne du type 2017-07

    20 juillet 2017, par brunobergot@gmail.com

    Sous PHP 5.5.38-1 le test `substr($jour, 0, 1) == ’0’` renvoie true quand `$jour = ’’` ce qui fait renvoyer un valeur false pour le jour au lieu d’une chaîne vide.
    r23409 ayant modifié affdate_base(), ce cas ne passait plus par `strtotime($numdate)` mais par `mktime($heures, $minutes, $secondes, $mois, $jour, $annee)` qui génère un timestamp décalé d’un jour en arrière.
    On obtenait donc 06 au lieu de 07 pour `[(#VAL2017-07|affdatem)]`

    pfiou :p