Skip to content

Commit

Permalink
Merge pull request #526 from MrBrax/develop-ts
Browse files Browse the repository at this point in the history
Develop ts
  • Loading branch information
MrBrax authored Dec 27, 2024
2 parents 34a1d96 + d25172d commit 6be4c52
Show file tree
Hide file tree
Showing 7 changed files with 571 additions and 510 deletions.
1,013 changes: 526 additions & 487 deletions Pipfile.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions client-vue/src/components/vod/VodItemBookmarks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { onMounted, ref } from "vue";
import { useI18n } from "vue-i18n";
import type { VODTypes } from "@/twitchautomator";
import type { VODBookmark } from "@common/Bookmark";
import type { RouteLocationRaw } from "vue-router";
const props = defineProps({
vod: {
Expand Down Expand Up @@ -107,8 +108,8 @@ function doDeleteBookmark(i: number) {
});
}
function playerLink(bookmark: VODBookmark) {
if (!props.vod) return;
function playerLink(bookmark: VODBookmark) : RouteLocationRaw {
if (!props.vod) return { name: "Editor" };
return {
name: "Editor",
params: {
Expand Down
6 changes: 6 additions & 0 deletions common/ServerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@ export const settingsFields = createSettingsFields({
default: false,
},

"capture.http_proxy": {
group: "Capture",
text: "HTTP proxy",
type: "string",
},

// sub_lease: { group: "Advanced", text: "Subscription lease", type: "number", default: 604800 },
api_client_id: {
group: "Twitch",
Expand Down
14 changes: 0 additions & 14 deletions server/package-lock.json

This file was deleted.

4 changes: 2 additions & 2 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "livestreamdvr-server",
"version": "1.7.4",
"version": "1.7.5",
"description": "",
"main": "index.ts",
"scripts": {
Expand Down Expand Up @@ -89,4 +89,4 @@
"unplugged": true
}
}
}
}
7 changes: 7 additions & 0 deletions server/src/Core/Providers/Base/BaseAutomator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,13 @@ export class BaseAutomator {
// stop retrying the fetch after COUNT retry attempt(s).
cmd.push("--retry-max", "5");

if (Config.getInstance().cfg("capture.http_proxy", "")) {
cmd.push(
"--http-proxy",
Config.getInstance().cfg("capture.http_proxy", "")
);
}

// logging level
if (Config.getInstance().cfg("capture.loglevel", "info") !== "info") {
cmd.push(
Expand Down
32 changes: 27 additions & 5 deletions server/src/Providers/Twitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1506,28 +1506,50 @@ export class TwitchHelper {
}

public static async checkTTVLolPlugin() {

const bin = Helper.path_streamlink();

if (!bin) {
throw new Error("Streamlink binary not found");
}

const args = [
"--plugin-dir",
BaseConfigDataFolder.streamlink_plugins,
"--twitch-proxy-playlist",
];

const execReturn = await execSimple(bin, args, "streamlink ttv lol plugin check");
let execReturn;

const log = execReturn.stdout.join("\n") + "\n" + execReturn.stderr.join("\n");
try {
execReturn = await execSimple(
bin,
args,
"streamlink ttv lol plugin check"
);
} catch (error) {
log(
LOGLEVEL.ERROR,
"tw.helper.checkTTVLolPlugin",
`Error checking streamlink ttv lol plugin: ${
(error as Error).message
}`,
error
);

return false;
}

if (log.includes("unrecognized arguments: --twitch-proxy-playlist")) {
const fullLog =
execReturn.stdout.join("\n") + "\n" + execReturn.stderr.join("\n");

if (
fullLog.includes("unrecognized arguments: --twitch-proxy-playlist")
) {
return false;
}

return true;
}

}

/*
Expand Down

0 comments on commit 6be4c52

Please sign in to comment.