New Lyrics Search Engine

Use this category to discuss anything related to the development of Guayadeque.
mr_hangman
Posts: 70
Joined: Tue Sep 28, 2010 12:22 am

New Lyrics Search Engine

Post by mr_hangman » Fri Feb 11, 2011 10:51 am

anonbeat wrote:I will try to fix the problem. Seems there is a problem using wxExecute out of the main thread. Need to figure out how to do it without locking the main thread. Sorry for the problem.

Thanks for your help
Thank you very much. I'll be messing with python in the mean time ;)

tamalet
Posts: 490
Joined: Fri Sep 24, 2010 4:34 am

New Lyrics Search Engine

Post by tamalet » Fri Feb 11, 2011 12:06 pm

anonbeat wrote:Now the last lyric source is shown in the application status bar
I was going to report that it's not working because I was looking at left of the status bar. I now see it's on the right, I really like it!
Some small suggestions:
.It doesn't look nice that when it is searching it shows the last source used. Can you just display "Searching for lyrics"? Note that this also applies when you click in Reload the lyrics.
.When no lyrics are found it says "Lyrics from ". It would be better to display "Lyrics not found" or similar.

User avatar
anonbeat
Posts: 1960
Joined: Thu Sep 16, 2010 9:47 pm

New Lyrics Search Engine

Post by anonbeat » Sat Feb 12, 2011 2:25 am

When its searching the lyrics still shows the lyrics already present. So makes sense to show when it was from.

tamalet
Posts: 490
Joined: Fri Sep 24, 2010 4:34 am

New Lyrics Search Engine

Post by tamalet » Sat Feb 12, 2011 5:42 am

The problem is that when you click on Reload the current lyrics disappear, but you still see the last used source. Same when the currently playing song has no lyrics, it shows the source used in the previous song. And "lyrics from " looks bad too.

tamalet
Posts: 490
Joined: Fri Sep 24, 2010 4:34 am

New Lyrics Search Engine

Post by tamalet » Sat Feb 12, 2011 6:13 am

Anon, can you explain me how Replace works?
It replaces each character, right? Can you replace a whole string? The rhs can be a string, right?
Why in many search engines you replace a dot with nothing?
I tried adding the following replacements, but it didn't work:
… -> ... “ -> " ” -> "
Any idea what's wrong?

tamalet
Posts: 490
Joined: Fri Sep 24, 2010 4:34 am

New Lyrics Search Engine

Post by tamalet » Sat Feb 12, 2011 6:28 am

A few small remarks:

.When no lyrics are found, the edit button should be enabled to able to add it manually.

I think some of the buttons tooltips should be changes/simplified:

.Configure lyrics -> Configure lyrics preferences
You don't configure lyrics itself, but the lyrics preferences.

.Reload the lyrics -> Search for lyrics
The buttons does not really reload the lyrics, but continues searching for them. It could also be something like "Continue searching for lyrics".

.Edit the lyrics for the current track -> Edit the lyrics
It's simpler and if Follow player is not enabled it's not even true that you edit the currently playing song.

.Save the lyrics to files or directory -> Save the lyrics
Again, it's simpler. In the preferences you specify where you save them, so there is no need to repeat it here (and you could just execute a command).

Sorry for annoying you with just details.

User avatar
anonbeat
Posts: 1960
Joined: Thu Sep 16, 2010 9:47 pm

New Lyrics Search Engine

Post by anonbeat » Sat Feb 12, 2011 4:24 pm

mr_hangman wrote:
anonbeat wrote:you can receive artist and track name and any other information as program parameters. I dont know python but In C its thought argc and argv params received by the main function. To output just write the content to the console and guayadeque will capture it.

Thanks for your help
Right now I have a problem with the output when I run the script.
Sometimes I get segfault like this http://pastebin.com/McQ6ugwA or http://pastebin.com/xi5Z8CCk
Sometimes guayadeque skips the command and go to the next website. Do you have timeout set for each one?

This is the script that I got working in the console but not when called by guayadeque http://www.mediafire.com/?dbd8u628s8b1hig . (The input argument is not yet implemented. Just run 'python fetch_lyrics.py' to test.)

P.S. it would be convenient if there is a browse button to select an external script.

Thanks :)
I changed the way the external script is executed and now should not give any problem.
You need to add
s = s.encode( "utf-8" ); so the output of the script is encoded in UTF8 to be accepted by Guayadeque.
WIth that change it should work as its working here. Please try it and let me know

Thanks for your help

mr_hangman
Posts: 70
Joined: Tue Sep 28, 2010 12:22 am

New Lyrics Search Engine

Post by mr_hangman » Sun Feb 13, 2011 3:51 am

anonbeat wrote:I changed the way the external script is executed and now should not give any problem.
You need to add
s = s.encode( "utf-8" ); so the output of the script is encoded in UTF8 to be accepted by Guayadeque.
WIth that change it should work as its working here. Please try it and let me know

Thanks for your help
Thanks for the fix, anon. I run the script and the result is returned and shown correctly.

However, there is another problem with the input arguments. I couldn't get anything except the first argument which is the path of the script itself. Maybe the title and artist are not passed to the script?

I tried with both python and c++ and got the same result.
These are the scripts I use: http://www.mediafire.com/?eywid4t1462oo57

User avatar
anonbeat
Posts: 1960
Joined: Thu Sep 16, 2010 9:47 pm

New Lyrics Search Engine

Post by anonbeat » Sun Feb 13, 2011 10:10 am

mr_hangman wrote:
anonbeat wrote:I changed the way the external script is executed and now should not give any problem.
You need to add
s = s.encode( "utf-8" ); so the output of the script is encoded in UTF8 to be accepted by Guayadeque.
WIth that change it should work as its working here. Please try it and let me know

Thanks for your help
Thanks for the fix, anon. I run the script and the result is returned and shown correctly.

However, there is another problem with the input arguments. I couldn't get anything except the first argument which is the path of the script itself. Maybe the title and artist are not passed to the script?

I tried with both python and c++ and got the same result.
These are the scripts I use: http://www.mediafire.com/?eywid4t1462oo57
Can you tell me how you defined the command?

Thanks for your help

mr_hangman
Posts: 70
Joined: Tue Sep 28, 2010 12:22 am

New Lyrics Search Engine

Post by mr_hangman » Sun Feb 13, 2011 10:25 am

anonbeat wrote:Can you tell me how you defined the command?

Thanks for your help
I set only 3 parameters;

Name: test cpp
Type: Command
Source: /full/path/to/script

The rest is empty.

Post Reply