Skip to content

Commit

Permalink
Merge pull request #6 from bitfocus/1.0.5
Browse files Browse the repository at this point in the history
1.0.5: Allow variables for recording names
  • Loading branch information
bryce-seifert authored Jan 31, 2022
2 parents 7ea28a7 + 4755955 commit 2d09aa4
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 25 deletions.
34 changes: 17 additions & 17 deletions actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
}
}

;(actions['record'] = {
actions['record'] = {
label: 'Record',
options: [
{
Expand All @@ -41,21 +41,21 @@ module.exports = {
required: true,
},
],
}),
(actions['pause'] = {
label: 'Pause',
options: [
{
type: 'dropdown',
multiple: true,
label: 'Source(s)',
id: 'source',
default: [],
choices: this.sourceList,
required: true,
},
],
})
}
actions['pause'] = {
label: 'Pause',
options: [
{
type: 'dropdown',
multiple: true,
label: 'Source(s)',
id: 'source',
default: [],
choices: this.sourceList,
required: true,
},
],
}
actions['resume'] = {
label: 'Resume',
options: [
Expand Down Expand Up @@ -122,7 +122,7 @@ module.exports = {
required: true,
},
{
type: 'textinput',
type: 'textwithvariables',
label: 'Recording Name',
id: 'recordName',
default: 'New Recording',
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,14 @@ class instance extends instance_skel {
break
case 'setRecordingName':
if (opt.source !== null) {
let recordingName
this.parseVariables(opt.recordName, function (name) {
recordingName = name
})
cmd = `sources/${opt.source}/recording_name`
type = 'PUT'
params = {
recording_name: opt.recordName,
recording_name: recordingName.length ? recordingName : 'New Recording',
}
}
break
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "softron-movierecorder",
"version": "1.0.4",
"version": "1.0.5",
"api_version": "1.0.0",
"keywords": [
"Recording",
Expand All @@ -17,6 +17,6 @@
"author": "Bryce Seifert",
"license": "MIT",
"dependencies": {
"node-fetch": "^2.6.1"
"node-fetch": "^2.6.7"
}
}
2 changes: 1 addition & 1 deletion variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exports.updateSourceVariables = function () {
let destination = source.enabled_destinations[s]
sourceDestinations.push(destination.destination_name)
}
destinations = sourceDestinations.join('\\n')
destinations = sourceDestinations.length ? sourceDestinations.join('\\n') : 'None'
this.setVariable(`rec_status_${source.display_name}`, status)
this.setVariable(`rec_time_elapsed_${source.display_name}`, elapsedTime)
this.setVariable(`rec_time_remaining_${source.display_name}`, remainingTime)
Expand Down
28 changes: 24 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@
# yarn lockfile v1


node-fetch@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
node-fetch@^2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
dependencies:
whatwg-url "^5.0.0"

tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=

webidl-conversions@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=

whatwg-url@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0=
dependencies:
tr46 "~0.0.3"
webidl-conversions "^3.0.0"

0 comments on commit 2d09aa4

Please sign in to comment.