Skip to content

Commit cb28ceb

Browse files
committed
Allow = in URLs
1 parent 81565c9 commit cb28ceb

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## v3.0.2 (2020-08-30)
6+
7+
### Changes
8+
9+
- Allow `=` in the URL for HTTP automation for systems that require it. Everything after the `=` will be ignored.
10+
511
## v3.0.1 (2020-08-25)
612

713
### Bug Fixes

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"displayName": "Homebridge Camera FFmpeg",
33
"name": "homebridge-camera-ffmpeg",
4-
"version": "3.0.1",
4+
"version": "3.0.2",
55
"description": "Homebridge Plugin Providing FFmpeg-based Camera Support",
66
"main": "dist/index.js",
77
"license": "ISC",

src/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ class FfmpegPlatform implements DynamicPlatformPlugin {
4747
this.api = api;
4848
this.config = config as unknown as FfmpegPlatformConfig;
4949

50-
if (!config) {
51-
return;
52-
}
53-
5450
if (this.config.cameras) {
5551
this.config.cameras.forEach((cameraConfig: CameraConfig) => {
5652
let error = false;
@@ -352,7 +348,7 @@ class FfmpegPlatform implements DynamicPlatformPlugin {
352348
if (request.url) {
353349
const parseurl = url.parse(request.url);
354350
if (parseurl.pathname && parseurl.query) {
355-
const name = decodeURIComponent(parseurl.query);
351+
const name = decodeURIComponent(parseurl.query).split('=')[0];
356352
results = this.automationHandler(parseurl.pathname, name);
357353
}
358354
}

0 commit comments

Comments
 (0)