Coder Social home page Coder Social logo

darguima / spothack Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 24.99 MB

SpotHack is a project where you can convert your Spotify Playlists to .mp3 files in the respective folder. Download your favorites musics and playlists to listen when you are offline 🎧🎧

License: MIT License

JavaScript 0.22% TypeScript 95.25% Starlark 0.23% Java 2.34% Ruby 0.32% Objective-C 1.66%
playlists spotify downloader music react-native

spothack's Introduction

SpotHack

SpotHack is a project where you can convert your Spotify Playlists to .mp3 files in the respective folder. Download your favorites musics and playlists to listen when you are offline. SpotHack is also an open-source project so is possible anyone help since reporting bugs, writing code, documentation, giving ideas or just checking the homepage.

⭐ Don't forget to Starring ⭐

SpotHack


Table of Contents πŸ—ƒοΈ

Download & Installation πŸ“₯πŸ“²

You can download this App in the Releases or build the code with some changes that you may want.

How it works? βš™βš™

After you select your music or playlist our Download Machine will, with the YouTube Scraper or the YouTube API, search for the music video, with the query starting with the artists name followed by the track name. Once we get the YouTube ID we can download the music video and convert it to .mp3 with ffmpeg.

Getting Started πŸš€

Prerequisites

  • Git to clone the repository;

  • Yarn to install dependencies;

  • For run the project you will need the React Native Environment configured. You can follow the ReactNative Official Documentation;

Note: This project was only tested and developed for Android, so I don't know if it works properly in IOS. Is recommended that you run it in an Android Phone;
Cloning
$ git clone https://github.com/Darguima/SpotHack.git
Installing Dependencies
$ yarn
Set credentials for third-party APIs πŸͺͺ

This App use 2 third-party APIs:

  • Spotify Api (Web Api)
  • Youtube Api (YouTube Data API v3)

You can save this credentials in a .env file or input them directly on the App. To get the required credentials you can follow our tutorial.

Setup πŸ› οΈ

  • To setup the application you can use:
yarn start
yarn android

At this moment you should have a Android Emulator with SpotHack running

Building the APK

Generate a KeyStore πŸ”‘

Fill in the required inputs (and remember the password):

$ keytool -genkey -v -keystore android/app/spothack.keystore -alias spothack -keyalg RSA -keysize 2048 -validity 10000

Edit the gradle ✏️

Edit the file android/app/build.gradle, changing storePassword and keyPassword to the previous password.

Assemble πŸ§‘β€πŸ­

cd android
./gradlew assembleRelease
Based on this tutorial.

API CredentialsπŸͺͺ

For store the credentials you can create a file .env with the next structure or you can input the credentials directly in the App, on Login Screen.

SPOTIFY_CLIENT_ID= ...
SPOTIFY_CLIENT_SECRET= ...
YOUTUBE_API_KEY= ...

Spotify

As the entire App is based on Spotify's repertoire, it is required have access to their API, or in others words: a Client Id and a Client Secret. To get this tokens you can follow the next tutorial:

  1. Access the Spotify Developer Dashboard.

  2. Login with any Spotify Account.

  3. Click on Create App (name of your choice).

  4. Edit the Settings - add com.darguima.spothack://oauthredirect to Redirect URIs

  5. Go to Users and Access > Add new user and fill in with your users accounts.

  6. Now you are able to copy the Client ID and the Client Secret

spotifyCredentails.mp4

YouTube

Unlike Spotify, YouTube API is not essential for the App flow, so you can omit this key without problems, but if for some reason the YouTube Scrape Server is not working, this can be a plan B for Music Download. To get the API Key is a little more complicated than Spotify; Follow the next steps:

  1. Access the Google Cloud Platform Console.

  2. Login with any Google Account.

  3. Click on Select a Project > New Project.

  4. Create a project with a name of your choice and Select it.

  5. Select in Navigation Menu > APIs and services > Library

  6. Search and Enable YouTube Data API v3

  7. Go to OAuth consent Screen and select External > Create, then fill in the required inputs and continue to the end.

  8. Go to Credentials and click Create Credentials > API key. Now you can copy the key!

YoutubeCredentials.mp4

Pages/Features πŸ“š

Login Page

  • Enter your APIs tokens (if not configured on APK building).
  • Login !!

Home Page

  • Shortcuts to "Outdated Playlists", "Downloads Manager", "Settings Page" and others ...

Search Pages

  • Search for your favorite musics and playlists.
  • Download them !!

Download Page

  • Follow the download status of your musics.
  • Know about the errors.

Settings Page

  • Change the "Root Path", "Download Default Source", "Music Time Limit", and the Render Mode.

Outdate Playlist Page

  • Follow your playlist Status.
  • Download the news musics.
  • Delete the old ones.

Add Playlist Page

  • Reference a Playlist to a folder, if we can't do it.

Technologies Used πŸ’»


🚨 Disclaimer 🚨

This project can be considered a piracy service to download music. No source code here was used in production, nor was it ever used with the idea of making money. I only disposed of the code as open source because this is a study project. If you want to use it as a service, use it at your own risk, but remember that artists and publishers are likely to own the downloaded music.

License πŸ‘¨πŸΎβ€βš–οΈ

This project is licensed under the MIT License - see the LICENSE file for details.

spothack's People

Contributors

darguima avatar

Stargazers

Mickael H. G. avatar Ioan avatar Omar Said Ibrahim avatar Edgar AraΓΊjo avatar Saad Azghour 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.