
Recherche avancée
Médias (91)
-
DJ Z-trip - Victory Lap : The Obama Mix Pt. 2
15 septembre 2011
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (49)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (7958)
-
voice_client.play doesn't continue loop (Discord) (Solved)
19 mars 2023, par RazurioSOLVED see end


songs = asyncio.Queue(maxsize=0)
currently_playing = False


@client.command()
async def play(ctx, url):
 global songs
 global currently_playing
 if currently_playing:
 with yt_dlp.YoutubeDL({"format": "bestaudio", "outtmpl": "Queue_Download/%(title)s.%(ext)s"}) as ydl:
 info = ydl.extract_info(url, download=True)
 filename = ydl.prepare_filename(info)
 await songs.put({"file": filename, "info": video_info(url)})
 # print("test 1")
 else:
 with yt_dlp.YoutubeDL({"format": "bestaudio", "outtmpl": "Queue_Download/%(title)s.%(ext)s"}) as ydl:
 info = ydl.extract_info(url, download=True)
 filename = ydl.prepare_filename(info)
 await songs.put({"file": filename, "info": video_info(url)})
 # print("test 2")
 asyncio.create_task(queue(ctx))



async def queue(ctx):
 global songs
 global currently_playing
 currently_playing = True
 while True:
 if songs.empty():
 currently_playing = False
 await ctx.reply("Queue is now empty")
 await ctx.voice_client.disconnect() # disconnect from voice channel when queue is empty
 break
 else: 
 song = await songs.get()
 filename = song["file"]
 voice_channel = ctx.author.voice.channel
 if not ctx.voice_client: # check if bot is not already connected to a voice channel
 await voice_channel.connect()

 await ctx.reply('playing')
 await ctx.voice_client.play(discord.FFmpegPCMAudio(filename))

@client.command()
async def stop(ctx):
 global songs
 await ctx.voice_client.disconnect()
 await empty_queue(songs)
 await ctx.reply('Stopped')

async def empty_queue(songs):
 while not songs.empty():
 songs.get_nowait()



I have problems with the "await ctx.voice_client.play(discord.FFmpegPCMAudio(filename))" which doesn't continue after finishing.


I know you can use a after= parameter in voice_client.play() but I didn't manage to get it to work to recursivly call queue()


async def play_next(ctx):
global songs
global currently_playing
if songs.empty():
 currently_playing = False
 await ctx.reply("Queue is now empty")
 await ctx.voice_client.disconnect() # disconnect from voice channel when queue is empty
else: 
 song = await songs.get()
 filename = song["file"]
 voice_channel = ctx.author.voice.channel
 if not ctx.voice_client: # check if bot is not already connected to a voice channel
 await voice_channel.connect()

 def after(error):
 if error:
 print(f'Error in after callback: {error}')
 asyncio.create_task(play_next(ctx))

 await ctx.reply('playing')
 ctx.voice_client.play(discord.FFmpegPCMAudio(filename), after=after)



I tried using the after parameter like like but I just get an error in line 116, in after asyncio.create_task(play_next(ctx)) "no running event loop" ... "Calling the after function failed"


EDIT


async def play_next(ctx):
global loop
global songs
global currently_playing
global tasks
loop = asyncio.get_event_loop()
if songs.empty():
 currently_playing = False
 await ctx.reply("Queue is now empty")
 await ctx.voice_client.disconnect() # disconnect from voice channel when queue is empty
else:
 
 song = await songs.get()
 filename = song["file"]
 voice_channel = ctx.author.voice.channel
 if not ctx.voice_client: # check if bot is not already connected to a voice channel
 await voice_channel.connect()
 def after(error):
 if error:
 print("er")
 loop.create_task(queue(ctx))

 await ctx.reply('playing')
 ctx.voice_client.play(discord.FFmpegPCMAudio(filename), after=after)



using loop = asyncio.get_event_loop() and loop.create_task(queue(ctx)) made it finally work
took inspiration from this post


-
Evolution #4170 : Visibilité icônes des auteurs
1er septembre 2018, par nico d_Ça serait mieux dans un style plus flat oui, plus lisible.
Mais du coup ça risque de trancher avec le style des autres icônes fatcow.
(en fait c’est probablement tout le jeu d’icônes qu’il faudrait reprendre, mais bon...)En tout cas je serai partisan d’un retour à une icône plus générique, non genrée et neutre.
Des pistes : https://thenounproject.com/search/?q=userTant qu’on est sur le sujet, un truc qui manque aussi c’est la distinction admin / admin restreint, qui sont représentés par la même icône mais qui n’ont pas du tout les mêmes droits (gestion des plugins, config...)
-
avfilter/af_acrossover : improve filter output
14 avril 2019, par Paul B Mahol