Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_uie_lyrics3 (Read 879624 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

foo_uie_lyrics3

Reply #1451
@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 #1453
(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 #1454
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 #1455
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 #1456
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 #1457
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 #1458
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.
Stay sane, exile.

foo_uie_lyrics3

Reply #1459
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 #1460
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 #1461
That or some third party library like libcurl, pretty much. Or roll your own on top of sockets. That's always "fun".
Stay sane, exile.

foo_uie_lyrics3

Reply #1462
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 #1464
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 #1465
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 #1466
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 #1467
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 #1468
Thanks a lot for the update, the plugin seems to be back in shape 

foo_uie_lyrics3

Reply #1469
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 #1470
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 #1471
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 #1472
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 #1473
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.

foo_uie_lyrics3

Reply #1474
Hello,

I don't know if I can answer your question about the server behind the third timestamped source, if The Vern doesn't explicitly name them, he has probably a good reason. [Edit: Well too late, someone else answered you... ] However, I can tell you that there is both synced and not synced lyrics in that database.

The XML error you've got is due to another database, probably Timestamped 2. The plugin misbehaves when it returns an error and seems to take it for the lyrics. You can disable it along with Timestamped 1, Timestamped 3 is probably the biggest synced database available, but note that you will nonetheless lose some results without them.

And for the search order (@The Vern too), I've got exactly the same problem, not with Timestamped 3 which were already on top, but with my custom source. When moving an item up/downward, the right position is often not properly saved, and needs to be done a second time. For example, if you try to move the latest item to the first place, it will be saved as the third item instead. Then if you move it again from the third place to the first, it will be correctly saved as the first one this time. I can't stand exactly what happens under-the-hood, but the bug is definitely reproducible, and I don't think it was there in the previous release.