diff --git a/.github/workflows/check-client.yml b/.github/workflows/check-client.yml index 696d7450..d1c22738 100644 --- a/.github/workflows/check-client.yml +++ b/.github/workflows/check-client.yml @@ -19,7 +19,9 @@ jobs: matrix: node-version: [18.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + submodules: "true" - name: Node.js uses: actions/setup-node@v1 with: @@ -27,7 +29,10 @@ jobs: - run: npm install -g yarn - name: yarn install, lint and build run: | - cd ./client-vue + cd ./twitch-vod-chat + yarn install --immutable --immutable-cache + yarn buildlib + cd ../client-vue yarn install --immutable --immutable-cache yarn lint yarn test diff --git a/Dockerfile b/Dockerfile index 353afaa1..d8ada305 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,6 +52,7 @@ COPY --chown=node:node --chmod=775 ./twitch-vod-chat /usr/local/share/twitchauto RUN cd /usr/local/share/twitchautomator/twitch-vod-chat \ && yarn install --immutable --immutable-cache \ && yarn build --base=/vodplayer \ + && yarn buildlib \ && rm -rf node_modules \ && rm -rf .yarn/cache \ && yarn cache clean --all @@ -111,6 +112,7 @@ COPY ./docker/fonts /home/node/.fonts # twitchautomator docker specific configs ENV TCD_BIN_DIR=/usr/local/bin ENV TCD_FFMPEG_PATH=/usr/bin/ffmpeg +ENV TCD_BIN_PATH_PYTHON=/usr/bin/python ENV TCD_MEDIAINFO_PATH=/usr/bin/mediainfo ENV TCD_NODE_PATH=/usr/local/bin/node ENV TCD_DOCKER=1 diff --git a/README.md b/README.md index f4d4cddd..b12911aa 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,10 @@ If you want the public webapp to have a custom base folder, you must provide `BA 2. Place the downloaded files in a folder with good permissions. 3. Enter the root folder and run `pip install -r requirements.txt` 4. Build the packages (yarn pnp is now used, so `yarn install` might not be required) + - Enter the `/twitch-vod-chat` folder and run `yarn install` and `yarn run buildlib`. - Enter the `/client-vue` folder and run `yarn install` and `yarn run build`. - Enter the `/server` folder and run `yarn install` and `yarn run build`. - Enter the `/twitch-chat-dumper` folder and run `yarn install` and `yarn run build`. - - Enter the `/twitch-vod-chat` folder and run `yarn install` and `yarn run build --base=/vodplayer`. 5. In the `/server` folder, run `yarn run start` to start the server in production mode. 6. Go to the settings page and set up basic stuff, get api key from twitch dev site. 7. Check the About page for subscription status. diff --git a/client-vue/package.json b/client-vue/package.json index ce7d6ac7..a89f67fe 100644 --- a/client-vue/package.json +++ b/client-vue/package.json @@ -1,6 +1,6 @@ { "name": "livestreamdvr-client", - "version": "2.2.3", + "version": "2.2.4", "private": true, "homepage": "https://github.com/MrBrax/LiveStreamDVR", "scripts": { diff --git a/client-vue/src/components/VodItem.vue b/client-vue/src/components/VodItem.vue index e0dd169f..a14bf166 100644 --- a/client-vue/src/components/VodItem.vue +++ b/client-vue/src/components/VodItem.vue @@ -305,7 +305,7 @@ import type { ApiResponse, ApiSettingsResponse } from "@common/Api/Api"; import { formatString } from "@common/Format"; import { format } from "date-fns"; import axios from "axios"; -import { useRoute } from "vue-router"; +import { useRoute, useRouter } from "vue-router"; import { isTwitchVOD } from "@/mixins/newhelpers"; import VodItemControls from "./VodItemControls.vue"; import type { VODTypes } from "@/twitchautomator"; @@ -346,6 +346,7 @@ const emit = defineEmits(["forceFetchData", "refresh", "toggleMinimize"]); const store = useStore(); const route = useRoute(); +const router = useRouter(); const { t } = useI18n(); @@ -410,6 +411,7 @@ const renameVodTemplatePreview = computed(() => { season: props.vod.stream_season || "", absolute_season: props.vod.stream_absolute_season ? props.vod.stream_absolute_season.toString().padStart(2, "0") : "", episode: props.vod.stream_number ? props.vod.stream_number.toString().padStart(2, "0") : "", + absolute_episode: props.vod.stream_absolute_number ? props.vod.stream_absolute_number.toString().padStart(2, "0") : "", }; const replaced_string = formatString(renameVodSettings.value.template, replacements); return replaced_string; @@ -533,22 +535,23 @@ function doFixIssues(): void { function openPlayer(): void { if (!props.vod) return; - let url = `${store.cfg("basepath", "")}/vodplayer/index.html#&`; - url += "source=file_http"; + // let url = `${store.cfg("basepath", "")}/vodplayer#&`; + let hash = "#&source=file_http"; if (playerSettings.value.vodSource == "captured"){ - url += `&video_path=${props.vod.webpath}/${props.vod.basename}.mp4`; + hash += `&video_path=${props.vod.webpath}/${props.vod.basename}.mp4`; } else { - url += `&video_path=${props.vod.webpath}/${props.vod.basename}_vod.mp4`; + hash += `&video_path=${props.vod.webpath}/${props.vod.basename}_vod.mp4`; } if (playerSettings.value.chatSource == "captured"){ - url += `&chatfile=${props.vod.webpath}/${props.vod.basename}.chatdump`; + hash += `&chatfile=${props.vod.webpath}/${props.vod.basename}.chatdump`; } else { - url += `&chatfile=${props.vod.webpath}/${props.vod.basename}_chat.json`; + hash += `&chatfile=${props.vod.webpath}/${props.vod.basename}_chat.json`; } // url.searchParams.set("offset", this.playerSettings.offset.toString()); - window.open(url.toString(), "_blank"); + // window.open(url.toString(), "_blank"); + router.push({ name: "VODPlayer", hash }); } diff --git a/client-vue/src/components/VodItemChapters.vue b/client-vue/src/components/VodItemChapters.vue index dc1cb53d..56e9edeb 100644 --- a/client-vue/src/components/VodItemChapters.vue +++ b/client-vue/src/components/VodItemChapters.vue @@ -284,7 +284,7 @@ function playerLink(offset = 0, chatdownload = false): string { if (!props.vod || !store.config) return "#"; const video_path = `${props.vod.webpath}/${props.vod.basename}.mp4`; const chat_path = `${props.vod.webpath}/${props.vod.basename}.${chatdownload ? "chat" : "chatdump"}`; - return `${store.cfg("basepath", "")}/vodplayer/index.html#source=file_http&video_path=${video_path}&chatfile=${chat_path}&offset=${offset}`; + return `${store.cfg("basepath", "")}/vodplayer#source=file_http&video_path=${video_path}&chatfile=${chat_path}&offset=${offset}`; } function twitchVideoLink(video_id: string): string { diff --git a/client-vue/src/components/forms/SettingsForm.vue b/client-vue/src/components/forms/SettingsForm.vue index 50a60dd3..a47cf010 100644 --- a/client-vue/src/components/forms/SettingsForm.vue +++ b/client-vue/src/components/forms/SettingsForm.vue @@ -1,6 +1,6 @@