Last Active: Jun 23, 2020
Threads: 1
Posts: 11
Reputation:
0
Hi TPB Team,
I liked the changes that you all have done recently to the website, and I also thought of trying something at my end. So, over last 4-5 days, I started building an angular web app for TPB. Please see if you think it is worth considering. Of course, it is nothing compared to what you guys must be upto, but take a look.
Steps to run:
Code: git clone https://SKMi@bitbucket.org/SKMi/tpb.git
npm install
npm start
I changed a few things to my liking since I did not have access to all static assets images, css, etc. Also, instead of live API, I am using dummy data. So, the api service will need modifications. I have already commented the code to integrate it with the live APIs.
Please consider it only as a beginning. If you think this is worth the effort, I'll be happy to invest more time and energy in this. However, as I am not sure what the tech team is already working at, please let me know if you already have plans in similar direction and I should not spend time over this.
Last Active: Jun 23, 2020
Threads: 1
Posts: 11
Reputation:
0
More Features:
1. Pagination support
2. rel="noreferrer" is added to all the links which are in the torrent description and imdb links.
Last Active: Nov 16, 2022
Threads: 44
Posts: 845
Reputation:
12
Seems to work fine as a prototype. On Win7sp1. The unblock.me page was a nice addition.
If there is one feature I've been dying for - its a blacklist for sporger posters. Or something that kill anyone with say over 50 posts in an hour...
Last Active: Jun 23, 2020
Threads: 1
Posts: 11
Reputation:
0
(May 09, 2020, 02:45 am)waregim Wrote: Seems to work fine as a prototype. On Win7sp1. The unblock.me page was a nice addition.
If there is one feature I've been dying for - its a blacklist for sporger posters. Or something that kill anyone with say over 50 posts in an hour...
Thanks waregim, but I haven't added the login, registration and secured pages (uploads, etc.) in this app yet. I'm not sure about their entire functionality. About the sporgers, I think correct way to implement this should be server-side, as client-side I prefer for sanity check and authentication rather than authorization, especially for such important usecase.
Completely unrelated to this, I have also added a feature where we can hide a particular category (for instance, right now category 5xx is hidden). This I did just in case we have certain categories completely hidden for certain type of users.
Last Active: Nov 16, 2022
Threads: 44
Posts: 845
Reputation:
12
Not sure i understand the reasons for client side security on this. But then again, I never consider apps on a multi-user network!
(Just the two of use here on this one...)
My system is basically configured to compile anything. However you may want to let folks know what they need to install node.js to compile this. And that they need to put the address of it in the browser bar.
Last Active: Oct 03, 2024
Threads: 67
Posts: 6,381
TPB quite wisely sets access control headers on the apibay queries, which means most modern browsers won't accept results from these queries.
It is possible to set up a proxy that strips the response header, or install a browser plugin that alters the header.
Or use the .onion address which eliminates cross domain queries.
In any case, it is a detail that will have to be dealt with in implementing any browser app for TPB.
Last Active: Jun 23, 2020
Threads: 1
Posts: 11
Reputation:
0
(May 09, 2020, 21:24 pm)waregim Wrote: Not sure i understand the reasons for client side security on this. But then again, I never consider apps on a multi-user network!
(Just the two of use here on this one...)
My system is basically configured to compile anything. However you may want to let folks know what they need to install node.js to compile this. And that they need to put the address of it in the browser bar.
Sure waregim. I'll add a much detailed guide to run. But pardon me, I may not be able to do that before this weekend.
(May 13, 2020, 01:25 am)Moe Wrote: TPB quite wisely sets access control headers on the apibay queries, which means most modern browsers won't accept results from these queries.
It is possible to set up a proxy that strips the response header, or install a browser plugin that alters the header.
Or use the .onion address which eliminates cross domain queries.
In any case, it is a detail that will have to be dealt with in implementing any browser app for TPB.
I understand. The reason I am stuck in that direction is I am not able to consume the live APIs' data due to cloudfront pages. When I request the TPB API directly, I get 500 response. Will appreciate any guidance to get the server response directly to the app running on my localhost. For same reason, even postman is not able to call the APIs.
Last Active: Oct 03, 2024
Threads: 67
Posts: 6,381
500 errors tend to be regional, and temporary.
The problem lies in that your browser will reject the api results when using the app while it would accept the same results sending the same query while visiting thepiratebay.org
It is annoying, but understandable.
Last Active: Jun 23, 2020
Threads: 1
Posts: 11
Reputation:
0
May 14, 2020, 11:01 am
(This post was last modified: May 14, 2020, 11:11 am by siyaa. Edited 1 time in total.)
(May 13, 2020, 11:20 am)Moe Wrote: 500 errors tend to be regional, and temporary.
The problem lies in that your browser will reject the api results when using the app while it would accept the same results sending the same query while visiting thepiratebay.org
It is annoying, but understandable.
Thanks a lot. Finally got it working. It was a stupid mistake on my part. Anyway, now you can all browse TPB from your localhost.
Just realised few styling and layout issues. And of course, homepage, login/register and secured pages next! Then comes bugfixes.
Will post a detailed guide to run on this Sunday. Also, will try to set a proxy server through Angular to fetch the data from apibay.
Edit: The final build is not updated yet on master branch. Will do it after minor bugfixes on Friday and Saturday.
Last Active: Oct 03, 2024
Threads: 67
Posts: 6,381
I've been using a browser plugin to bypass the access control headers for the time being.
https://addons.mozilla.org/en-US/firefox/search/?q=cors
|