Skip to content

Commit

Permalink
Added interval to update status for the *arrs & Tautulli
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Bentley <[email protected]>
  • Loading branch information
mbentley committed Feb 13, 2025
1 parent 6031d57 commit 29e7d4f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/customservices.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ Two lines are needed in the config.yml :
```yaml
type: "Lidarr", "Prowlarr", "Radarr" or "Sonarr"
apikey: "<---insert-api-key-here--->"
checkInterval: 5000 # (Optional) Interval (in ms) for updating the status
```

The url must be the root url of Lidarr, Prowlarr, Readarr, Radarr or Sonarr application.
Expand Down Expand Up @@ -599,6 +600,7 @@ the "Web Interface" section of settings on the Tautulli web UI.
url: "http://192.168.0.151:8181"
type: "Tautulli"
apikey: "<---insert-api-key-here--->"
checkInterval: 5000 # (Optional) Interval (in ms) for updating the status
```

Because the service type and link don't necessarily have to match, you could
Expand Down
5 changes: 5 additions & 0 deletions src/components/services/Lidarr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ export default {
};
},
created: function () {
const checkInterval = parseInt(this.item.checkInterval, 10) || 0;
if (checkInterval > 0) {
setInterval(() => this.fetchConfig(), checkInterval);
}
this.fetchConfig();
},
methods: {
Expand Down
5 changes: 5 additions & 0 deletions src/components/services/Prowlarr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ export default {
};
},
created: function () {
const checkInterval = parseInt(this.item.checkInterval, 10) || 0;
if (checkInterval > 0) {
setInterval(() => this.fetchConfig(), checkInterval);
}
this.fetchConfig();
},
methods: {
Expand Down
5 changes: 5 additions & 0 deletions src/components/services/Radarr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ export default {
},
},
created: function () {
const checkInterval = parseInt(this.item.checkInterval, 10) || 0;
if (checkInterval > 0) {
setInterval(() => this.fetchConfig(), checkInterval);
}
this.fetchConfig();
},
methods: {
Expand Down
5 changes: 5 additions & 0 deletions src/components/services/Sonarr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ export default {
},
},
created: function () {
const checkInterval = parseInt(this.item.checkInterval, 10) || 0;
if (checkInterval > 0) {
setInterval(() => this.fetchConfig(), checkInterval);
}
this.fetchConfig();
},
methods: {
Expand Down
5 changes: 5 additions & 0 deletions src/components/services/Tautulli.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export default {
},
},
created() {
const checkInterval = parseInt(this.item.checkInterval, 10) || 0;
if (checkInterval > 0) {
setInterval(() => this.fetchStatus(), checkInterval);
}
this.fetchStatus();
},
methods: {
Expand Down

0 comments on commit 29e7d4f

Please sign in to comment.