INTERACT FORUM

Please login or register.

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

Author Topic: External script needs to know play info  (Read 1539 times)

Yummycarp

  • Recent member
  • *
  • Posts: 35
External script needs to know play info
« on: February 06, 2012, 05:15:43 pm »

I am launching an external script instead of directly playing a DVD. I happen to be using windows Powershell .ps1 script but that really doesn't matter. When i initiate PLAY, obviously MC knows what what chosen but i need my external script to know all the data fields like [artist], [name],[Genre] and even some custom fields I added.

I didn't see any data field request commands from the mc17.exe /mcc mechanism.

Help!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: External script needs to know play info
« Reply #1 on: February 06, 2012, 07:31:07 pm »

Have you had a look at the MCWS server?

Eg:

   http://localhost:52198/MCWS/v1/Playback/Playlist?Zone=-1
For some instructions, go to:

  http://localhost:52198/MCWS/v1/

Media Network needs to be enabled (Tools > Options > Media Network > Use Media Network to share this library and enable DLNA).
Logged
The opinions I express represent my own folly.

Yummycarp

  • Recent member
  • *
  • Posts: 35
Re: External script needs to know play info
« Reply #2 on: February 06, 2012, 07:47:28 pm »

I was just looking there and the only problem is that the INFO request does not return my custom fields CHANGER and SLOT. It returns a predefined record of info.

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<Response Status="OK">
<Item Name="State">2</Item>
<Item Name="FileKey">10044</Item> <Item Name="PositionMS">576730</Item>
<Item Name="DurationMS">8402852</Item>
<Item Name="ElapsedTimeDisplay">9:36</Item>
<Item Name="RemainingTimeDisplay">-2:10:26</Item>
<Item Name="TotalTimeDisplay">2:20:02</Item>
<Item Name="PositionDisplay">9:36 / 2:20:02</Item>
<Item Name="PlayingNowPosition">0</Item>
<Item Name="PlayingNowTracks">1</Item>
<Item Name="PlayingNowPositionDisplay">1 of 1</Item>
<Item Name="PlayingNowChangeCounter">4</Item>
<Item Name="Bitrate">20460</Item>
<Item Name="SampleRate">0</Item>
<Item Name="Channels">0</Item>
<Item Name="Chapter">0</Item>
<Item Name="Volume">0.33</Item>
<Item Name="VolumeDisplay">33%</Item>
<Item Name="ImageURL">MCWS/v1/File/GetImage?File=10044</Item>
<Item Name="Name">Batman Begins</Item> </Response>
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: External script needs to know play info
« Reply #3 on: February 06, 2012, 07:55:50 pm »

Add those columns to the Playing Now playlist.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: External script needs to know play info
« Reply #4 on: February 06, 2012, 08:06:27 pm »

Logged
The opinions I express represent my own folly.

Yummycarp

  • Recent member
  • *
  • Posts: 35
Re: External script needs to know play info
« Reply #5 on: February 06, 2012, 09:57:24 pm »

Add those columns to the Playing Now playlist.

good idea and when I did the correct values displayed in those columns in Detail View but the output from the MCWS INFO call is not affected. That seems like a set record call so my custom fields were not included.
Logged

Yummycarp

  • Recent member
  • *
  • Posts: 35
Re: External script needs to know play info
« Reply #6 on: February 06, 2012, 10:09:57 pm »

this command returns all the slot numbers
http://localhost:52199/MCWS/v1/Library/Values?Field=Slot

this command returns all the changer numbers
http://localhost:52199/MCWS/v1/Library/Values?Field=Changer

this command DOES NOT return all the slot numbers and changer numbers as the documention suggests.
http://localhost:52199/MCWS/v1/Library/Values?Field=Slot,Changer

can I modify this command to give me just the Slot for the playing NOW, for example
http://localhost:52199/MCWS/v1/Library/Values?Field=Slot&Zone=3&playingNow=yes
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: External script needs to know play info
« Reply #7 on: February 06, 2012, 10:19:30 pm »

good idea and when I did the correct values displayed in those columns in Detail View but the output from the MCWS INFO call is not affected. That seems like a set record call so my custom fields were not included.

They will be.  There is some caching apparently, and I didn't look into the duration.  If you force a reload of the web request, the new fields will appear.  Same thing with removing columns from the playlist.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: External script needs to know play info
« Reply #8 on: February 06, 2012, 10:26:50 pm »

this command returns all the slot numbers
http://localhost:52199/MCWS/v1/Library/Values?Field=Slot

this command returns all the changer numbers
http://localhost:52199/MCWS/v1/Library/Values?Field=Changer

this command DOES NOT return all the slot numbers and changer numbers as the documention suggests.
http://localhost:52199/MCWS/v1/Library/Values?Field=Slot,Changer

can I modify this command to give me just the Slot for the playing NOW, for example
http://localhost:52199/MCWS/v1/Library/Values?Field=Slot&Zone=3&playingNow=yes

Field != Fields

Eg:

Code: [Select]

http://localhost:52198/MCWS/v1/Playback/Playlist?Zone=-1&Fields=Reference ID,Date (baseline)

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="MCWS - Files - 4512">
<Item>
<Field Name="Key">9654283</Field>
<Field Name="Reference ID">1413</Field>
<Field Name="Date (baseline)">40929.9769599999999628</Field>
</Item>
</MPL>

Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up