Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (53)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (7871)

  • lavfi/opencl : add more opencl helper macro

    12 avril 2019, par Ruiling Song
    lavfi/opencl : add more opencl helper macro
    

    Signed-off-by : Ruiling Song <ruiling.song@intel.com>

    • [DH] libavfilter/opencl.h
  • doc/filters : add document for opencl filters

    29 octobre 2018, par Ruiling Song
    doc/filters : add document for opencl filters
    

    Signed-off-by : Danil Iashchenko <danyaschenko@gmail.com>
    Signed-off-by : Ruiling Song <ruiling.song@intel.com>
    Signed-off-by : Gyan Doshi <gyandoshi@gmail.com>

    • [DH] doc/filters.texi
  • How can I make my loop command for a pythin discord bot work ?

    17 octobre 2022, par Dio

    so I am kinda new to python and wanted to make a discord music bot. It works pretty well, except that I am not able to figure out how to code the queue loop command and the playing now command(this one gives me a full link instead of just the name). I have bolded the 2 commands that I cannot figure out.

    &#xA;

       from ast import alias&#xA;import discord&#xA;from discord.ext import commands&#xA;&#xA;from youtube_dl import YoutubeDL&#xA;&#xA;class music_cog(commands.Cog):&#xA;    def __init__(self, bot):&#xA;        self.bot = bot&#xA;    &#xA;        #all the music related stuff&#xA;        self.is_playing = False&#xA;        self.is_paused = False&#xA;        self.is_loop = False&#xA;        self.now_playing =""&#xA;        # 2d array containing [song, channel]&#xA;        self.music_queue = []&#xA;        self.YDL_OPTIONS = {&#x27;format&#x27;: &#x27;bestaudio&#x27;, &#x27;noplaylist&#x27;:&#x27;True&#x27;}&#xA;        self.FFMPEG_OPTIONS = {&#x27;before_options&#x27;: &#x27;-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5&#x27;, &#x27;options&#x27;: &#x27;-vn&#x27;}&#xA;&#xA;        self.vc = None&#xA;&#xA;     #searching the item on youtube&#xA;    def search_yt(self, item):&#xA;        with YoutubeDL(self.YDL_OPTIONS) as ydl:&#xA;            try: &#xA;                info = ydl.extract_info("ytsearch:%s" % item, download=False)[&#x27;entries&#x27;][0]&#xA;            except Exception: &#xA;                return False&#xA;&#xA;        return {&#x27;source&#x27;: info[&#x27;formats&#x27;][0][&#x27;url&#x27;], &#x27;title&#x27;: info[&#x27;title&#x27;]}&#xA;&#xA;    def play_next(self):&#xA;        if len(self.music_queue) > 0:&#xA;            self.is_playing = True&#xA;&#xA;            #get the first url&#xA;            m_url = self.music_queue[0][0][&#x27;source&#x27;]&#xA;            self.now_playing =  self.music_queue[0][0][&#x27;title&#x27;]&#xA;            #remove the first element as you are currently playing it&#xA;            self.music_queue.pop(0)&#xA;&#xA;            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())&#xA;        else:&#xA;            self.is_playing = False&#xA;&#xA;    # infinite loop checking &#xA;    async def play_music(self, ctx):&#xA;        if len(self.music_queue) > 0:&#xA;            self.is_playing = True&#xA;            m_url = self.music_queue[0][0][&#x27;source&#x27;]&#xA;            &#xA;            #try to connect to voice channel if you are not already connected&#xA;            if self.vc == None or not self.vc.is_connected():&#xA;                self.vc = await self.music_queue[0][1].connect()&#xA;&#xA;                #in case we fail to connect&#xA;                if self.vc == None:&#xA;                    await ctx.send("Could not connect to the voice channel")&#xA;                    return&#xA;            else:&#xA;                await self.vc.move_to(self.music_queue[0][1])&#xA;            self.now_playing = m_url&#xA;            #remove the first element as you are currently playing it&#xA;            self.music_queue.pop(0)&#xA;&#xA;            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())&#xA;        else:&#xA;            self.is_playing = False&#xA;&#xA;    @commands.command(name="play", aliases=["p","playing"], help="Plays a selected song from youtube")&#xA;    async def play(self, ctx, *args):&#xA;        query = " ".join(args)&#xA;        &#xA;        voice_channel = ctx.author.voice.channel&#xA;        if voice_channel is None:&#xA;            #you need to be connected so that the bot knows where to go&#xA;            await ctx.send("Connect to a voice channel!")&#xA;        elif self.is_paused:&#xA;            self.vc.resume()&#xA;        else:&#xA;            global song&#xA;            song = self.search_yt(query)&#xA;            if type(song) == type(True):&#xA;                await ctx.send("Could not download the song. Incorrect format try another keyword. This could be due to playlist or a livestream format.")&#xA;            else:&#xA;                await ctx.send("Song added to the queue")&#xA;                self.music_queue.append([song, voice_channel])&#xA;                &#xA;                if self.is_playing == False:&#xA;                    await self.play_music(ctx)&#xA;&#xA;    @commands.command(name="pause", help="Pauses the current song being played")&#xA;    async def pause(self, ctx, *args):&#xA;        if self.is_playing:&#xA;            self.is_playing = False&#xA;            self.is_paused = True&#xA;            self.vc.pause()&#xA;            await ctx.send("Music paused")&#xA;        elif self.is_paused:&#xA;            self.is_paused = False&#xA;            self.is_playing = True&#xA;            self.vc.resume()&#xA;            await ctx.send("Music resumed")&#xA;&#xA;    @commands.command(name = "resume", aliases=["r"], help="Resumes playing with the discord bot")&#xA;    async def resume(self, ctx, *args):&#xA;        if self.is_paused:&#xA;            self.is_paused = False&#xA;            self.is_playing = True&#xA;            self.vc.resume()&#xA;            await ctx.send("Music resumed")&#xA;        else:&#xA;            await ctx.send("Music is not paused")&#xA;&#xA;    @commands.command(name="skip", aliases=["s"], help="Skips the current song being played")&#xA;    async def skip(self, ctx):&#xA;        if self.vc != None and self.vc:&#xA;            self.vc.stop()&#xA;            #try to play next in the queue if it exists&#xA;            await self.play_music(ctx)&#xA;            await ctx.send("Skipped current song")&#xA;&#xA;    @commands.command(name="queue", aliases=["q"], help="Displays the current songs in queue")&#xA;    async def queue(self, ctx):&#xA;        global retval &#xA;        retval = "```"&#xA;        for i in range(0, len(self.music_queue)):&#xA;            # display a max of 5 songs in the current queue&#xA;            #if (i > 4): break&#xA;            l = str(i&#x2B;1)&#xA;            retval &#x2B;= l &#x2B;". " &#x2B; self.music_queue[i][0][&#x27;title&#x27;] &#x2B; "\n"&#xA;&#xA;        if retval != "```":&#xA;            retval&#x2B;="```"&#xA;            await ctx.send(retval)&#xA;        else:&#xA;            await ctx.send("No music in queue")&#xA;&#xA;    **@commands.command(name="loop", help="Loops the queue")**&#xA;    async def loop(self, ctx):&#xA;        if self.is_loop == False:&#xA;            self.is_loop = True&#xA;        else:&#xA;            self.is_loop = False &#xA;        if self.is_loop == True:&#xA;            if len(self.music_queue)==0:&#xA;                await ctx.send("No music to loop")&#xA;            else:&#xA;                i=0&#xA;                while self.is_loop == True and i code>

    &#xA;