[PR #1578] [MERGED] feat: add and use "last played" timestamp for songs #1786

Closed
opened 2026-02-26 03:32:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/1578
Author: @phanan
Created: 11/8/2022
Status: Merged
Merged: 11/8/2022
Merged by: @phanan

Base: masterHead: feat/last-played


📝 Commits (1)

  • 73a1372 feat: add and use "last played" for songs

📊 Changes

12 files changed (+190 additions, -107 deletions)

View changed files

📝 api-docs/api.yaml (+55 -55)
📝 app/Models/Interaction.php (+3 -1)
📝 app/Repositories/InteractionRepository.php (+1 -1)
📝 app/Repositories/SongRepository.php (+1 -2)
📝 app/Services/InteractionService.php (+2 -0)
📝 app/Services/SmartPlaylistService.php (+7 -6)
📝 app/Values/SmartPlaylistRule.php (+7 -38)
app/Values/SmartPlaylistSqlElements.php (+89 -0)
database/migrations/2022_11_08_144634_add_last_played_at_into_interactions_table.php (+22 -0)
📝 resources/assets/js/components/ui/ScreenHeader.vue (+1 -2)
📝 resources/assets/js/config/smart-playlist/models.ts (+1 -1)
📝 resources/assets/js/types.d.ts (+1 -1)

📄 Description

Add and use a interactions.last_played_at timestamp instead of relying on interactions.updated_at, which has always been buggy, as the latter is modified upon (un)marking songs as favorite as well.

Also in this PR:

  • Fixed a bug with smart playlist's date fields
  • Use dynamic font size for headers (opportunity improvement)

🔄 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/koel/koel/pull/1578 **Author:** [@phanan](https://github.com/phanan) **Created:** 11/8/2022 **Status:** ✅ Merged **Merged:** 11/8/2022 **Merged by:** [@phanan](https://github.com/phanan) **Base:** `master` ← **Head:** `feat/last-played` --- ### 📝 Commits (1) - [`73a1372`](https://github.com/koel/koel/commit/73a1372281b88ac678ada4d173d96b1eda6d16ae) feat: add and use "last played" for songs ### 📊 Changes **12 files changed** (+190 additions, -107 deletions) <details> <summary>View changed files</summary> 📝 `api-docs/api.yaml` (+55 -55) 📝 `app/Models/Interaction.php` (+3 -1) 📝 `app/Repositories/InteractionRepository.php` (+1 -1) 📝 `app/Repositories/SongRepository.php` (+1 -2) 📝 `app/Services/InteractionService.php` (+2 -0) 📝 `app/Services/SmartPlaylistService.php` (+7 -6) 📝 `app/Values/SmartPlaylistRule.php` (+7 -38) ➕ `app/Values/SmartPlaylistSqlElements.php` (+89 -0) ➕ `database/migrations/2022_11_08_144634_add_last_played_at_into_interactions_table.php` (+22 -0) 📝 `resources/assets/js/components/ui/ScreenHeader.vue` (+1 -2) 📝 `resources/assets/js/config/smart-playlist/models.ts` (+1 -1) 📝 `resources/assets/js/types.d.ts` (+1 -1) </details> ### 📄 Description Add and use a `interactions.last_played_at` timestamp instead of relying on `interactions.updated_at`, which has always been buggy, as the latter is modified upon (un)marking songs as favorite as well. Also in this PR: - [x] Fixed a bug with smart playlist's date fields - [x] Use dynamic font size for headers (opportunity improvement) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 03:32:18 +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/koel-koel#1786
No description provided.