29 lines
3.0 KiB
Plaintext
29 lines
3.0 KiB
Plaintext
PLAYER :
|
|
|
|
I need a player service and endpoints.
|
|
|
|
The service should start when the application starts and stop when the app stops. At initialisation it should load the current playlist (is_current). It should manage all the features of a player, play/pause, stop, next, previous, play modes (continuous, loop, loop 1, random, single), seek, volume. Since the current playlist can change we also need a way to reload the playlist. At anytime when the state of the player changes (current progress while playing, track changed, stopped, volume change, new playlist loaded ...) it should emit the state the socket to all users. It should also take into account that if a users connects at anytime even if the player is not running the user needs the current state. Finally to count a track as played (play_count in sound and sound_played that already exists) at least 20% of the track has to be played and i mean real time playing even if not consecutive (if at the start of a track we jump to the end for example it shouldn't count). The player should use python-vlc to play the sounds but manage events locally since VLC events are not reliable.
|
|
|
|
The player state should include the status (stopped, playing, paused), mode (continuous, loop ...), volume, current_sound_id, current_sound_index, current_sound_position, current_sound_duration, the current_sound (id, name, filename, duration, size, type, thumbnail, play_count), the playlist_id, the playlist_name, the playlist_length, the playlist duration (sum of all the sounds duration) and the playlist_sounds. The duration and position should be in ms.
|
|
|
|
Among the other endpoints you will generate, the play endpoint should play the current sound if not already playing, or start playing a specific sound if an index is passed (maybe 2 endpoints needed i don't know ?).
|
|
|
|
|
|
=======
|
|
|
|
SOUNDBOARD :
|
|
|
|
For my soundboard, I need a vlc service that can play sounds using individual instances of vlc with subprocess. The service also needs a way to stop all instances of vlc (no need to track all the processes of the vlc instances created, just kill all vlc)
|
|
|
|
|
|
|
|
|
|
I need a VLC service that can play sounds by launching separate VLC instances using subprocess. Additionally, the service should provide a mechanism to stop all running VLC instances at once — there's no need to keep track of each individual process; a general kill-all approach is sufficient.
|
|
|
|
|
|
|
|
========
|
|
|
|
TASKS MANAGER :
|
|
|
|
I would like to put in place a centralized tasks manager, especially for long tasks that should run in the background (scan sounds, normalize all sounds or extract). The tasks manager should emit events to the socket. It should be able to manager conflict between tasks for example a sounds scan and a normalization can't run at the same time. Also some tasks like extract can simultaneously (for now 2 at a time for extract). I want the manager to track the step the task is in (real step corresponding to the task process for example for extract steps would be extract sound, add sound to sound table, normalization ...) |