INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Erratic playback of playlists via command line control of MC  (Read 755 times)

haggis999

  • Citizen of the Universe
  • *****
  • Posts: 514
Erratic playback of playlists via command line control of MC
« on: October 29, 2020, 11:29:26 am »

A local instance of MC27 on my Dell workstation is set to load the MC26 library from my HTPC. Most of the media in that library is stored on a NAS, but some of its playlists access media files stored locally on the HTPC.

I have been controlling playback of files contained in those playlists using batch files (triggered via buttons in a PowerPoint presentation). The batch files are stored on the Dell.
 
Code: [Select]
@echo off
MC27.exe /Mode Mini
MC27.exe /PlayReplace TREEPATH=Playlists\PP\Bach, JS - Cantata No 34 [LOC]\

This process worked fine until today, when I created some new versions of those MC26 playlists that access files on the NAS. These new playlists work when played manually via MC27 on my Dell, but the batch files designed to access these new playlists operate in a rather random manner and often play media that doesn't match what was specified in the batch file.

Code: [Select]
@echo off
MC27.exe /Mode Mini
MC27.exe /PlayReplace TREEPATH=Playlists\PP-new\Bach, JS - Cantata No 34 [NAS]\

Are there some obscure limitations of playlists or of MC's commands that explain this strange behaviour?




EDIT on 30 Oct 2020: I reverted to using MC26 playlists on my HTPC that accessed media files stored locally on the HTPC and now they are also suffering the same failures when running the batch files on my Dell! Most of the time, the PlayReplace commands just trigger the last playlist rather then the one I am requesting. As always, manual selection of the playlists is never a problem. Rebooting both the Dell and the HTPC made no difference. I even tried using MC26 on my Dell instead of MC27 but that also failed to fix the problem.

I'm tearing out what remains of my hair over this. It all worked fine for many months  :( :( :(
Logged

haggis999

  • Citizen of the Universe
  • *****
  • Posts: 514
Re: Erratic playback of playlists via command line control of MC
« Reply #1 on: October 30, 2020, 12:07:46 pm »

I've found a way to bypass my problems with the 'Command Line' command /PlayReplace TREEPATH=Playlists\.... (ref https://wiki.jriver.com/index.php/The_Command_Line).

Instead, I tried using the nearest equivalent 'Media Center Core Command' of MCC_PLAY_PLAYLIST (ref https://wiki.jriver.com/index.php/Media_Center_Core_Commands). My batch files now contain entries like MC27.exe /MCC 30007,912859750, where 912859750 is an example of a PlaylistID. So far, this has worked perfectly for all the playlists I have tested, including those that access local media files on the HTPC and those that access files on the NAS.   

The only issue I have with this MCC command is that it is a much less user friendly process, as finding your PlaylistIDs is both tedious and ludicrously non-intuitive (ref https://yabb.jriver.com/interact/index.php?topic=10894.0). I am therefore still very interested in getting some guidance on how to fix my original method. 
Logged

haggis999

  • Citizen of the Universe
  • *****
  • Posts: 514
Re: Erratic playback of playlists via command line control of MC
« Reply #2 on: October 30, 2020, 05:38:09 pm »

I'm embarrassed to admit that my original problem was caused by a failure to read the https://wiki.jriver.com/index.php/The_Command_Line) page carefully enough. The examples at the bottom of that page clearly showed quotation marks around paths to playlists or specified media files, quotation marks that were sadly missing from my own batch files.

For example, I should have used commands such as MC27.exe /PlayReplace TREEPATH="Playlists\PP-new\Bach, JS - Cantata No 34 [NAS]". Including those quotes makes all my original batch files run without any problems.

One thing remains very puzzling. I created similar batch files without those quotes several months ago and they still run without any problems. The only difference between them and the batch files currently under discussion is that they are stored and run on my HTPC, rather than on my Dell workstation.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Erratic playback of playlists via command line control of MC
« Reply #3 on: October 30, 2020, 06:54:04 pm »

That is curious.

Use the quotes, though. Perhaps the original ones don't include any spaces in the Playlist path, and (for whatever reason) the new ones do? I'd think you'd have thought of that, but it's all I've got.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72380
  • Where did I put my teeth?
Re: Erratic playback of playlists via command line control of MC
« Reply #4 on: October 30, 2020, 06:59:09 pm »

The quotes determine whether the string is parsed by the OS into more than one string.  That determines whether the string is interpreted as a single switch or not.

It's possible the string used on the other machine had no spaces in it.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Erratic playback of playlists via command line control of MC
« Reply #5 on: October 30, 2020, 07:07:19 pm »

It's possible the string used on the other machine had no spaces in it.

Yep. I noticed the examples given originally did contain spaces (so no shock there that they didn't work). But, don't know about the still-working old ones.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

haggis999

  • Citizen of the Universe
  • *****
  • Posts: 514
Re: Erratic playback of playlists via command line control of MC
« Reply #6 on: October 31, 2020, 10:17:28 am »

While experimenting with batch files, I tried to play a specific file rather than a playlist, using the format provided in an example at the bottom of the https://wiki.jriver.com/index.php/The_Command_Line page.

Code: [Select]
MC27.exe /Play "G:\xxxxx\My Documents\MS PowerPoint\SRMS\Zoom demo\Bach - Cantata 34 (DSF)\05 V. Tutti. Friede über Israel.dsf"
This batch file was run on my Dell workstation and the file path relates to that computer. It didn't work. Nothing was played. However, I could play the file manually in MC27 by browsing to its location via Drives & Devices.

I took the precaution of copying both the file path and file name from Windows File Explorer and pasting them into the batch file, so I know that those details are correct. Can anyone explain why it is not working?


EDIT:
  Browsing to that file via Drives & Devices was a misleading process. The file was located on my local PC, a Dell workstation, but MC27 on that machine was using the library stored on my HTPC. The correct path to that file within the library on the HTPC should actually have been as follows.

Code: [Select]
MC27.exe /Play "\\DELL_T7500\MS PowerPoint\SRMS\Zoom demo\Bach - Cantata 34 (DSF)\05 V. Tutti. Friede über Israel.dsf 
Logged
Pages: [1]   Go Up