Coder Social home page Coder Social logo

bum's Issues

cache_dir params not working?

Hi,
Thx for this good program, under archlinux i got with python3

โฏ bum --cache_dir=/home/cyril/.covers/
Traceback (most recent call last):
  File "/usr/bin/bum", line 11, in <module>
    load_entry_point('bum==0.1.3', 'console_scripts', 'bum')()
  File "/usr/lib/python3.7/site-packages/bum/__main__.py", line 69, in main
    song.get_art(args.cache_dir, args.size, client)
  File "/usr/lib/python3.7/site-packages/bum/song.py", line 34, in get_art
    file_name = cache_dir / file_name
TypeError: unsupported operand type(s) for /: 'str' and 'str'

A new release? :)

Hey there,

I'm looking to use bum to download album art covers and feed them into Conky. The master branch version of bum works fine for me with Conky, but the pypi version does not have this function.

Default image if no album art was found?

When I get the error "error: Couldn't find album art for ..." the last successfully downloaded album art is still the current.jpg in the cache folder which in most or many cases will not be the correct image.
It would be great to have a default image stating "no album art" for such cases.

song['album'] KeyError

song dictionary doesn't have to contain the key album (when the song doesn't belong to an album) which results in a KeyError in several places in the program.

'MPDClient' object has no attribute 'send_idle'

I just recently installed and gave it a test.

Whenever bum tries to switch cover art, it displays the following:

album: Using release-id: 098060d4-ba3c-469d-88b0-08642261c7ab
album: Swapped art to Daft Punk, Discovery.
Traceback (most recent call last):
  File "/usr/bin/bum", line 33, in <module>
    sys.exit(load_entry_point('bum==0.1.3', 'console_scripts', 'bum')())
  File "/usr/lib/python3.9/site-packages/bum/__main__.py", line 77, in main
    client.send_idle()
AttributeError: 'MPDClient' object has no attribute 'send_idle'```

My mpd client is ncmpcpp.

run error?

Hi

I could not install using pip3 for some pip errors on Debian testing. So I used the source "python3 setup.py install"

This is what I am getting when I try to run it.

Traceback (most recent call last):
File "/usr/local/bin/bum", line 11, in
load_entry_point('bum==0.1.3', 'console_scripts', 'bum')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2693, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2324, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2330, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 656, in _load_unlocked
File "", line 626, in _load_backward_compatible
File "/usr/local/lib/python3.6/dist-packages/bum-0.1.3-py3.6.egg/bum/main.py", line 14, in
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 656, in _load_unlocked
File "", line 626, in _load_backward_compatible
File "/usr/local/lib/python3.6/dist-packages/bum-0.1.3-py3.6.egg/bum/song.py", line 6, in
File "/usr/local/lib/python3.6/dist-packages/mpd.py", line 399
except socket.error, err:
^
SyntaxError: invalid syntax

Fails if song metadata does not contain an "album" property

In some cases a downloaded, single song (in this case, Dark all Day by GUNSHIP grabbed from BandCamp) may not have an "album" associated with it.

This causes a hard fail where it's assumed "album" exists, for example in brainz.py:

data = mus.search_releases(artist=song["artist"],
                           release=song["album"],
                           limit=1)

This can be fixed by using "title" in lieu of "album", and this seems to correctly fetch the album art too:

artist = song.get("artist")
title = song.get("title")
album = song.get("album", title)
data = mus.search_releases(artist=artist,
                           release=album,
                           limit=1)

I'm happy to do a PR to fix this, but can anyone think of instances where this might fail?

Port

The custom port is not working anymore.

Infinite loop on network failure

In brainz.py, if it fails to connect to musicbrainz.org it will immediately retry by recursively calling the get_cover function. This would effectively lock up the process, repeatedly hitting musicbrainz.org in case of network or service issues.

I've put together a naive fix for this, which you can find here- pimoroni@0dbe807

Would you be interested in a PR?

"Just once" mode

It would be nice to have a command line flag to avoid running bum as a server, and to only fetch the album artwork of the current track and then exit.

Add option for remote MPD server

Hey Dylan! It would be great to have the option to connect to a non-localhost server. I found localhost hardcoded into song.py, changing it to one of my MPD server IPs seems to work.

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.