Skip to content

akorzunin/dwman

Repository files navigation

Spotify_save_DW

Website: https://dwman.akorz-sw1.duckdns.org/

Test server: https://test-dwman.akorz-sw1.duckdns.org/

How it works

  • Spotify generate Discover Weekly playlist like this with unique tracks for each user.
  • But once playlist is regenerated all old track that you like in DW playlist will disappear
  • You can save them manually if you don't forget
  • OR use this service

How to use

  1. Press Save DW button to login with you Spotify account
  2. Now site listening you playback
  3. If current playlist is not a DW playlist this panel will be yellow enter image description here But don't worry it just an indicator enter image description here
  4. Now if you don't have Spotify Premium (that means site can't control user playback) you can quickly play all songs in playlist to add them to new playlist enter image description here
  5. When playlist start repeating itself a little dot will appear to indicate that you didn't lost any tracks enter image description here
  6. That's it! Just press Save button and playlist will be automatically created enter image description here

How to setup dev environment

Backend

Need python 3.10+, poetry 1.5+, caddy

git clone ...
poetry shell
poetry install
cp .env.example .env
  • setup .env values

  • copy/create test db

  • start python and caddy server\

    python src/main.py sudo caddy run --config .\caddy\dev\Caddyfile

Frontend

Instsall caddy, pnpm and task

npm install -g pnpm
npm install -g @go-task/cli

run task dw or task debug-web it will automatically spin up vite dev server at https://test-dwman.localhost/ and use test server as backend

Generate ts client

npx openapi-typescript-codegen --input http://localhost:8000/openapi.json --output ./src/frontend/src/api/client --client fetch && pre-commit run --all-files

License

DWMan is free and open-source software licensed under the Apache 2.0 License.