Skip to content

Commit 7b0f580

Browse files
committed
Merge branch 'develop'
2 parents 8b3f4c6 + 4dbea91 commit 7b0f580

File tree

14 files changed

+880
-8
lines changed

14 files changed

+880
-8
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ A javascript app to scrobble music you listened to, to [Maloja](https://github.c
1818
* [MPRIS (Linux Desktop)](/docs/configuration.md#mpris)
1919
* [Mopidy](/docs/configuration.md#mopidy)
2020
* [JRiver](/docs/configuration.md#jriver)
21+
* [Kodi](/docs/configuration.md#kodi)
2122
* Supports scrobbling to many **Clients**
2223
* [Maloja](/docs/configuration.md#maloja)
2324
* [Last.fm](/docs/configuration.md#lastfm)

config/kodi.json.example

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"name": "MyKodi",
4+
"data": {
5+
"url": "http://localhost:8080/jsonrpc",
6+
"username": "myUser",
7+
"password": "myPassword"
8+
}
9+
}
10+
]

docs/configuration.md

+69
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [MPRIS (Linux Desktop)](#mpris)
1717
* [Mopidy](#mopidy)
1818
* [JRiver](#jriver)
19+
* [Kodi](#kodi)
1920
* [Client Configurations](#client-configurations)
2021
* [Maloja](#maloja)
2122
* [Last.fm](#lastfm)
@@ -532,6 +533,74 @@ MS transforms this to: `http://mydomain.com:80/jriverReverse/MCWS/v1/`
532533

533534
See [`jriver.json.example`](/config/jriver.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FJRiverSourceConfig/%23%2Fdefinitions%2FJRiverData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fsource.json)
534535

536+
## [Kodi](https://kodi.tv/)
537+
538+
In order for multi-scrobbler to communicate with Kodi you must have the [Web Interface](https://kodi.wiki/view/Web_interface) enabled. This can can be in the Kodi GUI:
539+
540+
* Settings -> Services -> Control
541+
* Check `Allow remote control via HTTP`
542+
* Ensure you have a **Username** and **Password** set, you will need to provide them in the ENV/File configuration below.
543+
544+
#### URL
545+
546+
If you do not provide a URL then a default is used which assumes Kodi is installed on the same server as multi-scrobbler: `http://localhost:8080/jsonrpc`
547+
548+
* Make sure the port number matches what is found in **Port** in the [Control](#kodi) section mentioned above.
549+
* If your installation is on the same machine but you cannot connect using `localhost` try `0.0.0.0` instead.
550+
551+
The URL used to connect ultimately must be formed like this: `[protocol]://[hostname]:[port]/[path]`
552+
If any part of this URL is missing multi-scrobbler will use a default value, for your convenience. This also means that if any part of your URL is **not** standard you must explicitly define it.
553+
554+
Part => Default Value
555+
556+
* Protocol => `http://`
557+
* Hostname => `localhost`
558+
* Port => `8080`
559+
* Path => `/jsonrpc`
560+
561+
<details>
562+
<summary>URL Transform Examples</summary>
563+
564+
```json
565+
{
566+
"url": "kodi.mydomain.com"
567+
}
568+
```
569+
570+
MS transforms this to: `http://kodi.mydomain.com:8080/jsonrpc`
571+
572+
```json
573+
{
574+
"url": "192.168.0.101:3456"
575+
}
576+
```
577+
578+
MS transforms this to: `http://192.168.0.101:3456/jsonprc`
579+
580+
```json
581+
{
582+
"url": "mydomain.com:80/kodiReverse/jsonrpc"
583+
}
584+
```
585+
586+
MS transforms this to: `http://mydomain.com:80/kodiReverse/jsonrpc`
587+
588+
</details>
589+
590+
### ENV-Based
591+
592+
593+
| Environmental Variable | Required | Default | Description |
594+
|------------------------|----------|-------------------------------|----------------------------|
595+
| KODI_URL | Yes | http://localhost:8080/jsonrpc | The URL of the Kodi server |
596+
| KODI_USERNAME | No | | The username set |
597+
| KODI_PASSWORD | No | | The password set |
598+
599+
600+
### File-Based
601+
602+
See [`kodi.json.example`](/config/kodi.json.example) or [explore the schema with an example and live editor/validator](https://json-schema.app/view/%23%2Fdefinitions%2FKodiSourceConfig/%23%2Fdefinitions%2FKodiData?url=https%3A%2F%2Fraw.githubusercontent.com%2FFoxxMD%2Fmulti-scrobbler%2Fdevelop%2Fsrc%2Fcommon%2Fschema%2Fsource.json)
603+
535604
# Client Configurations
536605

537606
## [Maloja](https://github.com/krateng/maloja)

package-lock.json

+154-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"gotify": "^1.1.0",
5353
"iti": "^0.6.0",
5454
"json5": "^2.2.3",
55+
"kodi-api": "^0.2.1",
5556
"lastfm-node-client": "^2.2.0",
5657
"mopidy": "^1.3.0",
5758
"normalize-url": "^6.1.0",

0 commit comments

Comments
 (0)