Skip to main content
Topic: foo_run 0.3.8 (Read 468005 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: foo_run 0.3.7

Reply #550
There is sort of guide to writing the codes? I want to use rateyourmusic to search for artist and albums but I do not understand all the code writing.

Just write the url of the web page, run service will open it with your default browser. Use titleformatting to replace the dynamic part of the url with the metadata content.
This, for example, is a script I use to open the rateyourmusic release page
Code: [Select]
https://rateyourmusic.com/release/$replace($if2($lower(%release type%),album),lp,album,remix,djmix,compilation,comp)/$replace($lower($replace($meta_sep(album artist,_),/,_,*,_)/$replace(%album%,/,_,>,)),'',, ,_,&,and,!,_,?,_,...,_,.,_,',',_,-,_,'(',_,')',_,:,,°,_,ã,a,é,e,ê,e,ö,o,ó,o,ü,u,я,r,)

Actually I didn't really grasp the logic of rateyourmusic urls, this is what I came up with after a trial-and-error period, but it doesn't always work. Maybe someone has a better suggestion. Of course the script relies on specific metadata information, such as the release type, which not everybody cares of, but it is a dynamic part of the rateyourmusic release page url.
I'm late

Re: foo_run 0.3.7

Reply #551
To add to davidleo's answer, I'm using foo_run to go directly to the artist or album page. It works about 80% of the time.

This is for artist
Code: [Select]
https://rateyourmusic.com/artist/$lower($replace(%artist%,!,_,.,_,$char(32),_,&,and,é,e,à,a,è,e,á,a,$char(40),_,$char(41),_,-,_,$char(39),))

for album:
Code: [Select]
https://rateyourmusic.com/release/album/$lower($replace(%artist%,!,_,.,_,$char(32),_,&,and,é,e,à,a,è,e,á,a,$char(40),_,$char(41),_,-,_,$char(39),))/$lower($replace(%album%,!,_,.,_,$char(32),_,&,and,é,e,à,a,è,e,á,a,$char(40),_,$char(41),_,-,_,$char(39),))

Re: foo_run 0.3.7

Reply #552
File not found both, ty anyways. I guess is a lost battle when I come to writing code.
Yes, the avatar it is the cover of «The City» by Vangelis.

Re: foo_run 0.3.7

Reply #553
I have found that with the component foo_openurl you actually can open the embedded URL of an album or another link in the browser. This is what I wanted to do in the first place so is a sort of workaround perfect for me because I copy the URL of the releases and paste it on the MP3.

In order to work you need to add URL as a field and not a customized one.
Yes, the avatar it is the cover of «The City» by Vangelis.

Re: foo_run 0.3.7

Reply #554
I have found that with the component foo_openurl you actually can open the embedded URL of an album or another link in the browser. This is what I wanted to do in the first place so is a sort of workaround perfect for me because I copy the URL of the releases and paste it on the MP3.

In order to work you need to add URL as a field and not a customized one.

If you have a URL tag, you can still use foo_run: just write the tag name in percent signs and it will work exactly like foo_openurl


File not found both, ty anyways. I guess is a lost battle when I come to writing code.

I don't think copying and pasting code should be a problem. I believe the "bug" is rather in the metadata. My code, for example, cannot work if you don't have a %release type% tag or if your %artist% tag is not multivalue. Code must be adapted to your own way of tagging. What you could do is check the actual url of the rateyourmusic page, and compare it with the one generated by the run_service command. This is how I put the code together, failure after failure.
I'm late

Re: foo_run 0.3.7

Reply #555
And is it possible to run a software too?

Quote
"C:\Program Files (x86)\MixMeister BPM Analyzer\BpmAnalyzer.exe"

This is the code of the program but when I right click on the file the program does not run.
Yes, the avatar it is the cover of «The City» by Vangelis.

Re: foo_run 0.3.7

Reply #556
And is it possible to run a software too?

Quote
"C:\Program Files (x86)\MixMeister BPM Analyzer\BpmAnalyzer.exe"

This is the code of the program but when I right click on the file the program does not run.

You need to add the file path :
Code: [Select]
"C:\Program Files (x86)\MixMeister BPM Analyzer\BpmAnalyzer.exe" "%path%"
I'm late

Re: foo_run 0.3.7

Reply #557
Hello,

for a composer-search in the german Wikipedia I use
http://de.wikipedia.org/wiki/$replace(%composer%, ,_)
(I found this on a website).

The problem is, that in the field %composer% I have the family name first, for example "Beethoven, Ludwig van".
Unfortunately Wikipedia does not find "Beethoven, Ludwig van", because the original Wikipedia article is named "Ludwig van Beethoven".

So I would need a possibility to change the %composer% name "Beethoven, Ludwig van" in "Ludwig van Beethoven".

I hope there is a code for this.
Can anybody help me?



Re: foo_run 0.3.7

Reply #558
Hello,

for a composer-search in the german Wikipedia I use
http://de.wikipedia.org/wiki/$replace(%composer%, ,_)
(I found this on a website).

The problem is, that in the field %composer% I have the family name first, for example "Beethoven, Ludwig van".
Unfortunately Wikipedia does not find "Beethoven, Ludwig van", because the original Wikipedia article is named "Ludwig van Beethoven".

So I would need a possibility to change the %composer% name "Beethoven, Ludwig van" in "Ludwig van Beethoven".

I hope there is a code for this.
Can anybody help me?

There is likely more than one way to achieve the same result with titleformatting. This is the first one that comes to my mind:
Code: [Select]
$puts(sep,$add($strchr(%composer%,','),1))$right(%composer%,$sub($len(%composer%),$get(sep))) $left(%composer%,$sub($len(%composer%),$add($get(sep),1)))

As a side note I would suggest using the COMPOSERSORTORDER field for "Beethoven, Ludwig van" and the COMPOSER for the foo_run command.
I'm late

Re: foo_run 0.3.7

Reply #559
Hi davideleo,

thank you very much (again)!

I copied your code to replace "%composer%" in the mentioned Wikipedia code.
It works fine with "Beethoven, Ludwig van".

But for example "Boccherini, Luigi" results in a Wiki-search for "Luigi Bocc".
"Biber, Heinrich Ignaz Franz" results in "Heinrich Ignaz Franz Biber, Heinrich Ign".
"Stamitz, Carl" results in "Carl Sta".

But anyway: Your idea with COMPOSERSORTORDER  and COMPOSER is easier to realize and therefore the best solution, although a field more has to be manually filled with the proper form of the composers' names.

Re: foo_run 0.3.7

Reply #560
I copied your code to replace "%composer%" in the mentioned Wikipedia code.
It works fine with "Beethoven, Ludwig van".

But for example "Boccherini, Luigi" results in a Wiki-search for "Luigi Bocc".
"Biber, Heinrich Ignaz Franz" results in "Heinrich Ignaz Franz Biber, Heinrich Ign".
"Stamitz, Carl" results in "Carl Sta".

Uh... sorry, I'm wrtiting from the office where I don't have foobar2000 and I couldn't test it. This should work:
Code: [Select]
$puts(sep,$strchr(%composer%,','))$right(%composer%,$sub($len(%composer%),$get(sep),1)) $left(%composer%,$sub($get(sep),1))


It's worth checking even if you go for the more straightforward solution of the COMPOSERSORTORDER field.
I'm late

Re: foo_run 0.3.7

Reply #561
I'm trying to run an script to execute separately on every song selected but simultaneous sim to limit the amount of runs, BUT my problem is that after A and B are finished C and D are not started, is there anyway to overcome this?

To be more precise on my idea, I plan on running a python script for every selected song passing artist, album artist, tittle and full path to the script, this script then search a database for music lyrics and translations, after that the script will either save it to a file or save to a tag, not sure which yet would be better, but likely to a file.
Anyway, I need it to be able to run like 10 instances at a time that would either:
Start another instance once 1 of them is finished
OR
Start another set of 10 instances once all of the previous 10 were finished.

Is this even possible?
I could also pass the information generating a string pattern to store in a file and then later run a powershell script on top of that list.
Or use powershell directly to scan the files and run it, but with foo run it would be way better.

Re: foo_run 0.3.7

Reply #562
It is a long time but I finally could make Run services to open if not the proper album at least the search page on RYM to an album.  Copy/paste this exact code. I have not tried but I suppose that replacing %album% by the name of the field you want to search should work: artist or whatever.

Code: [Select]
"https://rateyourmusic.com/search?searchtype=l&searchterm=%album%"
Yes, the avatar it is the cover of «The City» by Vangelis.

Re: foo_run 0.3.8

Reply #563
It's been a while, but I've just released foo_run 0.3.8. 8)

