[PR #306] [MERGED] Cache user's data into files (liked tracks, saved albums, followed artists, etc) #708

Closed
opened 2026-03-02 23:49:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/306
Author: @aome510
Created: 12/2/2023
Status: Merged
Merged: 12/2/2023
Merged by: @aome510

Base: masterHead: cache-user-save-data


📝 Commits (5)

  • 659142f save user's data into cache upon retrieving from APIs
  • f7cfb3b add FileCacheKey
  • a4a92b7 add load_data_from_file_cache
  • 66f490a load user's data from file caches upon initialization
  • cdc27a0 rename CACHE_DURATION to TTL_CACHE_DURATION

📊 Changes

7 files changed (+140 additions, -48 deletions)

View changed files

📝 spotify_player/src/client/mod.rs (+39 -11)
📝 spotify_player/src/main.rs (+1 -1)
📝 spotify_player/src/state/data.rs (+75 -10)
📝 spotify_player/src/state/mod.rs (+6 -4)
📝 spotify_player/src/state/model.rs (+9 -17)
📝 spotify_player/src/ui/page.rs (+5 -1)
📝 spotify_player/src/ui/popup.rs (+5 -4)

📄 Description

Resolves #291
Resolves #235

  • implement store_data_into_file_cache to save user's data into a file upon receiving Spotify API's response
  • implement load_data_from_file_cache to load user's data from a file upon initializing the application's state
  • and other small code improvements

🔄 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/aome510/spotify-player/pull/306 **Author:** [@aome510](https://github.com/aome510) **Created:** 12/2/2023 **Status:** ✅ Merged **Merged:** 12/2/2023 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `cache-user-save-data` --- ### 📝 Commits (5) - [`659142f`](https://github.com/aome510/spotify-player/commit/659142f9d97c448dda6f995754c766ba1f3d224f) save user's data into cache upon retrieving from APIs - [`f7cfb3b`](https://github.com/aome510/spotify-player/commit/f7cfb3be35b0ca5fe4c4ea09ef9cd97c354ef2ef) add `FileCacheKey` - [`a4a92b7`](https://github.com/aome510/spotify-player/commit/a4a92b7fe1b2ea597717d1b799ec08e865c99934) add `load_data_from_file_cache` - [`66f490a`](https://github.com/aome510/spotify-player/commit/66f490a1289729224d0f82d31426fd4d6cc622bf) load user's data from file caches upon initialization - [`cdc27a0`](https://github.com/aome510/spotify-player/commit/cdc27a0c5bd7182a79ed15af3e4463912b03b19a) rename `CACHE_DURATION` to `TTL_CACHE_DURATION` ### 📊 Changes **7 files changed** (+140 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `spotify_player/src/client/mod.rs` (+39 -11) 📝 `spotify_player/src/main.rs` (+1 -1) 📝 `spotify_player/src/state/data.rs` (+75 -10) 📝 `spotify_player/src/state/mod.rs` (+6 -4) 📝 `spotify_player/src/state/model.rs` (+9 -17) 📝 `spotify_player/src/ui/page.rs` (+5 -1) 📝 `spotify_player/src/ui/popup.rs` (+5 -4) </details> ### 📄 Description Resolves #291 Resolves #235 - implement `store_data_into_file_cache` to save user's data into a file upon receiving Spotify API's response - implement `load_data_from_file_cache` to load user's data from a file upon initializing the application's state - and other small code improvements --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:49:28 +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/spotify-player#708
No description provided.