I am using the "XBMC Lyrics script by SveinT" and I love it. I mapped it to a button on my remote even. Slight problem: if you accidentally execute the script when no song is playing, it hangs.
What I want to do is add a simple logic fork which only executes the main part of the script if a song is playing, and simply end if one is not.
if I understand the script code correctly, the majority of the code is in defining the classes which are then used. the driver part of the script is very simple:
w = Overlay()
w.doModal()
del w
i'm assuming this instantiates the object w, runs a built in function, then destroys the object. all my proposed change would need to do is nest these three lines inside a logical if. i vaguely understand the syntax is like if conditional statement:
and then you indent everything you want to be executed in the event that the conditional statement is true.
so i would need to do like
if isPlayingAudio()
[indented code here]
right?
XBMC Lyrics > Slight Update/Addition?
SleepyP
Posting Freak Joined: Nov 2005 Reputation: 4 Location: Portland, Oregon |
2006-08-23 22:35
Post: #1
|
| find quote |
SleepyP
Posting Freak Joined: Nov 2005 Reputation: 4 Location: Portland, Oregon |
2006-08-24 02:13
Post: #2
hehe that didn't work at all
i am not referencing the built in function correctly, don't know the syntax
|
| find quote |
Nuka1195
Skilled Python Coder Posts: 3,914 Joined: Dec 2004 Reputation: 17 |
2006-08-24 16:05
Post: #3
Code: if (xbmc.Player().IsPlayingAudio()): |
| find quote |
SleepyP
Posting Freak Joined: Nov 2005 Reputation: 4 Location: Portland, Oregon |
2006-08-24 16:08
Post: #4
OH! thanks a lot man
|
| find quote |
sCAPe
Fan Posts: 441 Joined: Mar 2005 Reputation: 0 Location: Germany |
2006-08-24 17:27
Post: #5
@sleepyp
Would be nice if you could upload your modified xbmclyrics.py to xbmcscripts.com or even anywhere on the net. Thanks.
My XBOX built into a Sony Hifi CD-Player Case XBOX Hifi Media Center Picture Gallery Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
SleepyP
Posting Freak Joined: Nov 2005 Reputation: 4 Location: Portland, Oregon |
2006-08-25 01:26
Post: #6
i know, i will do it when i get a chance. gonna give it a logo graphic and everything ;P
|
| find quote |

i am not referencing the built in function correctly, don't know the syntax
Thanks.
![[Image: badge.gif]](http://www.ohloh.net/projects/149/badge.gif)
Search
Help