Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 24
[RELEASE] xbmclyrics script - automatically grabs lyrics online
#91
but i have one more problem, mayby sameone from coders can help

script reads lyrics from text file which are stored on HDD

e.g.
Artist Tag - U2
Song Tag - One

LyricsPath
Q:\UserData\lyrics\U2\One.txt'

problem
non latin characters in info tags

e.g. ( for polish one)
Artist Tag - ĄĘść
Song Tag - żńąć

i need part of code which convert characters from tags to set proper path
Q:\UserData\lyrics\AEsc\znac.txt'

kind regards smuto
#92
Dead certainty i'm not a python coderNo
i try to follow thor918's tips, but with no luck
thor918 Wrote:hi there. if there is someone that is developing on this script still, please consider to redo the code that detects media change. last time i checked the code. it had a codeloop that where sleeping and checking. there is a much more efficient way to do this.

http://forum.xbmc.org/showthread.php?tid=5978
or
http://forum.xbmc.org/showthread.php?tid=19493

please XBMCLyrics needs the real improved version

smuto
#93
I have an issue with recent XBMC builds (e.g. 2006-12-08) an this script: it displays lyrics fine, until i skip to a song that has multiple options. Instead of showing the list of options to make a manual choice the script hangs te box requiring a power cycle to recover.
When I use the script on older xbox versions it runs fine.

Any clues?

Cheers,
Luna
#94
not only that, if you accidentally run the script with no media playing, it hangs the system as well Sad
#95
XBMCLyrics with GuiBuilder - fastMethod

Blackbolt Classic skin - that all, what i add
Build SVN 27.12.2006 - script working with no problem

still looking for aktive python dev with free time - XBMCLyrics needs improved updade class

smuto
#96
Smuto this snuck past me, I didn't know you added a BBC skin, now known as Xbox-Classic.

If you don't mind. I'll add this to the scripting SVN, I'll update it to the 2.1 skinning too.

I wait for your reply.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
#97
sure, but only if u improve more stafBig Grin

this script need better
- update class
- language support
- hdd read
- fatX compatibility

i wrote some temporary part of code, just for myself, that all what i can do with my basic python knowledge

smuto
#98
update class - done Smile
language support - if you mean for the lyrics, then maybe different lyrics search sites
hdd -read and fatx ok, i'll look into it when i get a chance.

You've done a very good job with this. I updated the skins to 2.1. The BBC skin now Xbox-Classic skin is great. Why hide the cover art?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
#99
XBMC Lyrics originally by SveinT and updated by Smuto is now in SVN.

Key features:
- Update lyrics now uses the Player on* events.
- Skinnable - You have two options a 4x3 (skin.xml) and 16x9 (skin_16x9.xml). special gfx go in there /gfx/ folder
- Saves lyrics in q:\userdata\lyrics\artistname\song.txt. If you don't want this edit the top of the script and set SAVE_LYRICS = False

http://xbmc-scripting.googlecode.com/svn...C%20Lyrics


Thanks to Smuto and SveinT
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
changed: [XBMC Lyrics] Separated parsers into there own .py file. (So someone could create a parser to parser lyrics from mp3's)
added: [XBMC Lyrics] http://www.lyricwiki.org/ (Default, change it at the top of the script uncomment the other parser and comment this one out "#PARSER = 'lyrc.com.ar'")
added: [XBMC Lyrics] Warning message if no music is playing.
changed: [XBMC Lyrics] Language routine
added: [XBMC Lyrics] English language strings (10-11)

If someone wants to create a new parser:
- Name it "lyrics_parser" and put it in it's own folder under /parsers/
- The Main class needs to be named "Lyrics_Fetcher"
- Two defs are required:
- def get_lyrics( self, artist, song ): <- This returns either the lyrics or a list of tuple selections, with [ 0 ] being added to the ControlList.
- def get_lyrics_from_list( self, item ): <- This returns the lyrics after the user as selected an item from the list. item is the selected tuple from above.

The options at the top of the script you change to suit:
SAVE_LYRICS = False
LYRICS_PATH = 'Q:\\UserData\\lyrics\\'
PARSER = 'lyricwiki'
#PARSER = 'lyrc.com.ar'

I need to know if you have SAVE_LYRICS = False. If a list is returned to you want to save that file anyway to avoid the list next time?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
just love uSmile - wiki is much better than - hdd read support
Big Grin you have both, just the file writing is disabled by default.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
yes, i know

now my problems
e.g.
artist - Dżem
song - A jednak czegoś żal

for hdd support i need to replace polish chars
UserData\lyrics\Dzem\A jednak czegos zal.txt
(xbmc convert all chars to utf-8)

Code:
#Polish non fatx_compatible chars :
        name = name.replace( 'Ä„', 'A' ).replace( 'Ę', 'E' ).replace( 'Ć', 'C' ).replace( 'Ł', 'L' ).replace( 'Ĺƒ', 'N' )
        name = name.replace( 'Ă“', 'O' ).replace( 'Ĺš', 'S' ).replace( 'Ĺ»', 'Z' ).replace( 'Ĺą', 'Z' )
        name = name.replace( 'Ä…', 'a' ).replace( 'Ä™', 'e' ).replace( 'ć', 'c' ).replace( 'Ĺ‚', 'l' ).replace( 'Ĺ„', 'n' )
        name = name.replace( 'Ăł', 'o' ).replace( 'Ĺ›', 's' ).replace( 'ĹĽ', 'z' ).replace( 'Ĺş', 'z' )
        return name
or take a look to my mod
lyrics.py

for lyricwiki
- scraper returns utf8 formatted strings, but script display it in 8-Bit

smuto
Ah, ok. Try replacing make_fatx_compatible with the following. If it works I'll add it.

Code:
def make_fatx_compatible( self, name, extension ):
        name = name.decode( 'utf-8', 'replace' ).encode( 'ascii', 'replace' )
        if len( name ) > 42:
            if ( extension ): name = '%s_%s' % ( name[ : 37 ], name[ -4 : ], )
            else: name = name[ : 42 ]
        name = name.replace( ',', '_' ).replace( '*', '_' ).replace( '=', '_' ).replace( '\\', '_' ).replace( '|', '_' )
        name = name.replace( '<', '_' ).replace( '>', '_' ).replace( '?', '_' ).replace( ';', '_' ).replace( ':', '_' )
        name = name.replace( '"', '_' ).replace( '+', '_' ).replace( '/', '_' )
        return name
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
it's working, but

try to imagine

my polish song name - "ąężćś"
from your code on hdd i have "_____" , i prefer "aezcs" instead, so this is why i made mod of your script

smuto
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 24

Logout Mark Read Team Forum Stats Members Help
[RELEASE] xbmclyrics script - automatically grabs lyrics online1