diff --git a/docs/customservices.md b/docs/customservices.md index 3c4f5ad..e84afdb 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -7,25 +7,28 @@ if your homer instance is secured behind some form of authentication or access r Available services are in `src/components/`. Here is an overview of all custom services that are available within Homer: -+ [PiHole](#pihole) -+ [OpenWeatherMap](#openweathermap) -+ [Medusa](#medusa) -+ [Lidarr, Prowlarr, Sonarr and Radarr](#lidarr-prowlarr-sonarr-and-radarr) -+ [PaperlessNG](#paperlessng) -+ [Ping](#ping) -+ [Prometheus](#prometheus) -+ [AdGuard Home](#adguard-home) -+ [Portainer](#portainer) -+ [Emby / Jellyfin](#emby--jellyfin) -+ [Uptime Kuma](#uptime-kuma) -+ [Tautulli](#tautulli) -+ [Mealie](#mealie) -+ [Healthchecks](#healthchecks) -+ [Proxmox](#proxmox) + +- [Custom Services](#custom-services) + - [Common options](#common-options) + - [PiHole](#pihole) + - [OpenWeatherMap](#openweathermap) + - [Medusa](#medusa) + - [Lidarr, Prowlarr, Sonarr and Radarr](#lidarr-prowlarr-sonarr-and-radarr) + - [PaperlessNG](#paperlessng) + - [Ping](#ping) + - [Prometheus](#prometheus) + - [AdGuard Home](#adguard-home) + - [Portainer](#portainer) + - [Emby / Jellyfin](#emby--jellyfin) + - [Uptime Kuma](#uptime-kuma) + - [Tautulli](#tautulli) + - [Mealie](#mealie) + - [Healthchecks](#healthchecks) + - [Proxmox](#proxmox) + - [qBittorrent](#qbittorrent) If you experiencing any issue, please have a look to the [troubleshooting](troubleshooting.md) page. - ## Common options ```yaml @@ -272,4 +275,23 @@ Configuration example: warning_value: 50 danger_value: 80 api_token: "PVEAPIToken=root@pam!your-api-token-name=your-api-token-key" -``` \ No newline at end of file +``` + +## qBittorrent + +This service displays the global upload and download rates, as well as the number of torrents +listed. The service communicates with the qBittorrent API interface which needs +to be accessible from the browser. Please consult +[the instructions](https://github.com/qbittorrent/qBittorrent/pull/12579) +for setting up qBittorrent and make sure the correct CORS-settings are applied. Examples for various +servers can be found at [enable-cors.org](https://enable-cors.org/server.html). + +```yaml +- name: "qBittorrent" + logo: "assets/tools/sample.png" + url: "http://192.168.1.2:8080" # Your rTorrent web UI, f.e. ruTorrent or Flood. + type: "qBittorrent" + rateInterval: 2000 # Interval for updating the download and upload rates. + torrentInterval: 5000 # Interval for updating the torrent count. + target: "_blank" # optional html a tag target attribute +``` diff --git a/dummy-data/README.md b/dummy-data/README.md index eeff4ec..6db4712 100644 --- a/dummy-data/README.md +++ b/dummy-data/README.md @@ -1,15 +1,16 @@ # Dummy data -This directory content makes possible to test custom services cards or create a demo without actually running the service. +This directory content makes possible to test custom services cards or create a demo without actually running the service. The principle is simple: save a sample output of the API used in the service in a static file in this directory. The path must be identical as the service endpoint to be used seamlessly. -## How to add a new services sample: +## How to add a new services sample -- create a directory for your service, and any sub-folder existing in the service api path. +- create a directory for your service, and any sub-folder existing in the service api path. - save the api output in a file named after the service endpoint. Example: -``` + +```sh mkdir pihole -curl http://my-pihole.me/admin/api.php -o pihole/api.php # /admin is omited because for PiHole, the implementation expect it to be in the base url (`url` or `enpoint` property) -``` \ No newline at end of file +curl http://my-pihole.me/admin/api.php -o pihole/api.php # /admin is omited because for PiHole, the implementation expect it to be in the base url (`url` or `endpoint` property) +``` diff --git a/dummy-data/qBittorrent/api/v2/torrents/info b/dummy-data/qBittorrent/api/v2/torrents/info new file mode 100644 index 0000000..e1bc722 --- /dev/null +++ b/dummy-data/qBittorrent/api/v2/torrents/info @@ -0,0 +1,53 @@ +[ + { + "added_on": 1666985518, + "amount_left": 0, + "auto_tmm": false, + "availability": -1, + "category": "", + "completed": 1474873344, + "completion_on": 1666985584, + "content_path": "/downloads/ubuntu-22.04.1-live-server-amd64.iso", + "dl_limit": -1, + "dlspeed": 0, + "download_path": "", + "downloaded": 1513976240, + "downloaded_session": 0, + "eta": 8640000, + "f_l_piece_prio": false, + "force_start": false, + "hash": "cf3ea75e2ebbd30e0da6e6e215e2226bf35f2e33", + "infohash_v1": "cf3ea75e2ebbd30e0da6e6e215e2226bf35f2e33", + "infohash_v2": "", + "last_activity": 1666985588, + "magnet_uri": "magnet:?xt=urn:btih:cf3ea75e2ebbd30e0da6e6e215e2226bf35f2e33&dn=ubuntu-22.04.1-live-server-amd64.iso&tr=https%3a%2f%2ftorrent.ubuntu.com%2fannounce&tr=https%3a%2f%2fipv6.torrent.ubuntu.com%2fannounce", + "max_ratio": 0, + "max_seeding_time": -1, + "name": "ubuntu-22.04.1-live-server-amd64.iso", + "num_complete": 0, + "num_incomplete": 583, + "num_leechs": 0, + "num_seeds": 0, + "priority": 0, + "progress": 1, + "ratio": 1.7163413343924075e-05, + "ratio_limit": -2, + "save_path": "/downloads/", + "seeding_time": 4, + "seeding_time_limit": -2, + "seen_complete": 1666985584, + "seq_dl": false, + "size": 1474873344, + "state": "pausedUP", + "super_seeding": false, + "tags": "", + "time_active": 69, + "total_size": 1474873344, + "tracker": "", + "trackers_count": 2, + "up_limit": -1, + "uploaded": 25985, + "uploaded_session": 0, + "upspeed": 0 + } +] \ No newline at end of file diff --git a/dummy-data/qBittorrent/api/v2/transfer/info b/dummy-data/qBittorrent/api/v2/transfer/info new file mode 100644 index 0000000..dd7b318 --- /dev/null +++ b/dummy-data/qBittorrent/api/v2/transfer/info @@ -0,0 +1,10 @@ +{ + "connection_status": "connected", + "dht_nodes": 318, + "dl_info_data": 23481469329, + "dl_info_speed": 1234567, + "dl_rate_limit": 40960000, + "up_info_data": 1788370216, + "up_info_speed": 765432, + "up_rate_limit": 10547200 +} \ No newline at end of file diff --git a/src/components/services/qBittorrent.vue b/src/components/services/qBittorrent.vue new file mode 100644 index 0000000..1f1ef49 --- /dev/null +++ b/src/components/services/qBittorrent.vue @@ -0,0 +1,120 @@ + + + + + \ No newline at end of file