mirror of
https://git.wetfence.xyz/RandyTheSilly/1-More-Episode.git
synced 2026-10-28 10:50:01 -04:00
Send and display last watched on watch
This commit is contained in:
1 parent
017051ccbe
commit
6ad8ced5bb
3 files changed
+38
-42
No files matched your search
+4
-2
@@ -33,7 +33,7 @@ function callAPI(fullURL, apiKey, isJellyfin, trackedUser, sleepTimestamp) {
|
||||
if (resp && ((isJellyfin === true && Array.isArray(resp.Items)) || (isJellyfin === false && Array.isArray(resp.response.data.data)))) {
|
||||
let delta;
|
||||
let bestDelta = Infinity;
|
||||
let lastWatched = null;
|
||||
let lastWatched = "";
|
||||
if (isJellyfin === true) {
|
||||
const re = /^(.+) is playing (.+) on .*$/;
|
||||
let arr;
|
||||
@@ -64,8 +64,10 @@ function callAPI(fullURL, apiKey, isJellyfin, trackedUser, sleepTimestamp) {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (lastWatched != null) {
|
||||
if (lastWatched != "") {
|
||||
console.log("Last watched: " + lastWatched);
|
||||
var dict = { 'PKJS_LAST_WATCHED': lastWatched }
|
||||
Pebble.sendAppMessage(dict);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user