It's basically a maintenance release and comes with the following changes
  • CHG: preference page now uses apply logic and doesn't display legacy warning anymore.
  • CHG: removed some outdated default services and added Wikipedia and DuckDuckGo.
  • CHG: updated to foobar2000 SDK 2018-03-06

You can get it via the link from the first post.

Re: foo_run 0.3.8

Reply #564
Thank you Florian,
I use it evey day. Couldn't live w/o it!

Re: foo_run 0.3.8

Reply #565
Thanks for the update, this is one of the essential components for me.

Re: foo_run 0.3.8

Reply #566
thanks Florian


Re: foo_run 0.3.8

Reply #568
And about 0.3.7. Is that normal, that when selected 2 or more files in program opens only one song? For example "c:\Program Files\kid3\kid3.exe" "%_path%", "C:\Program Files\AIMP3\AIMP3.exe" /ADD_PLAY "%path%"

Re: foo_run 0.3.8

Reply #569
Thanks for the update, Florian!  Can't be without this essential tool.

Note to users:  if you "update" over .37, you may not see the new built-in entries for Wikipedia and DuckDuckGo.  At least, that was the case for me (I have custom entries like most of you).  You can add them using the Label/Path below in the run interface:

DuckDuckGo Artist    https://duckduckgo.com/?q=$replace(%artist%, ,+)

Wikipedia Artist         http://en.wikipedia.org/wiki/Special:Search?search=$replace(%artist%, ,_)

Wikipedia Album       http://en.wikipedia.org/wiki/Special:Search?search=$replace(%album%, ,_)

Re: foo_run 0.3.8

Reply #570
And about 0.3.7. Is that normal, that when selected 2 or more files in program opens only one song? For example "c:\Program Files\kid3\kid3.exe" "%_path%", "C:\Program Files\AIMP3\AIMP3.exe" /ADD_PLAY "%path%"
Did you check the "Simultaneous runs" Setting ? (Its next right to the path-textbox, with a slider. You need to set it up for *each* Service you configured.)


Re: foo_run 0.3.8

Reply #572
Quote
Did you check the "Simultaneous runs" Setting ? (Its next right to the path-textbox, with a slider. You need to set it up for *each* Service you configured.)
I did try, but it open each file in new window, not in one.

Re: foo_run 0.3.8

Reply #573
Quote
do you remember any of the actions you've performed when the crash occurred?
It just make crash after staring foobar with 0.3.8


 
SimplePortal 1.0.0 RC1 © 2008-2018