Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

rpakishore/Jiosaavn_Download

Repository files navigation

This product is not maintained anymore - Refer to JiosaavnDownloader repo for an up-to-date solution.

logo

Jiosaavn Tamilsongs

Download playlists/songs from Jiosaavn


Table of Contents

1. About the Project

1.1. Features

  • Downloads Saavn songs directly from their servers
  • Captures all relevant metadata
  • Auto renames files to be {song name}-{album name}(Year).mp3 format
  • Used ffmpeg to auto transcode received files
  • Embeds highquality Album art to the mp3

2. Getting Started

2.1. Prerequisites

  • Python 3.9 or higher

2.2. Dependencies

2.2.1. JiosaavnAPI

You need to have the JiosaavnAPI flask api up and running to make use of this script.

The heroku app set up by the original developer can be used for this purpose but hosting your own docker container is highly recommended

To build your own docker image, use the following steps

  1. Clone the original repo
git clone https://github.com/cyberboysumanjay/JioSaavnAPI
cd JioSaavnAPI
  1. Create a Dockerfile in the JioSaavnAPI directory

    #Init a base image
    FROM python:3.6.1-alpine
    # Define current working directory
    WORKDIR /JioSaavnAPI
    # copy contents into the working dir
    ADD . /JioSaavnAPI
    RUN  python3.6 -m pip install --upgrade pip
    # run pip to install reqirements
    RUN  python3.6 -m pip install flit
    # Command to start the container
    CMD ["python3","app.py"]
  2. Build dockerimage

    docker image build -t jiosaavn .
  3. Create docker-compose.yml file

    ---
    version: "2.1"
    services:
      jiosaavn:
        image: jiosaavn
        container_name: jiosaavn
        ports:
          - <ip to expose>:5000
        restart: unless-stopped
    
  4. Spin up the container

    docker-compose up -d

2.2.2. Python dependencies

Create the virutual environment and install dependencies

python -m venv .venv

.venv\Scripts\activate.bat

pip install flit

flit install

3. Usage

Create a file userinput.json with the following formatting

{
  "ip":"<IP to access JiosaavnAPI wrapper>",
  "port":"<Port # for accessing JiosaavnAPI wrapper>",
  "Cache_file":"Jiosaavn_cache",
  "final_destination":"<Path to destination folder>",
  "default_playlists":{
    "Top Tamil Kuthu Songs":"https://www.jiosaavn.com/featured/top-kuthu---tamil/CNVzQf7lvT8wkg5tVhI3fw__",
    "Tamil Chartbusters": "https://www.jiosaavn.com/featured/tamil_chartbusters/1HiqW,xnqZRieSJqt9HmOQ__",
    "Tamil Weekly Top 20": "https://www.jiosaavn.com/featured/weekly_top_songs/x7NaWNE3kRw_"
  }
}

Then run the command to see possible options

jiosaavn --help
# To download a song
jiosaavn song --help

# To download a playlist
jiosaavn playlist --help

# To download all the playlists defined in `default_playlists` of `userinput.json` file
jiosaavn default --help

4. Roadmap

  • Delete all existing mp3 in current folder before start
  • Slack notifications
  • Allow individual song downloads
  • Support Gaana
  • Customize log levels

5. License

See LICENSE.txt for more information.

6. Contact

Arun Kishore - @rpakishore

Project Link: https://github.com/rpakishore/

7. Acknowledgements