Skip to content

Commit

Permalink
feat(chrome): Add user debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxxMD committed Jan 12, 2024
1 parent 758770d commit 8c40223
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docsite/docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,9 @@ Multi-scrobbler works the same was the official Spotify-Last.fm integration work
## Jellyfin does not scrobble tracks with multiple artists correctly

This is a limitation caused by the [Jellyfin webhook plugin](https://github.com/FoxxMD/multi-scrobbler/issues/70#issuecomment-1443804712) only sending the first artist to multi-scrobbler. This issues needs to be [fixed upstream on the Jellyfin webhook repository.](https://github.com/jellyfin/jellyfin-plugin-webhook/issues/166)

## Chromecast track information is missing/incorrect or MS player has weird times

The Chromecast integration relies on a few common fields in the data it receives from your casting device. Every platform that can cast (Spotify, Pandora, etc...) *should* use these fields the same but there are slight differences between their implementations that may confuse multi-scrobbler. Specific platforms may also return more information in non-common fields that are undocumented.

To diagnose these issues you [**must enable payload logging**](configuration/configuration.md#cast-troubleshooting) for your chromecast Source, run MS, and then include logs with this output from that run. Without the raw data logged from your cast device it will be nearly impossible to resolve your issue.
24 changes: 23 additions & 1 deletion docsite/docs/configuration/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ title: Overview
* [JRiver](#jriver)
* [Kodi](#kodi)
* [WebScrobbler](#webscrobbler)
* [Google Cast (Chromecast)](#google-cast--chromecast-)
* [Google Cast (Chromecast)](#google-cast--chromecast)
* [Client Configurations](#client-configurations)
* [Maloja](#maloja)
* [Last.fm](#lastfm)
Expand Down Expand Up @@ -703,6 +703,28 @@ If your media device can be **Cast** to using this button ![Chromecast Icon](htt

The machine and/or container running multi-scrobbler must be configured to allow [mDNS traffic on port 5353/UDP](https://book.hacktricks.xyz/network-services-pentesting/5353-udp-multicast-dns-mdns).

#### Cast Troubleshooting

Please include any/all logs with raw output if there are any errors encountered as this is critical to diagnosing issues.

To diagnose bad/incomplete track information or strange MS player behavior please turn on **payload logging** and include log output of the source running to help diagnose this issue:

```json5
// in chromecast.json or config.json sources
[
{
"name": "MyCast",
"type": "chromecast",
"data": {
//...
},
"options": {
"logPayload": true
}
}
]
```

### ENV-Based

| Environmental Variable | Required? | Default | Description |
Expand Down
4 changes: 4 additions & 0 deletions src/backend/sources/ChromecastSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ export class ChromecastSource extends MemorySource {
}
}

if(this.config.options.logPayload) {
this.logger.debug(`Media Status Payload:\n ${JSON.stringify(mediaStatus)}`);
}

const play = ChromecastSource.formatPlayObj(mediaStatus, {
deviceId: genDeviceId(k, application.displayName),
source: application.displayName
Expand Down

0 comments on commit 8c40223

Please sign in to comment.