Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (47)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (5540)

  • Anomalie #2023 : Interface privée : le lien "informations personnelles" ne fonctionne plus sous 2....

    6 avril 2011, par gvincent -

    Effectivement je ne reproduits pas le bug sur un site en [16966]. Je vais voir sans aucun plugin (j’aurais dû commencer par là)

  • Anomalie #2023 : Interface privée : le lien "informations personnelles" ne fonctionne plus sous 2....

    6 avril 2011, par cedric -

    Je ne reproduis pas. J’ai bien un lien fonctionnel. Si tu ne le constates que sur un seul site, c’est peut être la faute d’un plugin ?

  • 2023-04-18 18:25:05 INFO discord.player ffmpeg process ##### successfully terminated with return code of 0

    19 avril 2023, par I_am_thing

    I am making a discord music bot with discord.py and ctx, it uses Spotify

    


    I am using FFmpeg for my music feature. This is my !play code

    


    client_id = ''
client_secret = ''
client_credentials_manager = SpotifyClientCredentials(client_id=client_id, client_secret=client_secret)
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)

bot.volume = 0.5 # initial volume of the bot (can be changed)

@bot.command()
async def play(ctx, *, track_query):
    # check if the query is a valid Spotify link
    if 'open.spotify.com/track/' in track_query:
        track_id = track_query.split('/')[-1] # extract the track ID from the link
    else:
        # search for tracks with the given name
        track_results = sp.search(q=track_query, type='track', limit=1)
        if len(track_results['tracks']['items']) == 0:
            await ctx.send(f'Sorry, I could not find any track with the name "{track_query}".')
            return
        track_id = track_results['tracks']['items'][0]['id'] # get the track ID for the first search result
    track_info = sp.track(track_id) # get the track information for the given ID
    track_name = track_info['name']
    track_artist = track_info['artists'][0]['name']
    track_duration = time.strftime('%M:%S', time.gmtime(track_info['duration_ms']//1000))
    track_preview_url = track_info['preview_url'] # get the preview URL for the track
    if track_preview_url is None:
        await ctx.send(f'Sorry, the track "{track_name}" by {track_artist} cannot be played.')
        return
    voice_channel = ctx.author.voice.channel
    if voice_channel is None:
        await ctx.send('Please join a voice channel first.')
        return
    voice_client = await voice_channel.connect()
    audio_source = discord.FFmpegPCMAudio(track_preview_url, options="-b:a 128k -bufsize 512k")
    voice_client.play(audio_source, after=lambda e: print('Player error: %s' % e) if e else None)
    voice_client.source = discord.PCMVolumeTransformer(voice_client.source)
    voice_client.source.volume = bot.volume

    # format the embed message
    embed = discord.Embed(title=track_name, description=track_artist, color=0xff8c00)
    embed.add_field(name='Duration', value=track_duration, inline=True)
    embed.set_thumbnail(url=track_info['album']['images'][0]['url'])
    embed.set_footer(text='This music is from https://www.spotify.com/')
    await ctx.send(embed=embed)

    while voice_client.is_playing():
        await asyncio.sleep(1)
    await voice_client.disconnect()


    


    I joined the unofficial ffmpeg discord server no one could find a fix I searched for ages and I couldn't fix it