Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite media queuing #3833

Merged

Conversation

nielsvanvelzen
Copy link
Member

Update the architecture of playback queues to have a single queue(service) per playback manager which is filled with entries via suppliers. This is required for some upcoming functionality to support more upcoming functionality that is needed for lyric loading (and eventually media segments and other fancy stuff).

Changes

  • Rename current Queue to QueueSupplier
  • Add a new QueueService which is based on the previous QueueState
    • This is a required service and automatically added in the PlaybackManagerBuilder
  • Refactor MediaStreamState to MediaStreamService
    • This is a required service and automatically added in the PlaybackManagerBuilder

Issues

Part of #1057

@nielsvanvelzen nielsvanvelzen added enhancement New feature or request playback Issue related to media playback refactor Improvements to code realiability, readability and quality labels Aug 5, 2024
@nielsvanvelzen nielsvanvelzen added this to the v0.18.0 milestone Aug 5, 2024
@nielsvanvelzen nielsvanvelzen changed the title Rewrite queuing Rewrite media queuing Aug 5, 2024

suspend fun getItem(index: Int): QueueEntry?
/**
* Add a supplier of queue items to the end of the queue. Will automatically fetch the first item if there is no current entry.

Check warning

Code scanning / detekt

Line detected, which is longer than the defined maximum line length in the code style. Warning

Line detected, which is longer than the defined maximum line length in the code style.
): QueueEntry?

/**
* Get the next n entries in the queue. Where n is the amount to fetch. The returned collection may be smaller or empty depending on

Check warning

Code scanning / detekt

Line detected, which is longer than the defined maximum line length in the code style. Warning

Line detected, which is longer than the defined maximum line length in the code style.
@nielsvanvelzen nielsvanvelzen merged commit 0f38bd1 into jellyfin:master Aug 5, 2024
6 checks passed
@nielsvanvelzen nielsvanvelzen deleted the playback-queue-service branch August 5, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request playback Issue related to media playback refactor Improvements to code realiability, readability and quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants