This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var net = require('net'); | |
var url = require('url'); | |
//Config Settings | |
var HOST = 'demo.trms.com'; | |
var PORT = 56906; | |
var USERNAME = 'Admin'; | |
var PASSWORD = 'demotrms'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Grab a SHA1 of the first 100MB file | |
LogToolbox.TraceMessage(string.Format("{0}: Generating SHA1: {1}", m_Parent.CMName, file.Key)); | |
using (HashAlgorithm sha = new SHA1CryptoServiceProvider()) | |
{ | |
FileStream fs = null; | |
try | |
{ | |
int bytesToSHA = 1024 * 1024 * 100; //100MB | |
byte[] first100MB = new byte[bytesToSHA]; | |
fs = new FileStream(file.Key, FileMode.Open, FileAccess.Read); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
This script prints an html table of all shows that are availalbe for VOD on the server | |
The shows must have valid event dates that are in the past | |
*/ | |
//SETUP | |
date_default_timezone_set('America/New_York'); //Probably doesn't really matter. A few hours shouldn't make a difference | |
$serverAddress = "http://pittsfieldtv.dyndns.org/"; //This will be where you can publically log onto front door. Rembember to leave off trailing slash | |
$channelID = 1; //One will work for most stations unless you've deleted channels in the past | |
//END SETUP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Setup Content drives and Destination path | |
$contentPaths = array("/Volumes/VS400/", "/Volumes/SXServer/", "/Volumes/SXSafe/"); | |
$destinationPath = "/Volumes/VODContent/mp4/"; | |
$transcodeCommand = "HandBrakeCLI --preset \"iPhone & iPod Touch\" --width 320 --vb 500 --two-pass --turbo --optimize "; | |
//pid class used to determine if script is already running. | |
class pid { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Configure Script | |
$displayUpcomingNum = 4; // Changes number of upcoming shows to display | |
$server = "http://frontdoor.ctn5.org/"; //include trailing backslash | |
$channelID = 1; //Cablecast Channel ID | |
date_default_timezone_set("America/New_York"); | |
//End Configure | |
$server = $server."CablecastWS/CablecastWS.asmx?WSDL"; //Generates Link to WSDL file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Configure Script | |
$server = "http://frontdoor.ctn5.org/"; //include trailing backslash | |
$channelID = 1; //Cablecast Channel ID | |
$defualtSource = "Community Bulletin Board"; | |
date_default_timezone_set("America/New_York"); | |
//End Configure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$view = new view; | |
$view->name = 'Schedule'; | |
$view->description = 'Schedule'; | |
$view->tag = ''; | |
$view->view_php = ''; | |
$view->base_table = 'node'; | |
$view->is_cacheable = FALSE; | |
$view->api_version = 2; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ | |
$handler = $view->new_display('default', 'Defaults', 'default'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Setup Content drives and Destination path | |
$contentPaths = array("/Volumes/VS400/", "/Volumes/SXServer/", "/Volumes/SXSafe/"); | |
$destinationPath = "/Volumes/VODContent/mp4/"; | |
$transcodeCommand = "HandBrakeCLI --preset \"iPhone & iPod Touch\" --width 320 --vb 500 --two-pass --turbo --optimize "; | |
//Define some functions to do various tasks | |
function dirList ($directory) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cablecast_client = new SoapClient("http://demo.trms.com/CablecastWS/CablecastWS.asmx?WSDL"); | |
$showInfo = $cablecast_client->GetShowInformation(array("ShowID" => 21978)); | |
$showInfo = $showInfo->GetShowInformationResult; | |
$params = array("ShowID" => $showInfo->ShowID, | |
"LocalID" => $showInfo->LocalID, | |
"Title" => $showInfo->InternalTitle, | |
"CGTitle" => $showInfo->Title, | |
"ProjectID" => 18, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function updateProjectIDforShow($show_id, $project_id) { | |
if($cablecast_client = $this->get_cablecast_client()) { | |
$showInfo = $cablecast_client->GetShowInformation($show_id); | |
$showInfo = $showInfo->GetShowInformationResult; | |
$params = array("ShowID" => $showInfo->ShowID, | |
"LocalID" => $showInfo->LocalID, | |
"Title" => $showInfo->InternalTitle, | |
"CGTitle" => $showInfo->Title, |