Skip to Content
It is currently November 22nd, 2019, 3:46 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: December 4th, 2013, 2:17 pm 
Offline
New User
New User

Joined: October 18th, 2013, 5:34 pm
Posts: 2
Brain trust,

I have finally made the full switch to SAM Cast, and am looking for a VBScript of JScript that will pull the data from my XML File that Player101 exports, I'll attach a demo of it below here.

Attachment:
nowplaying.xml [1.22 KiB]
Downloaded 250 times


Our current export directly from the application gives me this artist-title, whereas I'd need it to be artist - title

And using CentovaCast, I don't know if it will be able to include album data or not to acquire the album art, but if that's in the script that would be fantastic.

Any help you guys can offer, I would mucho appreciative!


Top
 Profile  
Reply with quote  
PostPosted: December 4th, 2013, 4:38 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7882
Location: Aachen (Germany)
WayneOwens wrote:
I have finally made the full switch to SAM Cast, and am looking for a VBScript of JScript that will pull the data from my XML File that Player101 exports, I'll attach a demo of it below here.

That's what you think you are looking for. But you misunderstand the Event-based mechanism of the Event Adapters.

Instead it wants your automation system to do one of the following things:
  1. Send an HTTP GET Request to the integrated webserver with all the fields as URL parameters
  2. Send TCP Request to the internal webserver of SAM Cast, sending the data in any plain text format
  3. Provide a TCP server socket where it will provide the relevant data in any plain text format
  4. Send the data over a serial connection (RS232/COM) in any plain text format

The VBScript/JScript part of SAM Cast just processes the plain text it receives via TCP or Serial connection into seperate fields.
You could of course write a Filesystem monitor that checks a file for changes in VBScript or JScript if that is your preferred programming language.
I'm not sure if the Windows Scripting Host allows for long-running/infinitely-running scripts, though.

Trying to find out about the technical details of Player101 is kinda hard. The only information I could find was that the software was renamed to Player101 in 2007 when RCS bought the original developers of that software. However the press release from 2007 is the latest information I could find.
Maybe you can find out more in the documentation you might have, especially if it's possible to send the metadata out of that software in any other way then writing it to a file.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: December 4th, 2013, 5:31 pm 
Offline
New User
New User

Joined: October 18th, 2013, 5:34 pm
Posts: 2
Well, it has a TCP-IP option for export...should I try this setting to see what I get with this option?


Top
 Profile  
Reply with quote  
PostPosted: December 5th, 2013, 5:28 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7882
Location: Aachen (Germany)
That's the way to go.
You enable the TCP export in Player101 and in SAM Cast you enable the TCP Event Handler.
If the TCP export is the same XML as to the file, you might be able to use the example from the scripts directory "vb.xml_parser.txt"

There's two possible caveats:
  1. The XML structure is not exactly like what the example expects, though it should be similar enoug. (There's an extra wrapping element around <audio> and the XML file you provided is valid XML while the comments for the example lack mandatory root elements)
  2. The XML you provided has linebreaks. As far as I understood the documentation for SAM Cast Event Handlers, it expects the input to have NO linebreaks and every linebreak would be treated as a new Event. But that might as well be a misunderstanding.

I'm not really good at Visual Basic. I know enough to make sense out of the examples and get a rough estimate what they do, but I couldn't write a handler in VB from scratch. This just so you don't put too high expactations in what I write here.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group