Angular App for TPB
#11
(May 14, 2020, 12:07 pm)Moe Wrote: 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

I am now using the angular proxy server. So, to check it live, no need to install any plugin for CORS. Now, data is successfully coming from apibay and getting displayed in the app. You really got me out of this, thanks a ton!

Pushed it on master branch. Now, you just need to run "npm start" and watch it in action.
Reply
#12
Nice work!

I added --host 0.0.0.0 to the start option as I run it in a container that is not on my desktop.

I do like the clean look.  You've inspired me to take a crack at a hosted version.  Of course, that does mean users have to deal with the CORS issue individually: https://pirates-forum.org/tpb/
Reply
#13
(May 14, 2020, 13:49 pm)Moe Wrote: Nice work!

I added --host 0.0.0.0 to the start option as I run it in a container that is not on my desktop.

I do like the clean look.  You've inspired me to take a crack at a hosted version.  Of course, that does mean users have to deal with the CORS issue individually: https://pirates-forum.org/tpb/

Wow! Is this the same angular app? If apibay can allow "pirates-forum.org" origin, then there won't be a cors issue I believe.
I noticed that precompiled json can be fetched, but torrent description page, or search page are showing errors due to cors.

Time for me to get started on login and other pages.

Edit: Sorry, just realised it is a vue app.
Reply
#14
I doubt Winston would add any other domains as that'll cut out the ad aidz. Granted, it is already happening with the dozens of proxies and mirrors, but he certainly won't make it easier.

I probably won't take my project much further as it without some official support Winston's next update will probably break core functionality and I don't want to keep fixing things.


The project is built using the Vuetify framework which made it quick to build, but means there's only so much customization available.
Reply
#15
Just one request here. In future updates also, please do not take away this feature where we can get the data from apibay, and create own version of TPB Big Grin.

Looks like login is not happening through APIs, but it is posting data to tpb.org/sessions, and the response is also not json. This means login and other pages will take time.
Anyway, this has been a pretty fun project, and I'll surely keep improving it as much as the TPB team gives the flexibility with the APIs.
Reply
#16
I have no idea if Winston is cutting corners or just has no idea what he is doing. I'm kind of going with the latter given a lot of what I have seen.

So no guarantees what works today won't be broken tomorrow and then not fixed for a few months.

I know he doesn't want to make it easy for 3rd parties to plug into the API, but at the same time, he doesn't seem to want to make it easy for TPB to plug into its own API.

Hopefully he'll take some interest in this idea and maybe move in that direction.
Reply
#17
I can officially say the v1 is done. Although I've tried my best to make it bugfree, but let me know if you see any issues.
I am calling it TPB Local, a JS app to access the TPB from your system locally, with different user experience than tpb.org. Of course, you need internet access to see torrent details and lists, but CORS has already been handled by the php script, so you don't need any additional browser plugins. (Realized later that team TPB provides one on their github repo, but I had already written it by then.)

Prerequisites
1. A local webserver (preferably apache, since I have already created an htaccess for necessary rewrites). You may go for any other, but make sure you have equivalent version of htaccess.
2. Node and npm (latest versions)
3. php (required for proxy): I have checked on v7, but should work on 5.6+
4. Internet obviously

How to:
1. In terminal, go to you local webserver root directory, and run following command:
Code:
git clone https://SKMi@bitbucket.org/SKMi/tpb.git
This will create a new directory called "tpb". If you are cloning in some other folder, make sure to change the "baseHref" in angular.json in project root.
2.
Code:
cd tpb
or whichever folder you used
3.
Code:
npm install
4.
Code:
npm start
Once the above 4 steps are complete successfully, open the latest version of your favorite browser and go to http://localhost:4200. This should open the app.

5. (Optional): If you don't want to run the "npm start" script everytime you want to access the TPB Local, then you can also generate a build. Run the following command:
Code:
npm run build --prod
This will transpile the app inside a "dist" folder in the project root, with necessary files in it. Then you can go to http://localhost/tpb (if tpb is your project root folder), and use the app. Assumption here is that you have apache server, with rewrite module enabled.
Reply
#18
For webserver, Wamp is nice and does not mess with system:
https://sourceforge.net/projects/wampserver/

Has php included.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Building a Chat App with React.js and Chatkit ankitdixit 1 20,106 Apr 23, 2020, 08:37 am
Last Post: rohanjoshi0894
  Piratebay app?? Edeldier123 12 46,987 Mar 17, 2018, 05:54 am
Last Post: bgcrack
  Pirate Bay Desktop Search App CelestialDog 1 17,714 May 20, 2015, 08:52 am
Last Post: west087
  Pirate Bay App for windows CSharpProgrammer 1 16,648 Aug 21, 2014, 03:40 am
Last Post: NokTham
  [REQ] Developing a Timed Lock App/Software sheikh2 17 42,456 Jun 20, 2014, 11:36 am
Last Post: sheikh2



Users browsing this thread: 2 Guest(s)