PFA: Open with music player in random order

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

PFA: Open with music player in random order

Post by binocular222 »

I assigned music files to be opened with Media Player Classic Home Cinema and Winamp. When I select multiple files and press Enter, the files are sent to these music player but the Playlist is random (with the same selection but each time I open, the music player generate a Playlist with different order) .
I don't know whether it's due to XYplorer's PFA sent the files in random order or due to the Music Player.
I turned off all the "random/shuffle" options in those players.

Anyone experience the same?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: PFA: Open with music player in random order

Post by Marco »

Just guessing here: are you sure they are truly random?
Or, assuming your list in XY is

Code: Select all

A
B
C
D
E
you get

Code: Select all

C
D
E
A
B
ie. still in order, but with a different starting point?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: PFA: Open with music player in random order

Post by binocular222 »

Yes, it's.
It's random on each time I openwith MPC-HC or Winamp
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: PFA: Open with music player in random order

Post by bdeshi »

Are your music files named with just the title and not patterns like artist - title etc?
Music player might be sorting them by title, artist or something.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: PFA: Open with music player in random order

Post by FluxTorpedoe »

I confirm this behavior, it's been there since the beginning of PFA.
It happens with some players but not all, regardless of the filenames, and same for audio or video.

For example it's also the case with LightAlloy (v4.4 [ultra-fast] and latest 4.7) but not with foobar...

It's definitely caused by the way the info is handled by PFA to the softs, because this behavior doesn't happen with drag'n drop on those same players.

It's easy to repro the randomness. In a folder of audio (or video) files:
1. Click on a file to focus it
2. Shift+DownArrow a few times to select a few files
3. Enter
=> Player is launched with the playlist in a particular order
4. Close player
=> XY regains focus
5. Enter
=> Player is launched with the playlist in a different order
Repeat steps 4. and 5. adlib, the playlist changes each time.

In case that may give another hint, it's interesting to note that sometimes two versions of the players open with the playlist split between them...

Weird... :mrgreen:

binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: PFA: Open with music player in random order

Post by binocular222 »

Thanks Flux for confirming this.
Another thing I notice is when the CPU is busy, weird things happens more often (i.e: for MPC-HC, I select 10 files but only 8 of which are passed to MPC-HC. Also, multiple instance of MPC-HC tends to happens more often if the CPU is at high load).
So, I doubt that the speed at which XY process files may affect the outcome
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: PFA: Open with music player in random order

Post by FluxTorpedoe »

I just realized this issue is [Solved] !
Thanks for this and for the new <pfaitems> too! :appl:
v15.00.0119 - 2015-03-21 09:54
* File | Open Selected Item(s): Experimentally changed the behavior of this
core function, i.e. what happens on pressing ENTER on selected list items.
• Now there’s two things I can’t figure out —nothing critical though— with the new behavior (OpenAllSelectedInMultipleInstances=0):

1. To open several similar files (e.g. several "doc" or several "txt"), XY "knows" that Word needs only one window but Notepad needs several instances, and XY opens them accordingly.
How could this be done in scripting with the openwith command?

Code: Select all

openwith "Notepad", , <selitems |>; // Only 1 Notepad is opened with the first file.
openwith "Notepad", "auto", <selitems |>; // Could an "auto" act as "m" when needed?
2. Similarly, in SC/PFA, if we need to fallback to windows default applications, is it possible to open several items?
I tried with <pfaitems> and <selitems> and with "|" and "<crlf>" separators.

Something along the lines of:

Code: Select all

open <pfaitems |>, "w";    // Works but with a single file only
openwith , , <pfaitems |>; // Several files but requires an application
Do you think it is/would be possible?

Have a nice day, 8)
Flux

Post Reply