Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

comment tweakage

  • Loading branch information...
commit 3f6dd9720fb0c796e40d6a6f5ca50b2ec5a39df3 1 parent 4bb6103
@chocolateboy authored
View
4 TODO.groovy
@@ -313,3 +313,7 @@ transcoder = new NullTranscoder()
/// FIXME: MPlayer can't dump to stdout: http://lists.mplayerhq.hu/pipermail/mplayer-users/2006-April/059898.html
// need better vlc detection
+
+// make the rtmp2pms functionality available via a web page (e.g. GitHub page) using JavaScript:
+// i.e. enter 1) name/path 2) the command line 3) optional thumbnail URI and click to generate the WEB.conf
+// line
View
8 src/main/groovy/com/chocolatey/pmsencoder/Action.groovy
@@ -99,12 +99,6 @@ class Action {
Util.quoteURI(uri)
}
- /*
- 1) get the URI pointed to by options['uri'] or command.getVar('$URI') (if it hasn't already been retrieved)
- 2) perform a regex match against the document
- 3) update the stash with any named captures
- */
-
// define a variable in the stash
// DSL method
void let(Map map) {
@@ -256,7 +250,7 @@ class Action {
// TODO support named captures
log.debug("replacing $search with $replace in $name")
def value = context[ index + 1 ]
- // XXX bugfix: strings are immutable!
+ // XXX squashed bug: strings are immutable!
context[ index + 1 ] = value.replaceAll(search.toString(), replace.toString())
} else {
log.warn("can't replace $search with $replace in $name: target out of bounds")
View
5 src/main/groovy/com/chocolatey/pmsencoder/ProfileDelegate.groovy
@@ -146,6 +146,11 @@ class ProfileDelegate {
scrape(regex, [:])
}
+ /*
+ 1) get the URI pointed to by options['uri'] or command.getVar('$URI') (if it hasn't already been retrieved)
+ 2) perform a regex match against the document
+ 3) update the stash with any named captures
+ */
public boolean scrape(Object regex, Map options) {
String uri = (options['uri'] == null) ? command.getVar('$URI') : options['uri'].toString()
String document = (options['source'] == null) ? cache[uri] : options['source'].toString()
View
3  src/main/resources/scripts/BEGIN.groovy
@@ -1,5 +1,4 @@
begin {
- // see https://secure.wikimedia.org/wikipedia/en/wiki/YouTube#Quality_and_codecs
IPAD_USER_AGENT = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) ' +
'AppleWebKit/531.21.10 (KHTML, like Gecko) ' +
'Version/4.0.4 Mobile/7B334b Safari/531.21.10'
@@ -16,7 +15,7 @@ begin {
SOPCAST = pmsConf['sopcast.path']
SOPCAST_URI = pmsConf['sopcast.uri'] ?: 'http://127.0.0.1:8902/stream' // only used if SOPCAST is defined
VLC = pmsConf['vlc.path']
- // see https://secure.wikimedia.org/wikipedia/en/wiki/YouTube#Quality_and_codecs
YOUTUBE_DL = pmsConf['youtube-dl.path']
+ // see https://secure.wikimedia.org/wikipedia/en/wiki/YouTube#Quality_and_codecs
YOUTUBE_DL_MAX_QUALITY = pmsConf['youtube-dl.max-quality'] ?: 22
}
View
9 src/main/resources/scripts/INIT.groovy
@@ -16,7 +16,7 @@ init {
def mplayerLogLevel = $PMS.isWindows() ? 'all=1' : 'all=2'
/*
- Matcher-level (global) lists of strings that provide provide useful default options
+ Matcher-level (global) lists of strings that provide useful default options
for ffmpeg (downloader/transcoder), mplayer (downloader) and mencoder (downloader, transcoder)
$DOWNLOADER = $MPLAYER:
@@ -47,7 +47,8 @@ init {
matcher-scoped (i.e. global): $FFMPEG, $FFMPEG_OUT, $MENCODER, and $MPLAYER are lists of strings,
but, as seen below, can be assigned strings (which are split on whitespace).
- profile-scoped: $DOWNLOADER, $TRANSCODER, $OUTPUT and $HOOK are similar, but only have profile-scope
+ profile-scoped: $DOWNLOADER, $TRANSCODER, $OUTPUT and $HOOK are similar, but are only defined in the context
+ of a profile block.
*/
// default ffmpeg transcode command - all of these defaults can be (p)redefined in a userscript (e.g. BEGIN.groovy)
@@ -64,7 +65,7 @@ init {
// default mencoder transcode command
if (!$MENCODER) {
$MENCODER = [
- 'MENCODER', // XXX add support for mencoder-mt
+ 'MENCODER', // TODO add support for mencoder-mt
'-msglevel', 'all=2',
'-quiet',
'-prefer-ipv4',
@@ -94,7 +95,7 @@ init {
youtube $YOUTUBE_ACCEPT - [ 37 ]
- add '2304p':
+ add '3072p':
youtube([ 38 ] + $YOUTUBE_ACCEPT)
View
2  src/main/resources/scripts/eurogamer.groovy
@@ -10,7 +10,7 @@ script {
$DOWNLOADER = $MPLAYER
downloader {
- // -referrer requires a recent-ish MEncoder (from June 2010)
+ // -referrer requires a recent-ish MEncoder (>= June 2010)
set '-referrer': $URI
}
View
2  src/main/resources/scripts/navix.groovy
@@ -33,7 +33,7 @@ init {
def value = pair.value
if (value)
- value = URLDecoder.decode(pair.value)
+ value = URLDecoder.decode(value)
switch (name) {
case 'url':
View
9 src/main/resources/scripts/rtmpdump.groovy
@@ -1,8 +1,8 @@
/*
- rtmpdump://channel?url=http%3A//example.com&-y=yvalue&-c=cvalue
+ rtmpdump://channel?-v&-r=http%3A//example.com&-y=yvalue&-W=Wvalue
-o is set automatically
- -r or -rtmp is required
+ -r or --rtmp is required
boolean values can be set without a value e.g. rtmpdump://channel?url=http%3A//example.com&--live&--foo=bar
values *must* be URL-encoded
keys can be, but hyphens are not special characters, so they don't need to be
@@ -25,7 +25,7 @@ init {
def value = pair.value
if (value)
- value = URLDecoder.decode(pair.value)
+ value = URLDecoder.decode(value)
switch (name) {
case 'url': // deprecated
@@ -45,10 +45,11 @@ init {
}
if (seenURL) {
+ // rtmpdump doesn't log to stdout, so no need to use -q on Windows
$DOWNLOADER = "$RTMPDUMP -o $DOWNLOADER_OUT -r ${$URI}"
$DOWNLOADER += rtmpdumpArgs
} else {
- log.error("invalid rtmpdump:// URI: no url parameter supplied: ${$URI}")
+ log.error("invalid rtmpdump:// URI: no -r or --rtmp parameter supplied: ${$URI}")
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.