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 334339 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
PC - Teac UD-505 - Adam Audio A4V - DCA ÆON Open X
Samsung S23 Ultra 512GB - Fiio UTWS5 - TinHifi P1 Max.

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

Reply #760
Is there any way to make skip track work only on certain playlists?
I have three playlists: A, B, and C. I only want the skip track function to work on playlist C. Is there any way to make this happen?


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

Reply #761
please ignored my dumb question before. I found the info on the foobar component page.

"%playlist_name% returns the name of the playlist where the current file is played from"

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

Reply #762
Hi, I'm currently using this skip format, but does anyone know how to make it more random, as in Random or Shuffle mode it nearly always repeats the order. any help appreciated.

rating IS 2 OR rating IS 0 OR %last_played% DURING LAST $playlist_length(minutes, 90) MINUTES

I've been experimenting with %played_per_day% to see if this could work but not worked out anything as yet.

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

Reply #763
Hey Case, just installed foo_skip 1.38 on fb 2.1 and noticed Preferences are cut off on right side...

Win10 (22H2 / 19045.3803) on 2nd monitor 1080p with display scaling 125% (no problem at 100%)

(It could be the crappy display drivers on my music laptop here? - Intel UHD Graphics 600 - curious that no-one has reported it so far)


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

Reply #764
Thanks for notifying. Display drivers can't cause such issues. Waveform Minibar had similar looking bug so I think the cause is the same.
The config screen resource uses a different default font than foobar2000 which causes automatic DPI scaling calculations to be off. I'll try to get updates out soon.

Edit: Fixed version uploaded to the repository.

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

Reply #765
Hi there!
@Case,
I noticed that there is no option to add a bookmark for the following playlist items due to the menu option not appearing.
Here are some links (the first two for the Youtube Source component) and an XM module for testing:
Code: [Select]
www.youtube.com/watch?fb2k_artist=PYLOT&fb2k_search_title=The+Return&fb2k_title=The+Return&v=Oddp32TODKs
fy+https://soundcloud.com/hansee/hansee-mordi-muffin
ftp://ftp.modland.com/pub/modules/Impulsetracker/Mick Rippon/belief.it
However, the feature to add a bookmark automatically works fine.
It would also be convenient to duplicate the feature of adding a bookmark using the context menu by right-clicking on the selected playlist element.

Thx.

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

Reply #766
I feel like I am missing something but how do I delete a skip text line?
PC - Teac UD-505 - Adam Audio A4V - DCA ÆON Open X
Samsung S23 Ultra 512GB - Fiio UTWS5 - TinHifi P1 Max.

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

Reply #767
You can remove a skip query from the history by right clicking on the drop down arrow at the end of the text field. There's also an option to wipe all entries at once.

@Sergey77 - sorry, I had missed your issue report. I'll fix that for the next release.

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

Reply #768
You can remove a skip query from the history by right clicking on the drop down arrow at the end of the text field. There's also an option to wipe all entries at once.

@Sergey77 - sorry, I had missed your issue report. I'll fix that for the next release.
Oh, it's nothing, @Case
Thanks for your reply. :)

 

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

Reply #769
You can remove a skip query from the history by right clicking on the drop down arrow at the end of the text field. There's also an option to wipe all entries at once.

@Sergey77 - sorry, I had missed your issue report. I'll fix that for the next release.
Ah ON the arrow how smart thank you for the help I had been clicking pretty much everywhere else lol
PC - Teac UD-505 - Adam Audio A4V - DCA ÆON Open X
Samsung S23 Ultra 512GB - Fiio UTWS5 - TinHifi P1 Max.