-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5d378a
commit f729977
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Disable Live Content for P2G packages | ||
|
||
**Issue:** | ||
|
||
IIS 7.0 on Windows Server 2012 does not support WMV streaming (Microsoft Media Server); cannot setup following Mediasite content server. | ||
|
||
**Why is it an issue?** | ||
|
||
You can't proceed at importing such presentations (usually those from previous Mediasite Server versions). | ||
|
||
**So?** | ||
|
||
Update Mediasite Presentation XML file with `IsLive` set to **false** and `LiveStatus` **0**. | ||
|
||
## SYNOPSIS | ||
|
||
`p2g_fix.exe --live *P2G *P2G *P2G [...]` | ||
|
||
## NOTES | ||
|
||
* Does not support zipped packages (unzip them first). | ||
* [Perl2Exe](http://www.indigostar.com/perl2exe.php) | ||
* _IDE_ Notepad | ||
|
||
## DISCLAIMER | ||
|
||
Don't blame me. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
use strict; | ||
use warnings 'all'; | ||
|
||
use File::Glob 'bsd_glob'; | ||
|
||
# ===== MAIN ===== | ||
# --- OPTIONS --- | ||
err(qq(bad option, use '--live')) | ||
unless shift eq '--live'; | ||
# --- RUN --- | ||
p2g_fix(@ARGV); | ||
# ================ | ||
|
||
sub p2g_fix { | ||
|
||
# PERLDOC | ||
# Win32 users should use the real slash. | ||
# If you really want to use backslashes, | ||
# consider using Sarathy's File::DosGlob | ||
|
||
while (defined(my $p2g = shift)) { | ||
err(qq("$p2g" not a directory)) unless -d $p2g; | ||
|
||
my ($xml) = grep( | ||
/MediasitePresentation_\d{2}\.xml$/i, | ||
bsd_glob(qq($p2g/*), File::Glob::GLOB_ERR | File::Glob::GLOB_NOSORT) | ||
); | ||
err(qq(Error reading "$p2g")) if File::Glob::GLOB_ERROR; | ||
|
||
local @ARGV = $xml || err(qq("$p2g" please specify P2G directory)); | ||
|
||
# live_content_fix | ||
my $fix = 0; | ||
msg($p2g, 'found backup file, not proceeding'),next | ||
if -e $xml.'.bak'; | ||
|
||
# in-place edit with a backup file | ||
local $^I = '.bak'; | ||
while (<>) { | ||
s/$1/false/,$fix++ if /<IsLive>(true)</i; | ||
s/$1/0/,$fix++ if /<LiveStatus>(1)</i; | ||
print; | ||
} | ||
|
||
msg($p2g, $fix == 2 ? "Live Content fixed" : "OK"); | ||
} | ||
} | ||
|
||
sub msg {print shift, ' >> ', shift, "\n"} | ||
sub err {die '(ERR) ' . shift . "\n"} |