Giter Club home page Giter Club logo

llyrics's Introduction

lLyrics

lLyrics is a plugin for Rhythmbox, which displays lyrics for the current playing song in the sidebar.

It is intended as a replacement of the built-in lyrics plugin of Rhythmbox with more features, better UI integration and more lyrics engines.

Screenshot

Lyrics sources

  • Lyricwiki.org
  • Letras.terra.com.br
  • Vagalume.com.br
  • Metrolyrics.com
  • AZLyrics.com
  • Lyricsnmusic.com
  • Lyricsmania.com
  • Genius.com
  • Darklyrics.com
  • Chartlyrics.com

It is also possible to retrieve lyrics from the built-in Rhythmbox lyrics plugin, but this is not recommended since it has some bugs and may cause instabilities.

Requirements

The 'master' branch supports Rhythmbox 3.0 and above. It is incompatible with older Rhythmbox 2.xx versions!

To get the plugin for Rhythmbox 2.xx, change to branch 'RB2'! It provides the last version compatible with Rhythmbox 2.xx, but please note, that it will not be updated or developed any further.

To install lLyrics from source you will need the package gettext.

Dependencies

lLyrics can be run without the need of any additional packages, but it is recommended to install the python module "chardet" for better handling of different encodings.

Installation

Ubuntu & derivates: PPA

In Ubuntu based distribution, you can install this plugin via this PPA by fossfreedom.

Archlinux: AUR

Archlinux user can install the plugin via this AUR package.

Manual installation

1.) Press the "Download ZIP" button and extract the .zip file.

2.) Change to the extracted folder and open a terminal.

3.) Run `make install`.

4.) Enable the plugin in Rhythmbox.

It will ask for your sudo password, but don't worry, it is only required to install the schema file that is needed to save your preferences.

If you want to install the plugin systemwide for all users, run make install-systemwide in step 3.

To uninstall, run make uninstall.

Note that you need Rhythmbox version 2.90 or higher to run lLyrics!

Features

  • Support for a lot of different lyrics sites (see above)
  • Integration into the Rhythmbox UI
  • Lyrics sources can be prioritised and deactivated
  • Automatically display lyrics on playback or only on-demand
  • Save retrieved lyrics to a file (can be deactivated)
  • Possibility to edit lyrics
  • Correct artist/title tag via Last.fm API for better results
  • Appearance customizable to adapt to your desires or your available screen space
  • Basic support for synchronized lyrics
  • more...

Credits

I was inspired by the awesome Songbird plugin MLyrics. Thanks to all who contribute, report issues or help in any other way to make this plugin better.

You will always find the latest version on GitHub. Please report bugs, issues or feature requests there.

Help with translations is always appreciated!

All lyrics are property and copyright of their owners.

llyrics's People

Contributors

dmo60 avatar fossfreedom avatar hamedafra avatar ns-ian avatar saviocmc avatar swistak35 avatar umlautaxl avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

llyrics's Issues

Can you make the artist name key optional?

This plugin would be very useful for our band practice if the lyric search was only on the song name and not on the artist as well; we do a lot of standards and so searching Moonglow, for example, is going to get a lot of hits, whereas if the artist field is either our own (from rehearsal or concerts) or MM1 files, ILyrics will come up empty on even the most popular song.

It would also be useful if the song title match was a little fuzzy, so "Misty (alt take)" would match Earl Garner's Misty as sung by anyone, ignoring the parenthetical annotation.

Sidebar size

Hello. Is there any way to save the sidebar's size to make it constant for every Rhythmbox start? Now it always has one width at every launch, but it's not the width I want, and it's kinda annoying. I use lLyrics plugin along with the RhythmTray plugin, and every time I minimize Rhythmox and then open it, it works like it was just started, and width of the lLyrics plugin's sidebar is too small. Maybe I can save the appropriate width somewhere, so it will always be the same?

Crash with UnicodeDecodeError

