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

[bugfix]: Resolve MPV next/prev race condition #566

Merged

Conversation

kgarner7
Copy link
Collaborator

Resolves #536.

With the previous implementation, next/previous would first update the current queue and then call next/previous. However, since these were asynchronous calls it was very likely that the second calls would fail (and a test of adding delay showed that it actually caused a double skip). This PR resolves this by just removing the prev/next.

Small other fixes:

  • setQueue + pause -> setQueue(..., true)
  • make MPV and web player have the same behavior for (pause/stop) where appropriate

Resolves jeffvli#536.

With the previous implementation, next/previous would first update
the current queue and then call next/previous. However, since these were
asynchronous calls it was very likely that the second calls would fail
(and a test of adding delay showed that it actually caused a double skip).
This PR resolves this by just removing the prev/next.

Small other fixes:
- setQueue + pause -> setQueue(..., true)
- make MPV and web player have the same behavior for (pause/stop) where appropriate
@kgarner7 kgarner7 added the MPV Issues related to MPV player label Mar 31, 2024
@kgarner7 kgarner7 requested a review from jeffvli March 31, 2024 04:52
Copy link

vercel bot commented Mar 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
feishin ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 31, 2024 4:53am

@kgarner7 kgarner7 merged commit e0e9673 into jeffvli:development Mar 31, 2024
3 checks passed
@kgarner7 kgarner7 deleted the fix-mpv-race-and-make-consistent branch March 31, 2024 23:12
spiceratops referenced this pull request in spiceratops/k8s-gitops May 7, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/jeffvli/feishin](https://togithub.com/jeffvli/feishin) |
minor | `0.6.1` -> `0.7.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>jeffvli/feishin (ghcr.io/jeffvli/feishin)</summary>

###
[`v0.7.1`](https://togithub.com/jeffvli/feishin/releases/tag/v0.7.1):
0.7.1

[Compare
Source](https://togithub.com/jeffvli/feishin/compare/v0.7.0...v0.7.1)

0.7.1 released to fix missing Windows binary.

**Full Changelog**:
jeffvli/feishin@v0.7.0...v0.7.1

###
[`v0.7.0`](https://togithub.com/jeffvli/feishin/releases/tag/v0.7.0):
0.7.0

[Compare
Source](https://togithub.com/jeffvli/feishin/compare/v0.6.1...v0.7.0)

0.7.0 is here!

Moving forwards, release notes will be simplified as so. Thanks to all
the contributors as always!

#### Highlights

- (UI) Added `Get Info` button on dropdowns to show extended details for
the selected item
-   (UI) Changed titlebar on light theme to use a lighter color
- (UI) Error page now shows server menu in case to handle cases where
application can become stuck
- (UI) Fixed synchronized lyrics not repeating when track is repeated on
fullscreen player
- (UI) Added toggle to switch between tracks and albums when double
clicking an item in the genres list
-   (UI) (Jellyfin) Fixed lyrics parsing for Jellyfin v10.9.0
-   (UI) (Navidrome) Adds `Share item` to item context menus
- (UI) (Navidrome) Added `inPlaylist` and `notInPlaylist` operators for
Navidrome smart playlists
- (UI) (Navidrome) Added JSON preview for smart playlist builder output
- (UI) Added Farsi and Chinese (Traditional) languages (thanks to
translators!)
- (Desktop) The positioning state of the application is now persisted
(maximize, fullscreen, window position)
- (Player) Various fixes/improvements with player implementation
including mpris and scrobbling
- ...and more: [view
commits](https://togithub.com/jeffvli/feishin/compare/v0.6.1...v0.7.0)

#### What's Changed

- Bump the npm_and_yarn group across 1 directory with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/jeffvli/feishin/pull/542](https://togithub.com/jeffvli/feishin/pull/542)
- Bump the npm_and_yarn group across 1 directory with 1 update by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/jeffvli/feishin/pull/551](https://togithub.com/jeffvli/feishin/pull/551)
- Bump the npm_and_yarn group across 1 directory with 1 update by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/jeffvli/feishin/pull/557](https://togithub.com/jeffvli/feishin/pull/557)
- Bump the npm_and_yarn group across 1 directory with 1 update by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/jeffvli/feishin/pull/561](https://togithub.com/jeffvli/feishin/pull/561)
- \[bugfix]: Resolve MPV next/prev race condition by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/566](https://togithub.com/jeffvli/feishin/pull/566)
- \[bugfix]: Add a fallback image to the dynamic background url by
[@&#8203;iiPythonx](https://togithub.com/iiPythonx) in
[https://github.com/jeffvli/feishin/pull/571](https://togithub.com/jeffvli/feishin/pull/571)
- \[enhancement]: Show item details by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/573](https://togithub.com/jeffvli/feishin/pull/573)
- Fix portrait mode detection by
[@&#8203;Kaydax](https://togithub.com/Kaydax) in
[https://github.com/jeffvli/feishin/pull/582](https://togithub.com/jeffvli/feishin/pull/582)
- \[enhancement]: Support react-router links in Modal by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/586](https://togithub.com/jeffvli/feishin/pull/586)
- \[enhancement]: Support toggling Album/Track view for gneres by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/591](https://togithub.com/jeffvli/feishin/pull/591)
- Implement Navidrome sharing by
[@&#8203;iiPythonx](https://togithub.com/iiPythonx) in
[https://github.com/jeffvli/feishin/pull/575](https://togithub.com/jeffvli/feishin/pull/575)
- \[bugfix]: Handle top-level songs for Jellyfin by
[@&#8203;kgarner7](https://togithub.com/kgarner7) in
[https://github.com/jeffvli/feishin/pull/553](https://togithub.com/jeffvli/feishin/pull/553)
- Bump ejs from 3.1.9 to 3.1.10 in the npm_and_yarn group across 1
directory by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/jeffvli/feishin/pull/602](https://togithub.com/jeffvli/feishin/pull/602)
- Fix LrcLib fetcher by
[@&#8203;vukanovics](https://togithub.com/vukanovics) in
[https://github.com/jeffvli/feishin/pull/603](https://togithub.com/jeffvli/feishin/pull/603)
- Allow smaller album covers in card/poster display by
[@&#8203;Dylancyclone](https://togithub.com/Dylancyclone) in
[https://github.com/jeffvli/feishin/pull/598](https://togithub.com/jeffvli/feishin/pull/598)
- Add new Navidrome smart playlist operators (up to v0.52.0) by
[@&#8203;jeffvli](https://togithub.com/jeffvli) in
[https://github.com/jeffvli/feishin/pull/604](https://togithub.com/jeffvli/feishin/pull/604)

#### New Contributors

- [@&#8203;Kaydax](https://togithub.com/Kaydax) made their first
contribution in
[https://github.com/jeffvli/feishin/pull/582](https://togithub.com/jeffvli/feishin/pull/582)
- [@&#8203;vukanovics](https://togithub.com/vukanovics) made their first
contribution in
[https://github.com/jeffvli/feishin/pull/603](https://togithub.com/jeffvli/feishin/pull/603)
- [@&#8203;Dylancyclone](https://togithub.com/Dylancyclone) made their
first contribution in
[https://github.com/jeffvli/feishin/pull/598](https://togithub.com/jeffvli/feishin/pull/598)

**Full Changelog**:
jeffvli/feishin@v0.6.1...v0.7.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDcuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM0OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MPV Issues related to MPV player
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when mpv is selected as the player
1 participant