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

New feat : Upload image in torrent upload page & torrent detail #60

Merged
merged 26 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6ccbd81
Fixed an issue with Docker configuration.
Klaiment Oct 9, 2023
2e94106
locale fr added + yarn lint
Klaiment Oct 10, 2023
7c1dd18
image upload from torrent upload page.
Klaiment Oct 10, 2023
ee8a52c
basic image upload ok in all page.
Klaiment Oct 11, 2023
6aa9918
yarn lint
Klaiment Oct 11, 2023
912835e
big yarn lint
Klaiment Oct 11, 2023
bc8abbb
Final commit, poster upload for torrent.
Klaiment Oct 11, 2023
e3841eb
Merge pull request #1 from Klaiment/Feat/frenchLocale
Klaiment Oct 11, 2023
57537c6
Merge pull request #2 from Klaiment/Feat/torrentUploadImage
Klaiment Oct 11, 2023
3b2bc07
Update .gitignore
Klaiment Oct 12, 2023
1cdc2b8
Update .gitignore
Klaiment Oct 12, 2023
c310838
Update Dockerfile
Klaiment Oct 12, 2023
4bd8d48
Update Dockerfile
Klaiment Oct 12, 2023
cf47dfd
Update torrent.js
Klaiment Oct 12, 2023
54276bc
Update Dockerfile
Klaiment Oct 12, 2023
7f3d6e1
Update config.example.js
Klaiment Oct 12, 2023
13f0411
Update docker-compose.dev.yml
Klaiment Oct 12, 2023
f99252f
Update upload.js
Klaiment Oct 12, 2023
8bf508b
Update [infoHash].js
Klaiment Oct 12, 2023
e17bd4c
CamelCase & alphabetical order
Klaiment Oct 12, 2023
ace3f1e
Merge pull request #4 from Klaiment/Fix/locales
Klaiment Oct 12, 2023
375db33
Poster => Cover image
Klaiment Oct 12, 2023
cfba440
Merge pull request #5 from Klaiment/Fix/locales
Klaiment Oct 12, 2023
3b8604b
Fix to make cover image not required. and optimization of my personal…
Klaiment Oct 12, 2023
2426fef
Merge pull request #6 from Klaiment/Fix/poster
Klaiment Oct 12, 2023
1694103
Update [infoHash].js
Klaiment Oct 12, 2023
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: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ WORKDIR /sqtracker/app
COPY . .
RUN yarn install
EXPOSE 3001
CMD yarn start
CMD yarn start
3 changes: 2 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
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
13 changes: 8 additions & 5 deletions client/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"username": "Benutzername",
"usernameRules": "Nur Buchstaben, Zahlen, und “.” erlaubt.",
"password": "Passwort",
"passwordResetRequestSuccess": "Bestätigung versand, falls ein Konto mit dieser E-Mail Adresse existiert",
"passwordResetRequestFailed": "Passwort zurücksetzen konnte nicht initiallisiert werden",
"passwordResetSuccess": "Passwort wurde erfolgreich zurückgesetzt",
"passwordResetFailed": "Passwort wurde nicht erfolgreich zurückgesetzt",
"posterImage": "Poster",
"totp": "Einmalpasswort",
"resetPassword": "Passwort zurücksetzen",
"newPassword": "Neues Passwort",
Expand All @@ -14,9 +19,7 @@
"welcome": "Willkommen",
"registerFailed": "Registrierung fehlgeschlagen",
"registrationClosed": "Registrierung geschlossen",
"passwordResetRequestSuccess": "Bestätigung versand, falls ein Konto mit dieser E-Mail Adresse existiert",
"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",
"uploadDragDropClickSelectPoster": "Ziehen Sie Ihre Posterdatei hierher oder klicken Sie, um sie auszuwählen"
}
3 changes: 3 additions & 0 deletions client/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"passwordResetRequestFailed": "Could not initiate password reset",
"passwordResetRequestSuccess": "If an account with that email address exists, you will receive an email shortly",
"passwordResetSuccess": "Password was reset successfully",
"posterImage": "Cover image",
"poweredBy": "Powered by",
"register": "Register",
"registerFailed": "Could not register",
Expand Down Expand Up @@ -241,6 +242,7 @@
"uploadCouldNotUploadTorrent": "Could not upload .torrent",
"uploadDescription": "Description",
"uploadDragDropClickSelect": "Drag and drop .torrent file here, or click to select",
"uploadDragDropClickSelectPoster": "Drag and drop your poster file here, or click to select",
"uploadDropFileHere": "Drop the file here...",
"uploadGroupWith": "Group with",
"uploadGroupWithThisTorrent": "Group with this torrent",
Expand All @@ -250,6 +252,7 @@
"uploadMarkdownSupport": "Markdown supported",
"uploadMediaInfo": "MediaInfo",
"uploadName": "Name",
"uploadPosterImage": "Poster file",
"uploadSource": "Source",
"uploadTags": "Tags",
"uploadTorrentFile": "Torrent file",
Expand Down
3 changes: 3 additions & 0 deletions client/locales/eo.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"passwordResetRequestFailed": "Ne eblis komenci pasvortigon",
"passwordResetRequestSuccess": "Se konto kun tiu retadreso ekzistas, vi ricevos retmesaĝon baldaŭ",
"passwordResetSuccess": "Pasvorto estis restarigita sukcese",
"posterImage": "Afiŝo",
"poweredBy": "Funkciigita de",
"register": "Registriĝi",
"registerFailed": "Ne eblis registri",
Expand Down Expand Up @@ -239,6 +240,7 @@
"uploadCouldNotUploadTorrent": "Ne eblis alŝuti .torrent",
"uploadDescription": "Priskribo",
"uploadDragDropClickSelect": "Trenu kaj faligi .torrent-dosieron ĉi tie, aŭ alklaku por elekti",
"uploadDragDropClickSelectPoster": "Tiri kaj demeti vian afiŝo-dosieron ĉi tien, aŭ klaku por elekti",
"uploadDropFileHere": "Faligi la dosieron ĉi tie...",
"uploadGroupWith": "Grupu kun",
"uploadGroupWithThisTorrent": "Grupu kun ĉi tiu torento",
Expand All @@ -248,6 +250,7 @@
"uploadMarkdownSupport": "Markdown subtenata",
"uploadMediaInfo": "MediaInfo",
"uploadName": "Nomo",
"uploadPosterImage": "Alŝuti afiŝo-dosieron",
"uploadSource": "Fonto",
"uploadTags": "Etikedoj",
"uploadTorrentFile": "Torenta dosiero",
Expand Down
Loading