Coder Social home page Coder Social logo

waltz's Introduction

Waltz

Transfer your playlists from Spotify to Youtube Music written in Go. Self hosted.

Usage

It's necessary to setup the API for Youtube and Spotify:

Spotify

Create a new project on developers.spotify.com. Make sure the redirect URI is: http://localhost:8080/auth/callback?provider=spotify. Add the client id and secret to the environment variables: SPOTIFY_ID, SPOTIFY_SECRET.

YouTube

Create a new project on console.cloud.google.com/. Under API & Services -> Credentials create a new OAuth Client Id, choose Web Application. Make sure the urls are these: google-1

Under API & Allowed Services add Youtube Data Api V3. Add the client id and secret to the environment variables: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET

Then just run the project with go run . and access the app on localhost:8080.

Limitations

Youtube gives a daily quota of 10.000 with each API call having a different cost. Currently for each playlist the operations costs are:

Operation Intent Cost
list playlists Find if playlist already exists 1
insert playlist Create playlist if it doesn't exist 50
list playlist items Get existing tracks to not insert repeated tracks 1 for every 50 tracks
search find videoId by name. Necessary to insert track 100
insert playlist item Creates the track on the playlist 50

Which is limited to around 66 tracks daily. Even if the read data comes from another source, like a scrapper, the number would improve to only 200 at best.

waltz's People

Contributors

paulombcosta avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.