
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (110)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...)
Sur d’autres sites (4083)
-
Why does this ffmpeg,exe window keep opening when I run my command ?
5 avril 2020, par JohnI'm making a discord bot and for this aspect of the bot, I wanted it to play music in the voice channel. Here is my code for it :



@client.command(pass_context=True)
async def play(ctx, url: str):

 song_there = os.path.isfile("song.mp3")
 try:
 if song_there:
 os.remove("song.mp3")
 print("Removed old song file")
 except PermissionError:

 await ctx.send("`There's already a song playing, request your song after!`")
 return

 await ctx.send("`Getting your song ready...`")

 voice = 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:
 try:
 print("Downloading audio now\n")
 ydl.download([url])
 except:
 await ctx.send("`Error, that was not a valid url.`")
 return

 for file in os.listdir("./"):
 if file.endswith(".mp3"):
 name = file
 os.rename(file, "song.mp3")

 voice.play(discord.FFmpegPCMAudio("song.mp3"), after=lambda e: print("Song done!"))
 await ctx.send("`Everything went well. Enjoy!`")
 voice.source = discord.PCMVolumeTransformer(voice.source)
 voice.source.volume = 0.07

 nname = name.rsplit("-", 2)
 await ctx.send(f"`Playing: {nname[0]}`")
 print("playing\n")




I got most of it from online sources to be honest. However, whenever someone plays a song, this pops up throughout the song download process. It can be seen here : https://imgur.com/a/iRr0qwj



I don't mind them coming up, but when they do, they override all of my other tabs and pop up so they're the main screen. I'd like for them to pop up in the background, if I can't remove them fully. Can anyone help ? This would be pretty unpractical for me for when multiple use the function, and I can't use my computer anymore (as of now the bot is ran on my computer) without constantly minimizing that screen.



I'm using windows 10, Python 3.7


-
Discord.py Musicbot Skip Command PermissionError
28 mai 2021, par VentiorSo as my first "major" project after starting to program, I've decided to make a Discord Bot. The problem here is my "skip" command. Somehow it works but I can't understand how.


def play_next(ctx):
if len(songs_list) >= 2:
 print(songs_list,"before del")
 del songs_list[0]
 print(songs_list[0], "new song")

 
 try:
 if os.path.isfile("song.mp3"):
 os.remove("song.mp3")
 except PermissionError:
 print("permissionerror")
 with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 ydl.download([songs_list[0]])
 for file in os.listdir("./"):
 if file.endswith(".mp3"):
 os.rename(file, "song.mp3")
 voice.play(discord.FFmpegPCMAudio("song.mp3"), after=lambda e: play_next(ctx))
 voice.isplaying()



And the skip command :


@client.command(pass_context=True)
async def skip(ctx):
voice.stop()
voice.skip()
try:
 os.remove("song.mp3")
except:
 pass
play_next(ctx)



I know it isn't the best way of handling that, but I am just beginning to code and this is how I got it to work.
In the skip command, when I didn't use voice.skip() I would have gotten a PermissionError printed out in the console.


With it included, I instead get the message "VoiceClient" object has no attribute "skip", but everything works in order so far. Can someone explain why ?
I mean if skip doesn't exist, then why does it work ? And how does it bypass the PermissionError ?


-
avfilter/vf_stereo3d : add fast path for interleave rows to alternating
18 décembre 2015, par Paul B Mahol