Author Topic: -play feature keeps playing same song  (Read 1841 times)

temp1965

  • Posts: 1
-play feature keeps playing same song
« on: 2 Aug '21 - 22:41 »
Hi,

I was happily using version 3.7 but then I got the xmlibrary issue so I upgraded to xmplay v3.8527. The problem now is whenever I start the program in autoplay mode with -play at the end of my shortcut, it keeps starting with the same song. In version 3.7 it always randomly played a new song every time I started the program. Is there a fix for this or a fix for version 3.7 or perhaps a setting I'm missing? Thanks.

Michael Helman

  • Guest
-play feature keeps playing same song
« Reply #1 on: 5 Aug '21 - 17:54 »
Anyone???

Keltic Danor

  • XMPlay Support
  • Posts: 905
Re: -play feature keeps playing same song
« Reply #2 on: 6 Aug '21 - 08:34 »
I downloaded 3.7 and tried to reproduce your original behavior and I couldn't get XMPlay to play a random track with -play on 3.7 no matter what settings I had.
So I'm not sure how you got 3.7 to act like that in the first place.

Either way though if you have random checked it's probably reasonable to expect it to play a random song when you use the -play to launch it.  :)
« Last Edit: 6 Aug '21 - 09:01 by Keltic Danor »

Ian @ un4seen

  • Administrator
  • Posts: 25724
Re: -play feature keeps playing same song
« Reply #3 on: 6 Aug '21 - 13:54 »
I think the "-play" command-line option has always played the last open file without checking the random setting, so it's a bit puzzling if you did get a random song with XMPlay 3.7. Perhaps you meant that when you open a bunch of files from Windows Explorer, XMPlay would start with a random one of them? If so, XMPlay will sort them by filename by default but that can be disabled by turning off the "Auto-sort by filename (full path)" option in the "Integration" options page.

If that isn't it, please elaborate on what you would like to see the latest XMPlay doing.

cssyphus

  • Posts: 1
Re: -play feature keeps playing same song
« Reply #4 on: 19 Dec '23 - 21:13 »
I believe I was experiencing the same problem as the OP. My symptoms were exactly like the OP described.

Found that the problem was with how I was calling the MP3 via command line.

Calling it like this always just played the last MP3 I had played successfully with XMPlay, regardless of what new MP3 I was passing in:
Code: [Select]
_app = `D:\apps\xmplay38\xmplay.exe`
_mp3 = `D:\Lib\documents\_BACKUPS\WEBSITE DEV\domain\231001_1210 - domain - Site backup\website\assets\AlarmSound.mp3 -play`
run(_app, _mp3)

This fixed the problem - like most Windows apps, XMPlay requires quotes around paths that contain spaces:
Code: [Select]
_app = `D:\apps\xmplay38\xmplay.exe`
_mp3 = `"D:\Lib\documents\_BACKUPS\WEBSITE DEV\domain\231001_1210 - domain - Site backup\website\assets\AlarmSound.mp3" -play`
run(_app, _mp3)

(Note the quotes around the path to the mp3 file...)