Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mirsella/hypertube into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kbagot committed Jan 6, 2025
2 parents bb0b7c9 + 7992dff commit 9f5acb8
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .nuxtignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Docker_Config/
downloads
uploads
10 changes: 7 additions & 3 deletions components/auth/authSignIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,18 @@ async function authentification() {
password: password.value,
redirect: false,
});
// console.log(result);
if (result?.ok) {
if (result?.url === null) {
message.value = "Username or password incorrect";
throw new Error("Failed to sign in");
} else if (result?.ok) {
navigateTo("/search");
} else {
message.value = "Username or password incorrect";
message.value = "An error occurred during sign in";
}
} catch (error) {
message.value = "An error occurred during sign in";
// message.value = "An error occurred during sign in";
console.error("Failed to sign in:", error);
}
}
Expand Down
3 changes: 2 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
environment:
- PGPASSWORD=${PGPASSWORD}
- PGHOST=postgres
- NUXT_DEBUG=true
- NUXT_DEBUG=false
- NUXT_TMDB_API_KEY=${TMDB_API_KEY}
- NUXT_JACKETT_API_KEY=${JACKETT_API_KEY}
- NUXT_JACKETT_URL=jackett
Expand All @@ -37,6 +37,7 @@ services:
- "3000:3000"
volumes:
- ./uploads:/app/.output/uploads
- ./downloads:/downloads
depends_on:
- postgres

Expand Down
5 changes: 2 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function get_from_env(field: string): string {

export default defineNuxtConfig({
compatibilityDate: "2024-04-03",
devtools: { enabled: true },
modules: [
"@nuxtjs/tailwindcss",
"@nuxt/icon",
Expand All @@ -32,7 +31,7 @@ export default defineNuxtConfig({
isEnabled: true,
disableServerSideAuth: false,
originEnvKey: "AUTH_ORIGIN",
baseURL: "http://localhost:3000/api/auth",
baseURL: process.env.AUTH_BASE_URL || "http://localhost:3000/api/auth",
sessionRefresh: {
enablePeriodically: true,
enableOnWindowFocus: true,
Expand All @@ -45,7 +44,7 @@ export default defineNuxtConfig({
detectBrowserLanguage: false,
locales: [
{ code: "fr", name: "Français", language: "fr-FR", file: "fr.json" },
{ code: "en", name: "English", language: "en-US", file: "en.json" }
{ code: "en", name: "English", language: "en-US", file: "en.json" },
],
},
hooks: {
Expand Down
3 changes: 2 additions & 1 deletion pages/movies/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ async function update_comment(comment_id: string) {
<div class="chat-bubble chat-bubble-secondary text-lg p-0">
<input
type="text"
class="p-2 outline-none bg-transparent"
class="p-2 outline-none bg-transparent dark:text-white"
:disabled="comment.comments.authorId !== user?.id"
v-model="comments_input[comment.comments.id]"
/>
</div>
Expand Down
11 changes: 9 additions & 2 deletions server/api/movies/[id]/stream.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,15 @@ export default defineEventHandler(
"Content-Type": `video/${biggest_file_type}`,
});

if (!fs.existsSync(biggest_file_path_converted))
convert_stream.pipe(fs.createWriteStream(biggest_file_path_converted));
try {
if (!fs.existsSync(biggest_file_path_converted))
convert_stream.pipe(
fs.createWriteStream(biggest_file_path_converted),
);
} catch {
if (fs.existsSync(biggest_file_path_converted))
fs.rmSync(biggest_file_path_converted);
}
return convert_stream;
} else {
torrent.on("done", () => {
Expand Down

0 comments on commit 9f5acb8

Please sign in to comment.