Giter Club home page Giter Club logo

sptnr's Introduction

Hi there 👋

sptnr's People

Contributors

krestaino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

basdp

sptnr's Issues

Exceptions and server errors aren't handled gracefully

When a call fails, it throws an exception to the user. For instance:

  Album: Star Wars, Episode II: Attack of the Clones (8925ee19b2c751dde5ff30a8d854d131)
    p:36 → r:2 | Star Wars Main Title / Ambush on Coruscant
    p:34 → r:2 | Across the Stars (Love Theme From Attack of the Clones)
    p:33 → r:1 | Zam the Assassin / The Chase Through Coruscant
    p:36 → r:2 | Yoda and the Younglings
    p:35 → r:2 | Departing Coruscant
    p:38 → r:2 | Anakin and Padmé
    p:34 → r:2 | Jango’s Escape
    p:34 → r:2 | The Meadow Picnic
    p:35 → r:2 | Bounty Hunter’s Pursuit
    p:34 → r:2 | Return to Tatooine
    p:30 → r:1 | The Tusken Camp / The Homestead
    p:48 → r:2 | Love Pledge / The Arena
    p:38 → r:2 | Confrontation With Count Dooku / Finale
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 790, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 461, in getresponse
    httplib_response = super().getresponse()
  File "/usr/local/lib/python3.9/http/client.py", line 1377, in getresponse
    response.begin()
  File "/usr/local/lib/python3.9/http/client.py", line 320, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.9/http/client.py", line 289, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

I would expect the call to be retried on exception, and ultimately, if an exception occurs more than once for a track/album, skip it and continue.

An exponential backoff for retrying would also be cool. Especially when you get rate-limited or the Spotify servers/Navidrome is overloaded.

Request: remember state, continue when restarted

I would like sptnr to continue where it left off when I restart it. I get a lot of Spotify Error: Unable to reach server. (every 10 min), so it's quite hard and time consuming to manually specify how and where to continue.

Also, incremental updates (only add ratings to new albums) would be possible then (or at least desirable!)

Store audio features instead of popularity

Hi, really cool tool, thanks for sharing!

I DJ as a hobby and I've heard of DJs using the star rating system to determine track energy.

Spotify has an audio features API which has information such as energy, and danceability.

It would be cool if your tool would allow you to set which datapoint is stored as a star rating.

This would be even more useful if the rating is stored in the file metadata and not just the Navidrome DB as you could utitilise it in DJ software.

Would you be open to this?
Thanks!

Local id3 Ratings

Would it be possible to modify this to pull the ratings from the mp3 files themselves?

Bad request

[2024-01-30 13:09:29,115] Artist: Sufjan Stevens (e049ea728448edb9b984240c55c373b1)[0]
...
[2024-01-30 13:09:59,606] Album: Illinois (cfa973f1bd6ead56f225c60f56d1218a)
[2024-01-30 13:10:00,139] p:55 → r:3 | Concerning the UFO Sighting Near Highland, Illinois
[2024-01-30 13:10:00,500] Spotify Error 400: {
"error" : {
"status" : 400,
"message" : "Bad request."
}
}

i thinks this happend because the song name is too long:The.Black.Hawk.War,.or,.How.to.Demolish.an.Entire.Civilization.and.Still.Feel.Good.About.Yourself.in.the.Morning,.or,.We.Apologize

exec format error

Hi, I'm trying to deploy the docker-compose.yml, but I'm getting exec error.
My compose looks like this

version: "3.8"

services:
  sptnr:
    container_name: sptnr
    image: krestaino/sptnr:latest
    environment:
      - NAV_BASE_URL=https://xxx.xxx.xxx
      - NAV_USER=xxxxxxxx
      - NAV_PASS=xxxxxxxx
      - SPOTIFY_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      - SPOTIFY_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    volumes:
      - /srv/dev-disk-by-uuid-5b67514d-485e-4306-873e-b1cbb54ccf99/Config/sptnr/logs:/usr/src/app/logs
      
networks:
  omv1:
    external: true

I have added omv1 network because I have not enough non-overlapping IPs.
The first time I ran it I got:

root@openmediavault:~# root@openmediavault:~# docker-compose run sptnr
WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true
[+] Running 9/9
 ✔ sptnr 8 layers [⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                               12.3s
   ✔ 24e221e92a36 Pull complete                                                                                    1.1s
   ✔ 6b9513afbd99 Pull complete                                                                                    0.6s
   ✔ 55ea35dd0432 Pull complete                                                                                    0.9s
   ✔ e544e6fd47b5 Pull complete                                                                                    1.0s
   ✔ 9f311383358c Pull complete                                                                                    1.4s
   ✔ 471c37cf8014 Pull complete                                                                                    3.4s
   ✔ 261624c2de83 Pull complete                                                                                    3.0s
   ✔ 9b17a06ed32b Pull complete                                                                                    2.3s
exec /usr/local/bin/python: exec format error

I fixed the syntax of omv1 network like above (some apps want it in a way, some others in another) and in this case all I get is:

root@openmediavault:~# docker-compose run sptnr
exec /usr/local/bin/python: exec format error

Also tried to add /music to my Navidrome address AND local IP instead of public domain with same result.

EDIT I'm on Open Media Vault 6 x86.

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.