Git Product home page Git Product logo

genius-lyrics's People

Contributors

airdrummingfool avatar caraar12345 avatar gonzotek avatar kkpanaz avatar robert-alfaro avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

genius-lyrics's Issues

Having trouble with the integration

Hi,

I logged into the api with my email and I created an app and copied the access token but when I saved the configuration file it does not create a sensor like the documentation says.

I tried adding the lovelace card and it says something about the media player entity missing.

I tried refreshing the token, creating a new app and even logging in with a google account instead.

Can anyone help?

System Health

version core-2021.9.7
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.10.17-v8
arch aarch64
timezone America/New_York
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 3634
Installed Version 1.18.0
Stage running
Available Repositories 913
Installed Repositories 22
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 6.4
update_channel stable
supervisor_version supervisor-2021.10.8
docker_version 20.10.7
disk_total 28.6 GB
disk_used 8.4 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok
installed_addons File editor (5.3.2), Terminal & SSH (9.1.3), AirCast (3.1.1), AdGuard Home (4.2.0), eufy_security_addon (0.3.3)
Lovelace
dashboards 3
resources 14
views 6
mode storage
Spotify
api_endpoint_reachable ok

No 'version' key in the manifest file

ERROR (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'genius_lyrics'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'genius_lyrics'

Still working?

Hello,
Thanks for this component it is awesome.
The problem I have, since 2022.7 HA, it's that I don't get any lyrics.
I tried to reinstall the custom component but, the same problem...
This is the error I get in HA log:

Logger: homeassistant.helpers.entity
Source: custom_components/genius_lyrics/sensor.py:211
Integration: Genius Lyrics (documentation)
First occurred: 11:36:16 (7 occurrences)
Last logged: 11:57:56

Update for sensor.volumio_lyrics fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in async_device_update
raise exc
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/genius_lyrics/sensor.py", line 119, in update
self._genius.fetch_lyrics()
File "/config/custom_components/genius_lyrics/sensor.py", line 211, in fetch_lyrics
song = self.__genius.search_song(self.__title, self.__artist, get_full_info=False)
File "/usr/local/lib/python3.10/site-packages/lyricsgenius/genius.py", line 436, in search_song
lyrics = self.lyrics(song_url=song_info['url'])
File "/usr/local/lib/python3.10/site-packages/lyricsgenius/genius.py", line 131, in lyrics
html = BeautifulSoup(
File "/usr/local/lib/python3.10/site-packages/bs4/init.py", line 228, in init
self._feed()
File "/usr/local/lib/python3.10/site-packages/bs4/init.py", line 289, in _feed
self.builder.feed(self.markup)
File "/usr/local/lib/python3.10/site-packages/bs4/builder/_htmlparser.py", line 215, in feed
parser.feed(markup)
File "/usr/local/lib/python3.10/html/parser.py", line 110, in feed
self.goahead(0)
File "/usr/local/lib/python3.10/html/parser.py", line 178, in goahead
k = self.parse_html_declaration(i)
File "/usr/local/lib/python3.10/html/parser.py", line 269, in parse_html_declaration
self.handle_decl(rawdata[i+2:gtpos])
File "/usr/local/lib/python3.10/site-packages/bs4/builder/_htmlparser.py", line 160, in handle_decl
self.soup.endData(Doctype)
File "/usr/local/lib/python3.10/site-packages/bs4/init.py", line 365, in endData
self.object_was_parsed(o)
File "/usr/local/lib/python3.10/site-packages/bs4/init.py", line 370, in object_was_parsed
previous_element = most_recent_element or self._most_recent_element
File "/usr/local/lib/python3.10/site-packages/bs4/element.py", line 1054, in getattr
return self.find(tag)
File "/usr/local/lib/python3.10/site-packages/bs4/element.py", line 1292, in find
l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
File "/usr/local/lib/python3.10/site-packages/bs4/element.py", line 1313, in find_all
return self._find_all(name, attrs, text, limit, generator, **kwargs)
File "/usr/local/lib/python3.10/site-packages/bs4/element.py", line 528, in _find_all
strainer = SoupStrainer(name, attrs, text, **kwargs)
File "/usr/local/lib/python3.10/site-packages/bs4/element.py", line 1610, in init
self.text = self._normalize_search_value(text)
File "/usr/local/lib/python3.10/site-packages/bs4/element.py", line 1615, in _normalize_search_value
if (isinstance(value, str) or isinstance(value, collections.Callable) or hasattr(value, 'match')
AttributeError: module 'collections' has no attribute 'Callable'

Any help?

Feature request: album art url as attribute

Love this integration and I hope it can be just a bit more awesome with this:
Currently the lyrics entity has the following attributes:
media_artist:
media_title:
media_lyrics:
friendly_name:

Would it be possible to add one more attribute with the url to the album art? On genius.com I find next to the lyrics also an image of the album art, like this one https://t2.genius.com/unsafe/327x327/https%3A%2F%2Fimages.genius.com%2Ff1f8afb7f05089e0c2f1e2fd234c37c1.1000x998x1.jpg
which is from this song https://genius.com/Supertramp-breakfast-in-america-lyrics

I (and perhaps other people also) would like to display this album art on the dash.
Many thanks for still supporting this integration.

Service not working

The service genius_lyrics.search_lyrics is not working.
It gives me unknown error everytime i try to call it.

This is the way i try to use it:

Schermata 2022-01-21 alle 12 35 33

I am running HA OS 2021.12.10 on a RaspBerry pi 4

error calling service

first -- awesome custom component. I was just going to sit down and write one myself and saw yours! Excited to get it up and running...

I have the component added and configuration in place -- on restart the "lyrics sensor" is auto created, but when a new song is started, the lyrics remain "null". Artist and Title attributes populate on the "lyrics sensor", but the lyrics do not.

In the logs, each new song invokes this error: "Missing artist and/or title", but like i noted above, the sensor does have correct information pulled from the media_player.

When I try and invoke the service from dev tools with the example JSON data in github ("Mind of a King"), I get a different error: "search_lyrics. 'bool' object is not callable":

Failed to call service genius_lyrics/search_lyrics. 'bool' object is not callable
'bool' object is not callable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1236, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1263, in _execute_service
    await self._hass.async_add_executor_job(handler.func, service_call)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
TypeError: 'bool' object is not callable

`<song title> Lyrics` included at the start of lyrics

Hello! Just a quick one - I've just installed genius-lyrics - and it's fantastic!

The one thing I've noticed though - it's prepending <song title> Lyrics to the start of the lyrics which looks a tad strange.

I'm not sure if it's an issue with the underlying lyricsgenius library but being as I've only used it here, I didn't think it fair to raise an issue there first ๐Ÿ˜„

Screenshot 2022-03-18 at 11 42 11

Using tracking instead of automations

Supplying the platform with a list of media_player entities would enable tracking of each player to allow the genius-lyrics component to automatically search content and update sensors. Additionally, the sensors can be created from the platform instead of user created template sensors.

Entry in HA logfile asks to be reported

Hi, I found this entry in the Home Assistant log file asking to be reported to the author. I believe that means I have to create this ticket here.

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:583
First occurred: 09:10:21 (3 occurrences)
Last logged: 09:10:21

Entity sensor.keuken_lyrics (<class 'custom_components.genius_lyrics.sensor.GeniusLyricsSensor'>) implements device_state_attributes. Please report it to the custom component author.

anyone else having trouble?

Had this working a few days ago but had to rebuild some stuff and lost it. During the rebuild, I did update to core-2022.4.1 so that may have played a part in my troubles. I'm still fairly new at this so it is also possible I'm overlooking something obvious.

Logger: homeassistant.helpers.template
Source: helpers/template.py:1828
First occurred: 11:38:37 AM (72 occurrences)
Last logged: 11:47:55 AM

Template variable warning: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'media_artist' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}'
Template variable warning: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'media_title' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}'
Template variable warning: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'media_lyrics' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}'

