
Recherche avancée
Autres articles (55)
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Les sons
15 mai 2013, par
Sur d’autres sites (11064)
-
discord music bot downloads all videos on a webpage instead of just one
11 janvier 2021, par IdotEXEWhen I try and run this code with any given youtube URL, it will usually say : "Downloading video 1 of 25", and then obviously times out. Downloading the videos as an mp3 file does work, but obviously, I don't need 25 mp3 files whenever I'm only trying to play one video as audio. Anyone got any ideas as to why this happens ?


@bot.command()
async def play(ctx, url : str):
 song_there = os.path.isfile("song.mp3")
 try:
 if not os.path.exists("song.mp3"):
 os.remove("song.mp3")
 except PermissionError:
 await ctx.send("Wait for the current music to end / use stop command")
 return

 voiceChannel = ctx.message.author.voice.channel

 await voiceChannel.connect()
 voice = discord.utils.get(bot.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.FFmpegAudio("song.mp3"))

@bot.command()
async def leave(ctx):
 voice = discord.utils.get(bot.voice_clients, guild= ctx.guild)
 if voice.is_connected():
 await voice.disconnect()
 else:
 await ctx.send("The bot is not connected to a voice channel")

@bot.command()
async def pause(ctx):
 voice = discord.utils.get(bot.voice_clients, guild= ctx.guild)
 if voice.is_playing():
 voice.pause()
 else:
 await ctx.send("Currently no audio is playing")

@bot.command()
async def resume(ctx):
 voice = discord.utils.get(bot.voice_clients, guild= ctx.guild)
 if voice.is_paused():
 voice.resume()
 else:
 await ctx.send("The audio is not currently paused")

@bot.command()
async def stop(ctx):
 voice = discord.utils.get(bot.voice_clients, guild=ctx.guild)
 voice.stop()



-
tests/fate/hevc : Use a bitexact scaler in the hevc param change test to avoid failing...
3 avril 2015, par Michael Niedermayer -
cabac : x86 : Give optimizations header a more meaningful name
9 mars 2016, par Diego Biurrun