I created Listy - a selfhosted Go application that automatically creates a monthly playlist on Spotify and syncs songs you like to it! reddit / selfhosted ---------------------------------------------------------------------- Dan6erbond2 · 2023-10-30 13:42 I wanted to share this small application I created that I have been wanting to build for a while, as I'm often listening to music in my car and forget to add songs that come up in radios/smart shuffle to my current monthly playlist. While Spotify might not be self-hosted, Listy is, and provides a simple Go API to authenticate with Spotify, and then a `sync` command to add all the songs you liked in the current month to a monthly playlist that follows the naming scheme `YYYY MM`. Once you've deployed Listy following the instructions on the [Gitea repo](https://gitea.ravianand.me/Dan6erbond/listy), all you need to do to get it going is head to http(s)://listy.example.com/auth/oidc/spotify/redirect where you will be redirected to Spotify for authorization, and then registered in Listy's database for monitoring. Listy is still a very simple application, but I plan to add some more features in the future to make it more customizable, and also add a management UI with admins to improve control over the instance. I'm hoping someone finds this useful and look forward to the community's feedback on this idea! ---------------------------------------------------------------------- amcco1 · 2023-10-30 19:38 Is there a demo or screenshots so we can see exactly what it does? ---------------------------------------------------------------------- Dan6erbond2 · 2023-10-30 19:44 No, there is no UI because it does exactly that one thing of monitoring your liked songs and adding them to a monthly playlist. Once you log-in with OAuth2 the monitoring starts. Later I might add a management UI where you can set the monitoring status, change the playlist title format, etc. but I kept the app simple because it's a tool for a rather specific use-case and not really a product with a clear direction. ---------------------------------------------------------------------- djlzn · 2023-10-30 23:17 Very nice - I do this manually since 2017. Same as you, sometimes I forget to add them to my playlist. I've automated other things, but not yet this one - nice work, I'll check it out soon. ---------------------------------------------------------------------- ayyser · 2023-11-03 20:41 panic: mongodbstore: error ensuring TTL index. Unable to list indexes: server selection error: server selection timeout, current topology: { Type: Unknown, Servers: [{ Addr: mongodb:27017, Type: Unknown, Last error: dial tcp: lookup mongodb on 127.0.0.11:53: server misbehaving }, ] } goroutine 1 [running]: gitea.ravianand.me/Dan6erbond/listy/core.NewApp() /app/core/app.go:53 +0x8c5 gitea.ravianand.me/Dan6erbond/listy/cmd.glob..func2(0xc00019ed00?, {0xbb6973?, 0x4?, 0xbb6977?}) /app/cmd/serverRun.go:23 +0x17 github.com/spf13/cobra.(*Command).execute(0x115d860, {0x1194780, 0x0, 0x0}) /go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x863 github.com/spf13/cobra.(*Command).ExecuteC(0x115d2a0) /go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3a5 github.com/spf13/cobra.(*Command).Execute(...) /go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992 gitea.ravianand.me/Dan6erbond/listy/cmd.Execute() /app/cmd/root.go:33 +0x1a main.main() /app/main.go:29 +0x36a having issues deploying this in docker docker-compose.yml version: "3.1" services: mongo: image: mongo:4.4.6 restart: always environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME:-listy} MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:-listypass123} ports: - 27017:27017 volumes: - /xx/xx/listy/.mongo:/data/db listy: image: gitea.ravianand.me/dan6erbond/listy command: ["/listy", "server", "run"] environment: MONGODB_URI: mongodb://${MONGO_USERNAME:- listy}:${MONGO_PASSWORD:-listypass123}@mongodb:27017 # volumes: # - config.example.yml:/etc/listy/config.yml env_file: stack.env ports: - 5091:5001 listy-sync: image: gitea.ravianand.me/dan6erbond/listy command: ["/listy", "sync", "-r", "5m"] environment: MONGODB_URI: mongodb://${MONGO_USERNAME:- listy}:${MONGO_PASSWORD:-listypass123}@mongodb:27017 env_file: stack.env # volumes: # - config.example.yml:/etc/listy/config.yml ---------------------------------------------------------------------- Dan6erbond2 · 2023-11-05 22:25 To be honest it looks like your MongoDB server isn't configured correctly based on the error message. Any errors in the container? ---------------------------------------------------------------------- ayyser · 2023-11-07 01:17 Im using the exact setup that you have in your docker compose, the mongo server is running. the other listy servers (sync and regular one) however are the one erroring and exiting hence the error code above ---------------------------------------------------------------------- Dan6erbond2 · 2023-11-07 17:18 Did you check the Mongo container for errors? That error you're getting from Listy points towards it not being able to connect to Mongo, meaning that Mongo is unreachable and in this case it seems to be because of a configuration issue. ---------------------------------------------------------------------- ayyser · 2023-11-08 17:02 no errors t={"$date":"2023-11-08T15:20:45.150+00:00"} s=I c=STORAGE id=22430 ctx=WTCheckpointThread msg=WiredTiger message attr={"message":"\[1699456845:150093\]\[1:0x7f6e662da700\], WT\_SESSION.checkpoint: \[WT\_VERB\_CHECKPOINT\_PROGRESS\] saving checkpoint snapshot min: 6882, snapshot max: 6882 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0)"} only difference i had to use mongo:4.4.6