I use version 0.4-1ubuntu2 of your plugin. And it's great, but I recently stumbled upon a problem which leads to a crash of not only the plugin but rhythmbox as well.

It seems to be a problem with certain characters:

/usr/lib/python2.7/dist-packages/chardet/universaldetector.py:69: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if aBuf[:3] == '\xEF\xBB\xBF':
/usr/lib/python2.7/dist-packages/chardet/universaldetector.py:72: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif aBuf[:4] == '\xFF\xFE\x00\x00':
/usr/lib/python2.7/dist-packages/chardet/universaldetector.py:75: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif aBuf[:4] == '\x00\x00\xFE\xFF':
/usr/lib/python2.7/dist-packages/chardet/universaldetector.py:78: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif aBuf[:4] == '\xFE\xFF\x00\x00':
/usr/lib/python2.7/dist-packages/chardet/universaldetector.py:81: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif aBuf[:4] == '\x00\x00\xFF\xFE':
/usr/lib/python2.7/dist-packages/chardet/universaldetector.py:84: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif aBuf[:2] == '\xFF\xFE':
/usr/lib/python2.7/dist-packages/chardet/universaldetector.py:87: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif aBuf[:2] == '\xFE\xFF':
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 761, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/rhythmbox/plugins/llyrics/lLyrics.py", line 908, in _scan_all_sources_thread
    self.show_lyrics(self.artist, self.title, lyrics)
  File "/usr/lib/rhythmbox/plugins/llyrics/lLyrics.py", line 994, in show_lyrics
    self.textbuffer.set_text("%s - %s\n%s" % (artist, title, lyrics))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 15: ordinal not in range(128)

Killed

