Skip to main content
Topic: foo_uie_lyrics3 (Read 572029 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_uie_lyrics3

Reply #1450
After messing with foo_uie_lyrics3 SDK the last few days, i give up due to my poor programming skills.

So im turn it into a "Add Database" request instead.

As a Metalhead i often use lyrics because of the vocalist often scream, yell, growl etc.
Darklyrics.com have a good database, but http://www.metal-archives.com is the most complete/absolute site in metal lyrics, they have alot of the rare stuff.

So if someone have the skills: Is it possible to include http://www.metal-archives.com as a Online DB?

Example how to find lyrics on metal-archives/Metallum -  http://www.metal-archives.com/albums/DBC/D...rain_Cells/7965



foo_uie_lyrics3

Reply #1452
@3dyd 

Thank you SOOOO much!

It works perfectly. (Only the windows filenames with special characters like "Territorial Instinct / Bloodlust" which is a problem, not your patch)
If you do not mind I will post your patch on metal-archives.com

Again thanks for the help; it is obviously not just me that can make my wife happy ...



foo_uie_lyrics3

Reply #1454
(Only the windows filenames with special characters like "Territorial Instinct / Bloodlust" which is a problem, not your patch)

It might be because of searching with 'Exact match' turned on. Check out v0.2.

If you do not mind I will post your patch on metal-archives.com

Not sure that they will be happy that someone uses their service without permisson.

Can you also remove dead services and/or fix broken ones?

No, this can do only component's creator.

foo_uie_lyrics3

Reply #1455
WOW!!! Now it works with slashes in %title%

Quote
Not sure that they will be happy that someone uses their service without permisson.

OK I keep it as our little secret 

This could end up as a great metal-archives.com stand-alone plugin due to their strong and massive database, but for now we are more than happy here in our household.

Again thanks for your time and great work!

foo_uie_lyrics3

Reply #1456
Is there a way to set global / permanent offset for lyrics?
This resets after every song. I like to see the lyrics 1 second sooner always.
Thanks!

(I am using Lyrics Show Panel 3).

foo_uie_lyrics3

Reply #1457
I'm having a slight problem with this plugin that I can't understand.  When I allow the plugin to save lyrics to tags, those lyrics are not available to iTunes or to my Ampache streaming server I use to stream to my phone.

I have noticed something that might be of note.  When this plugin writes Unsynced lyrics, the lyrics have proper carriage returns in them when I view properties in foobar2000.  When I look at lyrics added by iTunes in Foobar2000, they're all together with no carriage returns.

Is there a reason one shows carriage returns and the other doesn't?

Also, is there a way to keep the plugin from writing artist and track name into the Lyric tags?

foo_uie_lyrics3

Reply #1458
Hello,

As The Vern seems to be very busy IRL, I was thinking about using the plugin SDK to replace the Timestamped 3 source which is now broken for a few months... But I encountered some problems due to null characters required in request/answer and because pfc::string8 seems to be very picky to be able to deal correctly with them. I've been able to workaround the problem with the request by using std::string instead, the server answers correctly (confirmed with Wireshark). Unfortunately, the response is truncated at the first null character with lyric_http_request->do_post_request() and I cannot unfortunately use the same workaround as it expects a pfc::string_base reference.

Someone have an idea, please? If possible, without having to write my own http request manager...

foo_uie_lyrics3

Reply #1459
The foobar2000 SDK contains a rudimentary HTTP client capable of GET and POST requests, which returns a file::ptr capable of representing your zero bytes. The http_request_post derived type has some functions to build the POST body.

Code: [Select]
static_api_ptr_t<http_client> client;
auto r = client->create_request("POST");
service_ptr_t<http_request_post> post_req;
if (r->service_query_t(post_req)) {
    abort_callback_dummy cb;
    post_req->add_post_data("cats", "1");
    auto f = post_req->run(url, cb);
    pfc::array_t<char> arr;
    f->read_till_eof(arr, cb);
}


I can't seem to find any way to wrangle the lyrics client into not assuming textual responses.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

foo_uie_lyrics3

Reply #1460
Oh... Thank you so much, I missed that http_client.h in the foobar2000 SDK!  It's not as good as being able to use lyric_http_request directly (for instance to use common proxy settings) but at least I don't have to reinvent the wheel. Now, let's see if I manage to send the binary POST request with it...

Edit: Hmm, after a quick test, I've only been able to send true binary data with:
Code: [Select]
request->add_post_data("", request.data(), request.size(), "", "application/octet-stream");

But as it can be expected, it produces a multipart request understandable for the remote server.

foo_uie_lyrics3

Reply #1461
Oops, too late to edit again the previous message... I would say "not understandable for the remote server" of course.

I'm still trying to learn how http_client works, but it's a little higher than my C++ knowledges so it would take a little bit of time.

Edit: Well, if I understand everything right, there is no others inherited public members that I can use to alter data sent in the request. So I can't use http_client to forge the binary request... And I guess that if there is really no solution with lyrics_http_request, the last resort would be to use WinHTTP API?

foo_uie_lyrics3

Reply #1462
That or some third party library like libcurl, pretty much. Or roll your own on top of sockets. That's always "fun".
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

foo_uie_lyrics3

Reply #1463
Yes, but I doesn't want to need another dependencies. Besides, I've been able to send the request and retrieve the whole response with WinHTTP API, so no need to write an http handler from scratch with sockets.  Of course it would be fun, but also time consuming for mixed results.

Now I can start the biggest part of the "rewrite" tonight, the response parser...


foo_uie_lyrics3

Reply #1465
Yes, but I doesn't want to need another dependencies. Besides, I've been able to send the request and retrieve the whole response with WinHTTP API, so no need to write an http handler from scratch with sockets.  Of course it would be fun, but also time consuming for mixed results.

Now I can start the biggest part of the "rewrite" tonight, the response parser...

Hello!
How things are going with this?

foo_uie_lyrics3

Reply #1466
Hi,

Unfortunately, I've got a little problem with my laptop last week and have been a little busy finishing some others things these last days. But now, I have some ideas how to do it, though. I'll try to do some work today.

By the way, The Vern asked me what have changed some days ago. He doesn't answered me yet, but he might comeback soon with an updated plugin...

foo_uie_lyrics3

Reply #1467
Hi,

I've finally managed to make a working replacement plugin for third timestamped lyrics source...  I definitely know now that The Vern will comeback sooner or later with a fixed version too, but if someone can't wait, I can give him my custom source. I just need to triple-check every safeguards before to make sure that no buffer over-reads can occur with malformed replies.

foo_uie_lyrics3

Reply #1468
New version with fixed timestamp 3. Thanks to cedricpc for the access to timestamped 3. Apologies for the delay, I was working over the weekend!

http://www.foobar2000.org/components/view/foo_uie_lyrics3

Let me know if you have any problems

foo_uie_lyrics3

Reply #1469
Thanks a lot for the update, the plugin seems to be back in shape 

foo_uie_lyrics3

Reply #1470
Hehe thank you, nice work. And no problem, we now have an updated version, that's the main thing.

I'll keep mine under my hat in case they mess around again with their API...

foo_uie_lyrics3

Reply #1471
New version with fixed timestamp 3. Thanks to cedricpc for the access to timestamped 3. Apologies for the delay, I was working over the weekend!

http://www.foobar2000.org/components/view/foo_uie_lyrics3
Great.

Let me know if you have any problems

Are other updates planned? I see mirkforce (which was dead) is removed. But for example someone suggested a new website.

foo_uie_lyrics3

Reply #1472
Wow!!! Thanks for the new version both of you... question though, what site or sites is Timestamped 3? And does it consist only of synced lyrics?

foo_uie_lyrics3

Reply #1473
Since I updated the component I'm getting:

Quote
<?xml version="1.0" encoding="UTF-8" ?>
<result errmsg="Search ID or Code error!" errcode="32006"></result>

[/s]

Wait, I thought I had Timestamped 3 at the top... weird... it's fixed now that I upped it. Should I remove 1 and 2?

foo_uie_lyrics3

Reply #1474
Wow!!! Thanks for the new version both of you... question though, what site or sites is Timestamped 3? And does it consist only of synced lyrics?

Minilyrics? Since it works with foobar I wanted to upload some lyrics but it requires signing up and the website (http://www.viewlyrics.com/) is down.

Thanks for updating.

 
SimplePortal 1.0.0 RC1 © 2008-2019