Logger: homeassistant.helpers.template
Source: helpers/template.py:1840
First occurred: 11:33:09 AM (6 occurrences)
Last logged: 11:33:09 AM

Template variable error: 'None' has no attribute 'attributes' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}'
Template variable error: 'None' has no attribute 'attributes' when rendering '## {{ states.sensor.kitchen_lyrics.attributes.media_artist }} - {{ states.sensor.kitchen_lyrics.attributes.media_title }} {{ states.sensor.kitchen_lyrics.attributes.media_lyrics }}'

doesn't work

hi,
version 0.155.2
dosent work.
will not generate the foomedia player

Genius integration stopped working

In the latest release of the core, core 2021.6.3, genius-lyrics integration stopped working. I had to remove the genius configuration linesfrom the configuration.yaml to restart the server.

Improvement: Increase success rate by ignoring songtitle part after a hyphen

First of all I want to express my gratitude for the creator of this very nice piece of software. I have used it now for a year or so and love it.

I do get a fair number of false hits, where quite common songs are not found in the genius database. Instead it finds some non song text pieces of text which appear book chapters or lists. I noticed this is almost always the case when the song title had a hyphen "-" followed by some text like "live at..." or "featuring...", "Remastered", etc. When searching manually on the Genius webpage, I get the same results.

I think if the software uses only the first part of the song title until the hyphen, and would ignore the rest, the success rate of finding a proper song text would increase a lot.

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.