artists, albums or titles with non-ascii chars

]dad@dad-VirtualBox:~/.local/share/rhythmbox/plugins/artdisplay_browser$
(rhythmbox:7562): GLib-GObject-CRITICAL *_: g_value_get_uint: assertion `G_VALUE_HOLDS_UINT (value)' failed
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(_self.__args, **self.__kwargs)
File "/home/dad/.local/share/rhythmbox/plugins/lLyrics/lLyrics.py", line 610, in _scan_all_sources_thread
self.show_lyrics(self.artist, self.title, lyrics)
File "/home/dad/.local/share/rhythmbox/plugins/lLyrics/lLyrics.py", line 681, in show_lyrics
self.textbuffer.set_text(artist + " - " + title + "\n" + lyrics)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

Ok ... listening to a bit of celine dion - she has an accent character in both her name and her album title - possible other artists may have similar non-ascii chars in the title.

The experimental llyrics throws the above error.

Not sure though were in the code you would do stuff like:

title = unicode( entry.get_string(RB.RhythmDBPropType.TITLE ), 'utf-8' )
artist = unicode( entry.get_string(RB.RhythmDBPropType.ARTIST ), 'utf-8' )

or

track.get_title().encode('utf-8'), track.get_artist().encode('utf-8') type statements to fix these sorts of issues.

There seems to be lots of little functions that extensively use artist & title as parameter - so potentially could all be "affected".

Any ideas?

RB3 interface hangs as soon as lyrics are not found

Hello,

I just tried the latest version of lLyrics with Rhythmbox 3.0.2, on Ubuntu 14.04.

The plugin seems to be working fine, until RB plays a song whose lyrics can't be found in any source. Then it seems to search for lyrics forever and makes the interface hang every 10 seconds. This goes on even when playing the next songs (whose lyrics can be found).

After disabling the plugin, the console prints a long list of output, made up of those three errors, repeating themselves over and over:

Traceback (most recent call last):
  File "/usr/lib/rhythmbox/plugins/lLyrics/lLyrics.py", line 782, in set_displayed_text
    self.textbuffer.set_text(text)
AttributeError: 'NoneType' object has no attribute 'set_text'

Traceback (most recent call last):
  File "/usr/lib/rhythmbox/plugins/lLyrics/lLyrics.py", line 445, in set_menu_sensitive
    for item in self.menu:
TypeError: 'NoneType' object is not iterable

Traceback (most recent call last):
  File "/usr/lib/rhythmbox/plugins/lLyrics/lLyrics.py", line 932, in show_lyrics
    self.textbuffer.set_text("%s - %s\n%s" % (self.artist, self.title, lyrics))
AttributeError: 'NoneType' object has no attribute 'set_text'

no toolbar icon

Cosmetic issue I know...

I've got a number of third-party plugins - some of them like lLyrics just have the default round "i" blue toolbar icon.

Thus its slightly confusing to see different plugins with the same icon - the only way to distinguish is to hover over the icon to see the popup description.

Lirics for radio songs

I have one question, ILyrics should show lyrics also for songs listened on radio streaming ? Does it depend on informations sent by the radio? Is yes, title is sent but lyrics do not show up.

For synchronized lyrics file, can highlight current playing lyrics line?

I modified your code.

  1. add a chinese search engine: sogou, which can download synchronized lyrics
  2. handle multi-byte encoding lyrics file, such as chinese GB18030 (because i use windows too, my lyics file downloaed in win is gb18030 encoding, and the chinese sogou search engine use gb18030 encoding too)
  3. lyrics file parser, detect lyrics type: whether plain text or synchronized lyrics with time tag
    plain text lyrics: return content
    synchronized lyrics: return time tag list and sorted content
    [01:01.01]aaa
    [02:02.02][04:04.04]bbb
    [03:03.03]ccc
    time tag list: [ [01:01.01], [02:02.02], [03:03.03], [04:04.04] ] converted to millisecond
    content: aaa\n\bbb\n\ccc\n\bbb (also can be a list)

my modified code is here(very ugly, most is copied from the lrcshow-X source code):
https://docs.google.com/open?id=0B3PQVSbgct7wQVZsSWZ2LUw5cGc

Now, there is the final problem. For synchronized lyrics file, can the viewer highlight current playing lyrics line? (I haven't study gtk until now)

API to display lyrics on-demand

As an aside - do you have an API I can call to display lyrics on-demand? I was thinking of adding a right-click menu option to CoverArtBrowser to call your lyrics plugin and display etc - just wondering if its possible without having to play the album & tracks.

Maybe a class with a signal which I can import & connect to.

I'll throw track title, artist etc on an "emit" signal. The lyrics plugin will initiate the same lyrics search and display as it does currently with a song-change.

Unable to install - make fails

When trying to install using the command make install I get the following error. What am I missing ?

Installing schema...
[sudo] password for unique: 
... done!
Installing locales...
de.po
/bin/sh: 5: msgfmt: not found
fr.po
/bin/sh: 5: msgfmt: not found
pl.po
/bin/sh: 5: msgfmt: not found
Makefile:35: recipe for target 'locales' failed
make: *** [locales] Error 127

Error loading plugin 'lLyrics'

I am running Debian Jessie with Rythmbox 3.1. Whether I try to install lLyrics after cloning with make install or make install-systemwide, it appears in Rythmbox's plugin dialog, but when I try to enable it the green puzzle piece icon turns into a red stop sign and hovering over it displays:

The plugin 'lLyrics' could not be loaded.
An error occured: Failed to load.

Output from installation (same for make install except other path at bottom):

$ make install-systemwide
[sudo prompt]
Installing schema...
... done!
Installing locales...
de.po
./lLyrics/locale/de.po:7: warning: header field 'Project-Id-Version' still has the initial default value
fr.po
./lLyrics/locale/fr.po:7: warning: header field 'Project-Id-Version' still has the initial default value
pl.po
./lLyrics/locale/pl.po:7: warning: header field 'Project-Id-Version' still has the initial default value
... done!
Installing plugin files to /usr/lib/rhythmbox/plugins/ ...
Done!

I checked that files get copied over appropriately. I also tried using https://github.com/dmo60/lLyrics/archive/v1.1.zip instead of using master-branch, but get the same result.

Fix broken lyrics sites

Parsers for Lyricwiki and Letras and possibly more sites are broken and have to be fixed!

Download all lyrics of the whole music database

Hi,

it might be already in but I did not find it.

a feature to download all (missing) lyrics of the whole music database would be nice. So I have the lyrics already with me even I'm not connected to the Net while on the move or with no coverage.

M

no icon displayed in toolbar

ok - i've installed the plugin in /usr/lib/rhythmbox/plugins.

I disabled all plugins, restarted rhythmbox and then enabled lyrics

The following error greeted me:

Traceback (most recent call last):
File "/usr/lib/rhythmbox/plugins/llyrics/lLyrics.py", line 30, in
import rb
ImportError: No module named rb

(rhythmbox:16894): libpeas-WARNING **: Error loading plugin 'lLyrics'

So I got around that error by putting "Depends=rb" into the plugin file

Once I did that I then got:

rhythmbox
Traceback (most recent call last):
File "/usr/lib/rhythmbox/plugins/llyrics/lLyrics.py", line 130, in do_activate
self.init_menu()
File "/usr/lib/rhythmbox/plugins/llyrics/lLyrics.py", line 214, in init_menu
pxbf = GdkPixbuf.Pixbuf.new_from_file(rb.find_plugin_file(self, "lLyrics-icon.png"))
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 72, in constructor
return info.invoke(cls, _args, *_kwargs)
TypeError: Argument 0 does not allow None as a value
Traceback (most recent call last):
File "/usr/lib/rhythmbox/plugins/llyrics/lLyrics.py", line 164, in do_deactivate
self.player.disconnect(self.psc_id)
AttributeError: 'lLyrics' object has no attribute 'psc_id'

The rb.find_plugin_file(self, "lLyrics-icon.png") cannot find the icon file

So first thought was to put the png in /usr/share/rhythmbox/plugins but I still got the error. So I moved it back again to /usr/lib...etc

Finally - I changed rb.find_plugin_file with the following:

    pxbf = GdkPixbuf.Pixbuf.new_from_file(os.path.dirname(__file__) + "/" + "lLyrics-icon.png")

This worked.

Any ideas why rb.find_plugin_file is failing?

RB3 interface hangs when lLyrics 0.5.2 is enabled

Hello,

On Ubuntu 13.10, I have installed:

rhythmbox 3.0.2-1+ppafossfreedom1saucy
rhythmbox-plugin-llyrics 0.5.2-1~rb3

(as explained here: http://xpressubuntu.wordpress.com/2013/10/26/installing-rhythmbox-3-0-plugins-the-easy-way/)

lLyrics has just been updated earlier this week, and the RB3 interface hangs (becomes monochrome, must be force-quit).

It seems that it hangs when I click 'Mark as instrumental'. Last time I tried, playback continued a little while but stopped before the end of the track that was playing at the time.

I don't see much in the last lines of console output but here it is http://ubuntuone.com/0huqFQhPJKBDc5nY7dxuJY

After 'Mark as instrumental' the last thing printed in debug mode is

(17:01:28) [0x7ff244004440] [lLyrics.write_lyrics_to_cache] /usr/lib/rhythmbox/plugins/lLyrics/lLyrics.py:1775: wrote lyrics to cache file

I checked the .lyrics file, it does contain '-- Instrumental --'.

missing depends for the plugin

Since the plugin depends upon the context pane, using the plugin without the context pane being activated causes rhythmbox to crash.

Can I recommend "depends=context" be added to the .plugin file so that if activating the llyrics plugin, the context pane is automatically activated. Likewise, if the context pane is deactivated, the llyrics plugin is also deactivated.

Rhythbox 2.96 in Ubuntu 12.04 crashes

The following is what I get when running rhythmbox in a terminal:

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion g_type_from_name (name) == 0' failed import gobject._gobject /usr/lib/python2.7/dist-packages/gi/types.py:43: Warning: g_value_get_uint: assertionG_VALUE_HOLDS_UINT (value)' failed
return info.invoke(_args, *_kwargs)
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
**
ERROR:/build/buildd/pygobject-3.2.0/gi/_gobject/pygobject.c:929:pygobject_new_full: assertion failed: (tp != NULL)
Aborted (core dumped)

Sidebar covers browser/playlist

Hello.
Sorry for interrupting, but I can't use lLyrics plugin with this trouble. I used Debian 7 before with Rhythmbox 2.99 and plugin worked very very fine (except issue #52, but it was nothing in compare with this one). I updated to Rhythmbox 3.3.1 (and tried 3.1 too, it doesn't matter) and left sidebar now covers playlist or browser if lLyrics plugin is enabled. I attach screenshots so you can compare.

Is there any solution for this issue?
2 99
3 3 1

Doesn't work at all

The plugin is activated on the plugins list, but I don't see it on the player views. I've tried installing it using ppa and by compiling the source. Both ways don't seem to work. Starting Rhythmbox from terminal gives this if it make any sense:
Traceback (most recent call last): File "/home/ali/.local/share/rhythmbox/plugins/lLyrics/lLyrics.py", line 138, in do_activate self.init_menu() File "/home/ali/.local/share/rhythmbox/plugins/lLyrics/lLyrics.py", line 258, in init_menu tooltip=_("Display lyrics for the current playing song")) File "/home/ali/.local/share/rhythmbox/plugins/lLyrics/lLyrics_rb3compat.py", line 478, in add_action app.add_accelerator(accel, action_type + "." + action_name, None) TypeError: Argument 3 does not allow None as a value

I'm on v3.4 now, I recall using v3.3 was fine.

Show lyrics from tags

It would be nice to have the option to use the lyrics from the music files' tags and only search remote sources as a fallback.

Letras.terra.com.br is limiting the lyrics

Example:

Rise Against - Entertainment
All we are is entertainment 
Caught up in our own derangement 
Tell us what to say and what to do 
All we are are pretty faces 
Picture perfect bottled rage 
Packaged synthesized versions of you

(lyrics from Letras.terra.com.br)

Is there a interface inside rhythmbox to choose which server I want to download lyrics?

adding more sources

hey, i think it would be awesome to be able to add your own sources to this, but don know enough coding to be able to do it manually, could you make an add source button, or teach us how to add our own?

Use own lyric database

Hey,

first of all, great job! Thx a lot for your work! There is only one thing I miss:
I have a lyrics database of several thousand lyrics. Some are edited/added by myself. I'd like to use these lyrics to be shown in rhythmbox, preferably using your plugin. Of course the filename pattern is different from what your plugin seems to expect - unless I have missed something?

Thx in advance!
amalaiteko

improve search

Hi,
As we have llyrics on 2.99.1 now! i think it would be great we add some improvement to search! Here is an example:

This is my song which is a popular song and llyrics doesn't fetch the lyrics,
Macklemore & Ryan Lewis Feat. Wanz
But last.fm scrobble it without problem (it change author name to "Macklemore & Ryan Lewis") So it would be great if in search we ignore any thing after "Feat", "FT", ...

So i removed that manually and used lLyrics again, nothing agian! so i thought it might be with "&" and "and", so it would be great to search for both of them!

Finally, i remove all things after "and", "&", "Feat." , ... and changed Artist to Macklemore, lLyrics get lyrics like a charm!

Create a tag/release

In order to create proper downstream (eg: distribution) packages, it's generally necesary to have a certain release of upstream software (eg: 1.0, or 0.1.0, etc).

That's not only for properly labeling the version, but for everyone to know exactly what version it corresponds to and to have a consistent versioning scheme to push updates.

Could you create a tag (again, 1.0, 0.1, or whatever you prefer) to use as a reference for a concrete version?

Thanks. And thanks for the great work developing this plugin! โ˜บ

Crash after activating for the first time

This is an interesting one - clone from the experimental branch.

Deactivated the context pane.

./install.sh the lLyrics.

Start rhythmbox and activate lLyrics in the plugins pane. The toolbar for lLyrics is displayed. So far so good.

Close rhythmbox and restart. lLyrics in toolbar is still visible.

Now activate lLyrics by clicking the toolbar option - lLyrics side pane is correctly displayed.

Close rhythmbox and restart. The following error is seen:

dad@dad-VirtualBox:~/.local/share/rhythmbox/plugins$ /usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
import gobject._gobject
Traceback (most recent call last):
File "/home/dad/.local/share/rhythmbox/plugins/lLyrics/lLyrics.py", line 22, in
import ChartlyricsParser, LyricwikiParser, MetrolyricsParser, LetrasTerraParser, LyrdbParser, SogouParser, Config
File "/home/dad/.local/share/rhythmbox/plugins/lLyrics/Config.py", line 85, in
class ConfigDialog(GObject.Object, PeasGtk.Configurable):
File "/home/dad/.local/share/rhythmbox/plugins/lLyrics/Config.py", line 87, in ConfigDialog
object = GObject.property(type=GObject.Object)
File "/usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py", line 109, in init
self.type = self._type_from_python(type)
File "/usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py", line 230, in type_from_python
raise TypeError("Unsupported type: %r" % (type
,))
TypeError: Unsupported type: <type 'gobject.GObject'>

(rhythmbox:2387): libpeas-WARNING **: Error loading plugin 'lLyrics'
BB

lLyrics toolbar option and side-pane are not visible.

I've rollback my VM and repeated the above - its reproducible.

LLyrics hangs when lyrics can't be found

RB 3.0.1
when lyrics can't be found RB throws error:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.3/threading.py", line 637, in _bootstrap_inner
self.run()
File "/usr/lib/python3.3/threading.py", line 594, in run
self._target(_self._args, *_self._kwargs)
File "/usr/lib/rhythmbox/plugins/lLyrics/lLyrics.py", line 840, in _scan_all_sources_thread
(artist, title, corrected) = Util.get_lastfm_correction(artist, title)
File "/usr/lib/rhythmbox/plugins/lLyrics/Util.py", line 117, in get_lastfm_correction
response = xml.dom.minidom.parseString(result)
AttributeError: 'module' object has no attribute 'minidom'

Read Lyrics from USLT ID3 tags if present

Hi DMO60,
I am assuming your code only pulls from the internet, not from ID3 (If I'm mistaken there, sorry). I see you opened an issue to write Lyrics to ID3 which would be great. Here's the code I'd written to pull lyrics from ID3 tags using mutagen. I'd love to see an option where it pulls from id3 tags if they are present. Could be expanded to pull from the internet and write back to id3 tags if either USLT is not present or if you know they lyrics are not right and want to correct them (maybe a fix lyrics button). I started writing this then found your plugin which already has most of what I was trying to accomplish.

from mutagen.mp3 import MP3
from mutagen.id3 import ID3NoHeaderError
from mutagen.id3 import ID3, TIT2, TALB, TPE1, TPE2, COMM, USLT, TCOM, TCON, TDRC

def refresh_lyrics(self, sp, entry):
    shell = self.object
    file = ""
    try:
        file = entry.get_playback_uri()
    except:
        self.textbuffer.set_text("Nothing Playing")
        pass
    path = file
    path = re.sub("^file:\/\/","",path)
    path = re.sub("%20"," ",path)
    tags = ID3(path)
    lyrics = USLT()

    try:
        lyrics = tags.getall("USLT")
    except:
        self.textbuffer.set_text("No USLT Tag")

    try:
        self.textbuffer.set_text(lyrics[0].text)
    except:
        self.textbuffer.set_text("No Lyrics")

Error: Unable to remove object from construction_objects list

Here is the error that I get when I run rhytmbox from the command line:

(rhythmbox:7651): GLib-GObject-CRITICAL **: Custom constructor for class SoupServer returned NULL (which is invalid).
Unable to remove object from construction_objects list, so memory was probably just leaked.  Please use GInitable instead.
Segmentation fault (core dumped)

This error make a crash on rhythmbox and it does not allow the player to run!
At first time, before restarting rhythmbox, it was working well, but after a restart I couldn't run the player! it crashed. So I deleted the plugin and rhythmbox is running again.

Write lyrics to id3 tag

Add an option to write the lyrics to the lyrics tag of the audio file. Python mutagen can be used for it.

Rhythmbox 3.4 compatibility

When the last update for rhythmbox come, the plugin llyrics stop working.
I'm using updated arch linux.

Here is the terminal output:

(rhythmbox:9378): Rhythmbox-WARNING **: Could not open device /dev/radio0
/usr/lib/rhythmbox/plugins/equalizer/Conf.py:20: PyGIWarning: GConf was imported without specifying a version first. Use gi.require_version('GConf', '2.0') before import to ensure that the right version gets loaded.
from gi.repository import GConf, Gst
Traceback (most recent call last):
File "/usr/lib/rhythmbox/plugins/equalizer/equalizer.py", line 38, in do_activate
self.eq = Gst.ElementFactory.make('equalizer-10bands', None)
File "/usr/lib/python3.5/site-packages/gi/overrides/Gst.py", line 217, in make
return Gst.ElementFactory.make(factory_name, instance_name)
File "/usr/lib/python3.5/site-packages/gi/overrides/Gst.py", line 348, in fake_method
raise NotInitialized("Please call Gst.init(argv) before using GStreamer")
gi.overrides.Gst.NotInitialized: Please call Gst.init(argv) before using GStreamer
Traceback (most recent call last):
File "/usr/lib/rhythmbox/plugins/llyrics/lLyrics.py", line 139, in do_activate
self.init_menu()
File "/usr/lib/rhythmbox/plugins/llyrics/lLyrics.py", line 259, in init_menu
tooltip=_("Display lyrics for the current playing song"))
File "/usr/lib/rhythmbox/plugins/llyrics/lLyrics_rb3compat.py", line 478, in add_action
app.add_accelerator(accel, action_type + "." + action_name, None)
TypeError: Argument 3 does not allow None as a value

Can your add a search method for existing lyrics?

I already have some lyrics in a specific folder. The lyrics filename format is Artist - Title.lrc. So i want search this local folder first. I just have studied python and gtk a few days, i try to write such a function. Can you give me and others a better method?

    import glob
    def search_lyrics_from_local(self, folder):
        for l_file in glob.glob(os.path.join(folder, '*.[Ll][Rr][Cc]')):
            filename = os.path.basename(l_file)
            (song_artist, song_title) = self.clean_song_data(self.artist, self.title)
            if (song_artist in filename.lower() and song_title in filename.lower()):
                    lyrics = get_lyrics_from_localfile(l_file)
                    return lyrics  

Installation dependency: gettext (for msgfmt)

Or else:

$ make install
Installing schema...
... done!
Installing locales...
/bin/sh: 4: msgfmt: not found
make: *** [locales] Error 127

Will fork and change the README.md. ;)

Anyway thanks for the plugin!

lLyrics makes RB 2.97 crash when lyrics are not found

I have Rhythmbox 2.97 on Ubuntu 12.04 and lLyrics turned on. This works well for songs where it finds lyrics but when not found, it just makes RB crash and close unexpectedly.

If I uncheck all databases, it display "Lyric not found" but does not crash.

How can I gather more information for you?

Plugin does not work in Debian Jessie

For some reason it doesn't work on Debian Jessie with Gnome (even out of the box). It doesn't give any feedback on why. Is there any log file I could check to provide more info? (Or perhaps fix it myself)

doesn't work in RB3.4.1 in Centos7

I am using rhythmbox 3.4.1 in centos7.

when I install the plugin, the terminal prints out the error message as below:

Installing schema...
warning: Schema 'org.freedesktop.Telepathy.Logger' has path '/apps/telepathy-logger/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.freedesktop.gstreamer-0.10.default-elements' has path '/desktop/gstreamer/0.10/default-elements/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.freedesktop.ibus' has path '/desktop/ibus/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.freedesktop.ibus.general' has path '/desktop/ibus/general/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.freedesktop.ibus.general.hotkey' has path '/desktop/ibus/general/hotkey/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.freedesktop.ibus.general.xkblayoutconfig' has path '/desktop/ibus/general/xkblayoutconfig/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.freedesktop.ibus.panel' has path '/desktop/ibus/panel/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.crypto.cache' has path '/desktop/gnome/crypto/cache/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.crypto.pgp' has path '/desktop/gnome/crypto/pgp/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.seahorse' has path '/apps/seahorse/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.seahorse.manager' has path '/apps/seahorse/listing/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.seahorse.recipients' has path '/apps/seahorse/recipients/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.locale' has path '/system/locale/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy' has path '/system/proxy/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy.http' has path '/system/proxy/http/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy.https' has path '/system/proxy/https/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy.ftp' has path '/system/proxy/ftp/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
warning: Schema 'org.gnome.system.proxy.socks' has path '/system/proxy/socks/'. Paths starting with '/apps/', '/desktop/' or '/system/' are deprecated.
... done!
Installing locales...
de.po
./lLyrics/locale/de.po:7: warning: header field 'Project-Id-Version' still has the initial default value
fr.po
./lLyrics/locale/fr.po:7: warning: header field 'Project-Id-Version' still has the initial default value
pl.po
./lLyrics/locale/pl.po:7: warning: header field 'Project-Id-Version' still has the initial default value
... done!
Installing plugin files to ~/.local/share/rhythmbox/plugins/ ...
Done!

when I enable the plugin, it shows the error message:
(rhythmbox:16720): libpeas-WARNING **: Could not find plugin 'rb' for plugin 'lLyrics'

already installed gettext, lxml and chardet, but still not work.
may I know how to fix this problem?

Install on flatpacked rhythmbox

I tryed to do that copying the plugin files to /var/lib/flatpak/...../org.gnome.Rhythmbox3/.../share/rhythmbox/plugins/ and the scheme to .../share/glib-2.0/schemas/ and compile it, but do not work.

So maybe there is a correct way to do that on makefile provided with this plugin.

lLyrics plugin request

Is it possible to set or change the current font in the lyric window?

I would like a font with a set character width so that I can edit the lyrics to add guitar tabulation.

As you may know, guitar tabulation requires a number of lines (namely 6 lines) in neighboring rows that show the location of musical notes on the guitar fretboard.

example:
|----------------|---------------|----------------|--------------|
|----------------|---------------|----------------|--------------|
|-0---3---5----0-|---3---6-5-----|-0---3---5----3-|---0----------|
|-0---3---5----0-|---3---6-5-----|-0---3---5----3-|---0----------|
|----------------|---------------|----------------|--------------|
|----------------|---------------|----------------|------0-1-2-3-|

In the above example, all the " | " should line up vertically.

Thank you,

regards,
Gaz

Use GSettings instead of gconf

The plugin should use the newer GSettings instead of gconf.
Also, the Rhythmbox plugin preferences dialog should be implemented.

RB3 and lLyrics 0.5.2 - DAAP share

Hello,

When tracks are played off a DAAP share, the lyrics panel stays blank.

Is it a known bug or limitation ?

Ubuntu 13.10 with
lLyrics plugin 0.5.2-1~rb3,
rhythmbox 3.0.2-1+ppafossfreedom1saucy

Search text in saved Lyrics

Hi! Great extension!
I was thinking that it would be great to add a menu option to search a text inside the saved lyrics: sometimes I would like to listen a song of which i remember some words but not the title! lLyrics could help me to find it without google! :D

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.