major fix
This commit is contained in:
1 parent
929088cef0
commit
9e799049a7
10 files changed
+339
-281
No files matched your search
+2
-1
@@ -2,7 +2,7 @@ This is complicated than I thought, so we'll adjust our approach.
|
||||
|
||||
# Jellyfin available APIs for this
|
||||
```bash
|
||||
curl --location 'http://saturday.local/System/ActivityLog/Entries?api_key=<apikey></apikey>&hasUserId=true&minDate=2026-02-20T16%3A00%3A00.000Z&limit=100' \
|
||||
curl --location 'http://saturday.local/System/ActivityLog/Entries?api_key=<apikey></apikey>&hasUserId=true&limit=100' \
|
||||
--header 'accept: application/json'
|
||||
```
|
||||
- It doesn't even accept specific dates UP to a certain point. we could theoretically take the activities from a given mindate and reverse the list, but we can't be sure if the earliest item is the earliest for that date.
|
||||
@@ -31,6 +31,7 @@ And let's keep it extremely simple, let's ditch Sonarr API for this.
|
||||
// other activity logs
|
||||
]
|
||||
```
|
||||
- Ensure that the log matches the UserId given on the env as well
|
||||
- Based on the sample log above, we can see that the user "pat" has finished playing an episode of One Piece on Apple TV. The ItemId is "9c543413ef481048f33c5bd0f4a6bd8c", and the date of the activity is "2026-02-21T14:10:23.4402504Z". We can use this information to determine which episode was watched and when it was watched.
|
||||
- If for example I ran this script on Feberuary 24, and I alraedy watched another episode of One Piece, we have to take the last episode watched before the Sunday, which is February 22, 2026 12:00:00 PM PHT or February 21, 2026 16:00:00 UTC. So we have to filter the activity logs to only include those that occurred before that date and time.
|
||||
- The data doesn't contain the episode number, so we have to extract the playback info from the given ItemId e.g.
|
||||
|
||||
Reference in new issue
Block a user