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_skip: skip tracks that match a specified search query (Read 305406 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_skip: skip tracks that match a specified search query

Reply #750
Hm, nevermind, it's not working again. The console says "Using decoder shim instead of DSP: Skip Track."

Edit: So many edits... As it turns out, I had the "skip tracks" option turned off in the Playback menu, so I turned it on and tried it again. However, now it's back to freezing up foobar2k. I'm on 2.0, x86 if I recall (since so many plugins haven't been updated yet). It was lagging pretty hard, but I had to console open and it looked like it skipped tracks that weren't under 60 seconds anyway. Eventually it froze my computer entirely lol. Memory leak?

In any case, I'm just gonna use a playlist search filter instead to hide songs shorter than 60 seconds for now.

Re: foo_skip: skip tracks that match a specified search query

Reply #751
I'm trying to skip songs that have a duration of 60 seconds or less, but it seems to lag foobar to the point of being unusable when I try to enable this. Is this correct?

%length% LESS 60

Edit: Updating to 1.37 seems to have fixed it (looks like it works better if you use the default %length_seconds% LESS 60 instead)
Remember, you can always test queries that don't use Skip Track specific fields easily in Library -> Search. Both your strings produce the exact same results.

Hm, nevermind, it's not working again. The console says "Using decoder shim instead of DSP: Skip Track."

Edit: So many edits... As it turns out, I had the "skip tracks" option turned off in the Playback menu, so I turned it on and tried it again. However, now it's back to freezing up foobar2k. I'm on 2.0, x86 if I recall (since so many plugins haven't been updated yet). It was lagging pretty hard, but I had to console open and it looked like it skipped tracks that weren't under 60 seconds anyway. Eventually it froze my computer entirely lol. Memory leak?

In any case, I'm just gonna use a playlist search filter instead to hide songs shorter than 60 seconds for now.
That query string can skip all your tracks if you have enabled the option "Treat query as titleformat string (required for streams)". With that option enabled the skip string isn't using query syntax but standard titleformatting. In titleformat mode any string that returns zero or blank output will mean no skip, anything else means skip. Your "skip anything less than 60 seconds long" skip can be written in titleformat code as:
Code: [Select]
$ifgreater(%length_seconds%,59,0,1)

Skipping tracks fast can easily be taxing for your system. You may have components that for example try to start downloading song lyrics or album art for the files. And if these special functionalities are created with interpreted languages using the Javascript panels the demand for your computer's resources is even higher. But the entire machine should never lock up, but of course it might look that way if you have some very heavy processes running with realtime priority and you somehow manage to run out of memory. But with 32-bit foobar2000 running out of memory is unlikely, it can only use 4 GB of RAM. But of course if you have components that spawn worker processes each worker can also consume 4 GB.
Woud be curious to know what makes things go so bad for you. Could you use  Process Explorer and double click the foobar2000 process and then open the Threads tab. That should show which component or part of the player uses all the processing power. Perhaps set foobar2000 process priority to low before starting. And if you see memory use indeed go super high so that your machine would start swapping you can suspend the process from right click context menu.

Re: foo_skip: skip tracks that match a specified search query

Reply #752
Is there a way to NOT skip a track if it has a certain tag, when it would otherwise be skipped?
Think millionaire, but with cannons.

Re: foo_skip: skip tracks that match a specified search query

Reply #753
Is there a way to NOT skip a track if it has a certain tag, when it would otherwise be skipped?
You can do this with titleformatting, no? Something like:
Code: [Select]
(%donotskip% MISSING) AND (%rating% IS 1 OR %otherquery% LESS 5)

Re: foo_skip: skip tracks that match a specified search query

Reply #754
Is there any chance to make the %skip_count% tag optional (on/off), or making it user configurable so it populates a different field instead (e.g. %play_counter%)?

Seems like it was added in this version:
https://www.foobar2000.org/components/view/foo_skip/release/1.27

A component offering similar functionality, foo_skipcount was released which also tries using %skip_count% and this (or a similar solution) would alleviate the naming conflict:
https://hydrogenaud.io/index.php/topic,124742.0.html

Not sure what is the best solution here, so I asked in both topics.

Thanks for this component by the way Case, has been essential for me for many years now :)

Re: foo_skip: skip tracks that match a specified search query

Reply #755
You can do this with titleformatting, no? Something like:
Code: [Select]
(%donotskip% MISSING) AND (%rating% IS 1 OR %otherquery% LESS 5)
I tried using if statements and such, but I couldn't get it to work. I also don't know what kind of arguments are valid (like "MISSING", I had no idea that was a thing.) What I need is for it to not skip a song if %pla_stop_focused_track_active% is equal to %list_index%, and then skip songs based on my currently working script, which is
Code: [Select]
%rating% IS 1 OR %rating% IS 2 OR %last_played% DURING LAST 8 HOURS
Do you know how I would write this? Thanks for responding earlier.
Think millionaire, but with cannons.

Re: foo_skip: skip tracks that match a specified search query

Reply #756
Is there any chance to make the %skip_count% tag optional (on/off), or making it user configurable so it populates a different field instead (e.g. %play_counter%)?
I'll change the field name.

What I need is for it to not skip a song if %pla_stop_focused_track_active% is equal to %list_index%, and then skip songs based on my currently working script, which is
Code: [Select]
%rating% IS 1 OR %rating% IS 2 OR %last_played% DURING LAST 8 HOURS
Do you know how I would write this? Thanks for responding earlier.
As documentation states, %list_index% is only valid in certain contexts, like in playlist viewer. It has no meaning for Skip Track. And unfortunately as the API functions to get playlist information are only valid from main thread, I can only get information about playing track's position in the playing playlist with delay - too late to be used for skip check. I could simulate it with elaborate workarounds as long as playback order isn't random, but I would rather not.

Re: foo_skip: skip tracks that match a specified search query

Reply #757
I tried using if statements and such, but I couldn't get it to work. I also don't know what kind of arguments are valid (like "MISSING", I had no idea that was a thing.)
Sorry, by titleformatting I meant to say query syntax. Here is the wiki page that goes through what options are available:
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Query_syntax

Remember that you can influence how a query is evaluated by using ( ), AND, OR etc. in the right places (if you need to check for multiple conditions).

Case already explained the situation with %list_index% in this...case.

I'll change the field name.
Thanks!

Re: foo_skip: skip tracks that match a specified search query

Reply #758
I could simulate it with elaborate workarounds as long as playback order isn't random, but I would rather not.
I understand. I won't ask you to do something like that. I will have to be careful when setting the final track I want to listen to. Thank you for the information, everyone!
Think millionaire, but with cannons.

 

Re: foo_skip: skip tracks that match a specified search query

Reply #759
Wow i never new I needed this component thanks for updating it!

Its perfect I have set it to skip all christmas songs what i have been doing up until now was have all christmas songs in a folder and then move the folder out of my music location but this is much easier and can just remove it the query when christmas time comes around

I just put %Genre% HAS Christmas

all my christmas songs are tagged with their main genre; Cristmas so this works easy