
Recherche avancée
Autres articles (45)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
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 (...)
Sur d’autres sites (9384)
-
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


-
Seekbar Issue for FFMPEG ?
12 décembre 2014, par Ramesh KaranamI implemented FFMPEG library for one of my application in android. It is working fine for most of the songs.
For few songs when i scroll the song duration...then at that time the current song duration not showing exact duration.
I unable to find out the issue whether it is w.r.t to particular song or different bit rate songs so on ?....
Here my code for Seekar progress..
int ret = av_seek_frame(fmt_ctx, seekStreamIndex, seekTime,flags);
Please suggest me a better solution.
-
Revision 19a9bff5c4c0e4c519df49f0919b621906900494 : lorsqu’une table est finie et vide, comme -0==0 on met ’vide’. Il faut ...
18 septembre 2010, par Cerdic — Loglorsqu’une table est finie et vide, comme -0==0 on met ’vide’. Il faut ajouter du coup quelques is_numeric() pour ce cas particulier. Permet d’avoir un nombre fiable avec un intval() git-svn-id : svn ://trac.rezo.net/spip/spip@16204 (...)