Giter VIP home page Giter VIP logo

spotiply's Introduction

Spotiply

Python Code style: black GitHub contributors Forks Stargazers Issues MIT License

A Script that checks for your last liked songs on Spotify and adds it to a defined Playlist.

Table of Contents
  1. Installation
  2. Usage
  3. Configuration
  4. Contributing
  5. License

Installation

Use the Version Control System git to install Spotiply.

git clone https://github.com/Luffy404/Spotiply

After that install all required python Libraries that can be found in requirements.txt.

On Windows:

py -m pip install -r requirements.txt

On Linux:

python3 -m pip install -r requirements.txt

Then configure config.json. You will require a Client ID and Client Secret which you can obtain on the Developer Page of Spotify.

You need to create a new application and edit the Settings. Under "Redirect URIs" you'll need to add the REDIRECT_URI found in config.json (It's set to "http://localhost" by default).

Usage

Run main.py

On Windows:

py main.py

On Linux:

python3 main.py

After that follow the Instructions that may appear in the Script.

Configuration

  • "CLIENT_ID"
    • The client ID from Spotify
  • "CLIENT_SECRET"
    • The client secret from Spotify
  • "REDIRECT_URI"
    • The Redirect URI used by Spotify to authorize access.
  • "SCOPE"
  • "playlist_id"
    • The ID of the playlist that should get updated.
    • The ID is found in the URL if you copy your playlist.
    • If left empty or invalid a playlist will be generated.
  • "playlist_name"
    • This value will be the Name of the playlist.
      • This will only take effect if no playlist is found.
  • "playlist_description"
    • This value will be the description of the playlist.
      • This will only take effect if no playlist is found.
  • "max_songs"
    • This value will define how many tracks will be added to the playlist.
  • "refresh_time"
    • Time in minutes it waits until it compares the playlists.
  • "is_public"
    • Defines if the playlist is set public.
      • This will only take effect if no playlist is found.
  • "token_expiration"
    • Time in minutes the token will be valid.

Contributing

Pull requests, issue reports and feature requests are welcome. Any contributions are greatly appreciated.

License

MIT

spotiply's People

Contributors

luffy404 avatar dependabot[bot] avatar

Watchers

 avatar

spotiply's Issues

Remote end closed connection without response

Expected Behavior

The Script runs indefinetly.

Actual Behavior

After a certain period of time the Script crashes with following exception:

File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.10/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.10/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

Steps to Reproduce the Problem

  1. Run the Script
  2. Wait for a long period of time

Specifications

  • Python 3.10.5
  • Linux 4.15.0
  • Ubuntu 18.04.6 LTS x86_64

Tested on latest version of Project.

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.