Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/torrent upload image #2

Merged
merged 7 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
client/.next
data/
config.js
config.example.js
yarn.lock
.DS_Store
dist/
letsencrypt/
Expand Down
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:16-alpine
ENV NODE_ENV=production
ENV NODE_ENV=development
ENV SENTRY_DSN="https://9b9761216607428180ea3b32bd1c8e58@o140996.ingest.sentry.io/4504645996576768"
LABEL org.opencontainers.image.source=https://github.com/tdjsnelling/sqtracker
WORKDIR /sqtracker/app
Expand Down
4 changes: 3 additions & 1 deletion api/src/controllers/torrent.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export const uploadTorrent = async (req, res, next) => {
source: req.body.source,
infoHash,
binary: req.body.torrent,
poster: req.body.poster,
uploadedBy: req.userId,
downloads: 0,
anonymous: false,
Expand All @@ -154,7 +155,6 @@ export const uploadTorrent = async (req, res, next) => {
group: groupId,
mediaInfo: req.body.mediaInfo,
});

await newTorrent.save();

if (groupId) await addToGroup(groupId, infoHash);
Expand Down Expand Up @@ -287,6 +287,7 @@ export const fetchTorrent = (tracker) => async (req, res, next) => {
uploadedBy: 1,
downloads: 1,
anonymous: 1,
poster: 1,
size: 1,
files: 1,
created: 1,
Expand Down Expand Up @@ -507,6 +508,7 @@ export const getTorrentsPage = async ({
created: 1,
freeleech: 1,
tags: 1,
poster: 1,
confidenceScore: 1,
},
},
Expand Down
1 change: 1 addition & 0 deletions api/src/schema/torrent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import fuzzySearch from "mongoose-fuzzy-searching";
const Torrent = new mongoose.Schema({
infoHash: String,
binary: String,
poster: String,
uploadedBy: mongoose.Schema.ObjectId,
name: String,
description: String,
Expand Down
4 changes: 2 additions & 2 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:16-alpine AS builder
ARG SENTRY_AUTH_TOKEN
ENV NODE_ENV=production
ENV NODE_ENV=development
ENV SENTRY_ORG=tdjsnelling
ENV SENTRY_PROJECT=sqtracker-frontend
ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
Expand All @@ -11,7 +11,7 @@ RUN echo "{}" > /config.js
RUN ./node_modules/.bin/next build

FROM node:16-alpine
ENV NODE_ENV=production
ENV NODE_ENV=development
ENV SENTRY_DSN="https://22bc43683da04040aa90e7683ffe022a@o140996.ingest.sentry.io/4504646040616960"
LABEL org.opencontainers.image.source=https://github.com/tdjsnelling/sqtracker
WORKDIR /sqtracker/client
Expand Down
5 changes: 4 additions & 1 deletion client/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
"passwordResetRequestFailed": "Passwort zurücksetzen konnte nicht initiallisiert werden",
"passwordResetSuccess": "Passwort wurde erfolgreich zurückgesetzt",
"passwordResetFailed": "Passwort wurde nicht erfolgreich zurückgesetzt",
"tokenError": "Token Fehler"
"tokenError": "Token Fehler",
"uploadPosterImage": "Posterdatei",
"PosterImage": "Poster",
"uploadDragDropClickSelectPoster": "Ziehen Sie Ihre Posterdatei hierher oder klicken Sie, um sie auszuwählen"
}
5 changes: 4 additions & 1 deletion client/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,8 @@
"wikiPages": "Pages",
"wikiSaveChanges": "Save changes",
"wikiThereNothingHereYet": "There is nothing here yet.",
"wikiDelThisPageQ": "Are you sure you want to delete this wiki page? This cannot be undone."
"wikiDelThisPageQ": "Are you sure you want to delete this wiki page? This cannot be undone.",
"uploadPosterImage": "Poster file",
"PosterImage": "Poster",
"uploadDragDropClickSelectPoster": "Drag and drop your poster file here, or click to select"
}
5 changes: 4 additions & 1 deletion client/locales/eo.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,5 +302,8 @@
"wikiPages": "Paĝoj",
"wikiSaveChanges": "Konservi ŝanĝojn",
"wikiThereNothingHereYet": "Ankoraŭ estas nenio ĉi tie.",
"wikiDelThisPageQ": "Ĉu vi certas, ke vi volas forigi ĉi tiun vikipaĝon? Ĉi tio ne povas esti malfarita."
"wikiDelThisPageQ": "Ĉu vi certas, ke vi volas forigi ĉi tiun vikipaĝon? Ĉi tio ne povas esti malfarita.",
"uploadPosterImage": "Alŝuti afiŝo-dosieron",
"PosterImage": "Afiŝo",
"uploadDragDropClickSelectPoster": "Tiri kaj demeti vian afiŝo-dosieron ĉi tien, aŭ klaku por elekti"
}
Loading