[PR #212] [MERGED] 183 better playback state synchronization #322

Closed
opened 2026-02-27 19:17:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/EddieTheCubeHead/Stagnum/pull/212
Author: @EddieTheCubeHead
Created: 4/10/2024
Status: Merged
Merged: 4/11/2024
Merged by: @EddieTheCubeHead

Base: masterHead: 183-better-playback-state-synchronization


📝 Commits (10+)

  • e8988ca Merge branch '200-rename-authorization-header-to-adhere-to-industry-standards' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend
  • 03c41ed Merge branch '182-clean-users-queue-on-playback-start' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend
  • 89dd310 Merge branch '182-clean-users-queue-on-playback-start' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend
  • bebec54 Merge branch '195-creating-a-new-pool-corrupts-data-in-backend' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend
  • d2c9c90 199 Add token to response headers and add tests ensuring all authirozed routes return it
  • 44f9997 199 Refresh token after expiry
  • fd8b8e7 Merge branch 'master' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend
  • b23c208 Merge branch '199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend' into 183-better-playback-state-synchronization
  • c8c73e0 Merge branch 'master' into 183-better-playback-state-synchronization
  • 53deaa0 Merge branch 'master' into 183-better-playback-state-synchronization

📊 Changes

27 files changed (+969 additions, -460 deletions)

View changed files

📝 client/next.config.mjs (+3 -3)
📝 server/src/api/auth/dependencies.py (+9 -61)
📝 server/src/api/auth/models.py (+0 -7)
📝 server/src/api/auth/tasks.py (+3 -3)
📝 server/src/api/common/dependencies.py (+108 -11)
📝 server/src/api/common/helpers.py (+14 -0)
📝 server/src/api/common/models.py (+7 -0)
📝 server/src/api/pool/dependencies.py (+136 -56)
📝 server/src/api/pool/tasks.py (+11 -6)
📝 server/src/api/search/dependencies.py (+0 -1)
📝 server/src/database/entities.py (+5 -5)
📝 server/test/auth_features/auth_login_callback_features.py (+10 -84)
📝 server/test/auth_features/cleanup_state_strings_features.py (+9 -22)
📝 server/test/auth_features/conftest.py (+90 -0)
server/test/auth_features/refresh_token_features.py (+22 -0)
📝 server/test/conftest.py (+141 -11)
📝 server/test/pool_features/add_content_features.py (+20 -7)
📝 server/test/pool_features/conftest.py (+101 -46)
📝 server/test/pool_features/create_pool_features.py (+40 -17)
📝 server/test/pool_features/delete_content_features.py (+8 -2)

...and 7 more files

📄 Description

Two main features here:

When queueing a song, spotify playback status is fetched first

  • This status is used to finetune next song timestamp
  • If the playback is not close to ending yet, queueing is deferred to later and playback is updated
  • If the song has changed, we update the playback data this doesn't work correctly bugfixing on another ticket Fixed now and merged into this ticket

When making operations, user queue is fetched and emptied by skipping queued songs

  • Improvement upon the previous "empty your queue" error message.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/EddieTheCubeHead/Stagnum/pull/212 **Author:** [@EddieTheCubeHead](https://github.com/EddieTheCubeHead) **Created:** 4/10/2024 **Status:** ✅ Merged **Merged:** 4/11/2024 **Merged by:** [@EddieTheCubeHead](https://github.com/EddieTheCubeHead) **Base:** `master` ← **Head:** `183-better-playback-state-synchronization` --- ### 📝 Commits (10+) - [`e8988ca`](https://github.com/EddieTheCubeHead/Stagnum/commit/e8988caeea3f150d8ebd37d5c6646d36e86c3a85) Merge branch '200-rename-authorization-header-to-adhere-to-industry-standards' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend - [`03c41ed`](https://github.com/EddieTheCubeHead/Stagnum/commit/03c41ed2f3768f5bc3ff42602d5870e8fb0e8508) Merge branch '182-clean-users-queue-on-playback-start' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend - [`89dd310`](https://github.com/EddieTheCubeHead/Stagnum/commit/89dd310e5a4c79c5ca7da87b95991039a58497ba) Merge branch '182-clean-users-queue-on-playback-start' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend - [`bebec54`](https://github.com/EddieTheCubeHead/Stagnum/commit/bebec54d17a377b6a1fb0b8bdbdc50c54901aa62) Merge branch '195-creating-a-new-pool-corrupts-data-in-backend' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend - [`d2c9c90`](https://github.com/EddieTheCubeHead/Stagnum/commit/d2c9c908c5e68e280ab3289d5d8ae7f6cae46b35) 199 Add token to response headers and add tests ensuring all authirozed routes return it - [`44f9997`](https://github.com/EddieTheCubeHead/Stagnum/commit/44f9997f613aaf44461250883fb956b1ee17b5e0) 199 Refresh token after expiry - [`fd8b8e7`](https://github.com/EddieTheCubeHead/Stagnum/commit/fd8b8e731aa685e37261c7d4f01737a79dc77e27) Merge branch 'master' into 199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend - [`b23c208`](https://github.com/EddieTheCubeHead/Stagnum/commit/b23c208818024a24f902e9de2440698bdc02531c) Merge branch '199-subtask-include-users-current-token-in-all-authorized-response-headers-and-refresh-expired-tokens-on-token-validation-in-backend' into 183-better-playback-state-synchronization - [`c8c73e0`](https://github.com/EddieTheCubeHead/Stagnum/commit/c8c73e006a56ac681c3191ad961a72bf3ce5b331) Merge branch 'master' into 183-better-playback-state-synchronization - [`53deaa0`](https://github.com/EddieTheCubeHead/Stagnum/commit/53deaa0ad70022a0aa54f5a2dc0d26ba0a5291b3) Merge branch 'master' into 183-better-playback-state-synchronization ### 📊 Changes **27 files changed** (+969 additions, -460 deletions) <details> <summary>View changed files</summary> 📝 `client/next.config.mjs` (+3 -3) 📝 `server/src/api/auth/dependencies.py` (+9 -61) 📝 `server/src/api/auth/models.py` (+0 -7) 📝 `server/src/api/auth/tasks.py` (+3 -3) 📝 `server/src/api/common/dependencies.py` (+108 -11) 📝 `server/src/api/common/helpers.py` (+14 -0) 📝 `server/src/api/common/models.py` (+7 -0) 📝 `server/src/api/pool/dependencies.py` (+136 -56) 📝 `server/src/api/pool/tasks.py` (+11 -6) 📝 `server/src/api/search/dependencies.py` (+0 -1) 📝 `server/src/database/entities.py` (+5 -5) 📝 `server/test/auth_features/auth_login_callback_features.py` (+10 -84) 📝 `server/test/auth_features/cleanup_state_strings_features.py` (+9 -22) 📝 `server/test/auth_features/conftest.py` (+90 -0) ➕ `server/test/auth_features/refresh_token_features.py` (+22 -0) 📝 `server/test/conftest.py` (+141 -11) 📝 `server/test/pool_features/add_content_features.py` (+20 -7) 📝 `server/test/pool_features/conftest.py` (+101 -46) 📝 `server/test/pool_features/create_pool_features.py` (+40 -17) 📝 `server/test/pool_features/delete_content_features.py` (+8 -2) _...and 7 more files_ </details> ### 📄 Description Two main features here: **When queueing a song, spotify playback status is fetched first** - This status is used to finetune next song timestamp - If the playback is not close to ending yet, queueing is deferred to later and playback is updated - If the song has changed, we update the playback data ~~**this doesn't work correctly** bugfixing on [another ticket](https://github.com/users/EddieTheCubeHead/projects/3/views/8?pane=issue&itemId=59346809)~~ Fixed now and merged into this ticket **When making operations, user queue is fetched and emptied by skipping queued songs** - Improvement upon the previous "empty your queue" error message. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 19:17:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Stagnum#322
No description provided.