Spotify to Plex

A web application that synchronizes Spotify playlists with Plex and can download missing tracks through supported integrations.

Not yet tested media Based on TrueNAS app v1.0.6 (Spotify to Plex 1.0.111)
  1. 1
    Copy the script below
  2. 2
    In HexOS, open Apps, find Spotify to Plex and choose Custom Install
  3. 3
    Paste, then press Install — full guide with screenshots
spotify-to-plex.json
Download
1{
12  "version": 5,
23  "script": {
4    "version": "0.1.0",
5    "changeLog": "Auto-generated draft from TrueNAS spotify-to-plex 1.0.6"
6  },
37  "installation_questions": [
8    {
9      "question": "Spotify api client id",
10      "type": "text",
11      "key": "spotify_api_client_id",
12      "required": true
13    },
14    {
15      "question": "Spotify api client secret",
16      "type": "password",
17      "key": "spotify_api_client_secret",
18      "required": true
19    }
20  ],
21  "requirements": {
422    "locations": ["ApplicationsPerformance", "Media"],
523    "specifications": ["2CORE"],
624    "permissions": ["READ_WRITE_LOCATIONS"],
725    "ports": [30468]
26  },
827  "ensure_directories_exists": [
28    {"path": "$LOCATION(ApplicationsPerformance)"},
29    {"path": "$LOCATION(ApplicationsPerformance)/spotify-to-plex"},
30    {"path": "$LOCATION(Media)", "network_share": true},
31    {
32      "path": "$LOCATION(ApplicationsPerformance)/spotify-to-plex/config",
33      "snapshot": {"id": "config"}
34    }
35  ],
36  "app_values": {
37    "spotify_to_plex": {
938      "spotify_api_client_id": "$QUESTION(spotify_api_client_id)",
1039      "spotify_api_client_secret": "$QUESTION(spotify_api_client_secret)",
1140      "encryption_key": "$RANDOM_STRING(32)"
41    },
42    "storage": {
1243      "config": "$HOST_PATH($LOCATION(ApplicationsPerformance)/spotify-to-plex/config)",
1344      "additional_storage": [
45        "$MOUNTED_HOST_PATH($LOCATION(Media), /media)"
46      ]
47    },
48    "network": {
1449      "web_port": {"bind_mode": "published", "port_number": 30468}
50    },
1551    "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
52  }
53}

What this script does

Hover or tap a box to see the lines it explains.

  1. Script format

    Tells HexOS this is a version 5 install script, so it knows how to read the rest.

    Line 2

  2. Script revision

    This copy of the script is revision 0.1.0. Latest change: “Auto-generated draft from TrueNAS spotify-to-plex 1.0.6”.

    Lines 3–6

  3. Questions you'll be asked

    Before installing, HexOS will ask you for: Spotify api client id and Spotify api client secret. Your answers are slotted into the settings further down wherever you see $QUESTION(...).

    Lines 7–20

  4. Storage locations it needs

    The app uses these HexOS storage locations: App storage (fast) and Media. If one isn't set up yet, HexOS will ask you to pick a place for it.

    Line 22

  5. Minimum hardware

    Recommended minimum: 2 CPU cores.

    Line 23

  6. Permission to use your folders

    Allows the app to read and write files inside the storage locations listed above — and nowhere else.

    Line 24

  7. Network ports

    The app needs port 30468 to be free on your server. A port is like an apartment number for your server's address.

    Line 25

  8. Folders created on install

    Creates the folders the app needs before it starts: App storage (fast) › spotify-to-plex and App storage (fast) › spotify-to-plex › config. Folders marked “snapshot” are included in HexOS snapshots, so you can roll them back.

    Lines 27–35

  9. Your answer: spotify api client id

    Filled in with what you typed for “spotify api client id” when you installed.

    Line 38

  10. Your answer: spotify api client secret

    Filled in with what you typed for “spotify api client secret” when you installed.

    Line 39

  11. Auto-generated encryption key

    HexOS makes up a long random encryption key during install. It's only used inside Spotify to Plex, so you never need to know it.

    Line 40

  12. Where the app's settings is saved

    Where the app's settings is saved on your server: App storage (fast) › spotify-to-plex › config.

    Line 43

  13. Your shared folders

    Gives the app access to your existing files: Media appears inside the app as /media.

    Lines 44–46

  14. Web port: 30468

    The app's web page is published on port 30468. You don't need to remember it — clicking the app's card in HexOS takes you there.

    Line 49

  15. Resource limits

    Caps how much of your server the app can use: 2 CPU cores and 10% of your server's memory, but never more than 4 GB. This keeps one busy app from slowing everything else down.

    Line 51