Closed db-2001 closed 6 months ago
Would you also be able to consider if it makes sense to merge the website code with the main API code? It would get rid of the pain point for many users of specifying the API URI (since you could just point it back to itself). I don't think it'll impact the ability for other people who write their own front ends or anything to access/make changes to the API. It'll also make it easier to release changes that need both API and website updates so we don't have to coordinate making the changes and hoping nobody else pulls the repo while they're not synced up. It also might motivate me to learn C# and make the API changes myself if everything is just in one repo, lol.
Holy moly. Fkn amazing. Okay making a PR for all the requested changes, then merging once both are ready. https://github.com/C9Glax/tranga/pull/122
[x] changeStyleSheets can be removed from settings [x] Added Reset and Test POSTs [x] GET messages for rate limits for each connector can be displayed [ ] @db-2001 I changed the way RequestLimits work, to just be a global Connector thing. Sorry about that, but I figured it would make things easier to configure. The different types are in RequestType.cs [x] GET /LogFile returns a BadRequest, not sure of what is going on on the API side. Once the request behavior is fixed, some work will need to be done to make sure we can download the file from the website. [ ] Kavita https://github.com/C9Glax/tranga/issues/121
It would get rid of the pain point for many users of specifying the API URI
Not really though, since it would still be two separate containers. Just like now. I had them originally in one repo, but Issue tracking was a nightmare, because people were confusing what was going on where.
And as for coordinating:
Okay making a PR for all the requested changes, then merging once both are ready.
[ ] @db-2001 I changed the way RequestLimits work, to just be a global Connector thing. Sorry about that, but I figured it would make things easier to configure. The different types are in RequestType.cs
No problem, so now Tranga configures (or can configure) different rate limits for images, covers, info, with additional settings specific to MangaDex? I might keep the MangaDex ones in that section but I'll move the others to the API settings section in the settings. Not sure if I should keep or get rid of the other connectors since their settings will be empty...
Not really though, since it would still be two separate containers. Just like now.
I guess I'm not understanding why they'd be two separate containers, can the API web server not also host the webpage? Or can the two not live side-by-side?
I should be able to get most of these things implemented tomorrow (my time)
As for coordinating, if you create a branch and start committing changes to it, how would you recommend I test with that branch? Right now I test all website changes just with my actual API instance
No problem, so now Tranga configures (or can configure) different rate limits for images, covers, info, with additional settings specific to MangaDex?
Correct.
I guess I'm not understanding why they'd be two separate containers, can the API web server not also host the webpage? Or can the two not live side-by-side?
Theoretically I can also write a small webserver that would serve these files. However since all javascript code is executed client-side, e.g. in the webbrowser, you would have to tell the site where to look for the api calls anyways, and just using an existing webserver solution (like nginx) makes things easier. If we were to create dynamically generated sites, that would change some things, but also make them a lot more complicated.
how would you recommend I test with that branch?
If you want to try to develop C# code anyways, you should get an IDE, like Visual Studio, Jetbrains Rider, or anything else. From there you can clone the repository/branch and either build/compile or just run the code in the debugger.
If you want to try to develop C# code anyways, you should get an IDE, like Visual Studio, Jetbrains Rider, or anything else. From there you can clone the repository/branch and either build/compile or just run the code in the debugger.
Yup, just installed it and cloned the repository/branch, will try it out now
Okay so I think I implemented the API calls now, haven't tested yet. If you are missing anything lmk
Also GET /LogFile now should just return the content of the file :)
Will do, have to figure out how to open the repo in VS and get it running first s
Notes from testing:
Unrelated: I (obviously) managed to get the Tranga project in Visual Studio working, not sure how to view the logs from the Logger though. Is there anyway I can actually test that everything is running properly?
Gotify, Ntfy, Kavita, and Komga don't send an HTTP response to the POST when testing the connector, only LunaSea does; don't know if this is intended behavior or not
They should return a ACCEPTED response... Will look into it.
GET /LogFile still returns a 404 not found when looking in the console. Not sure if this is because there is an actual error or if somehow when I started the project the logger didn't start so there is no log file to return.
404 means there is no Logfile. You have to enable the FileLogger with -f
as Start-Argument.
I (obviously) managed to get the Tranga project in Visual Studio working, not sure how to view the logs from the Logger though. Is there anyway I can actually test that everything is running properly?
Same here, enable the ConsoleLogger with -c
How do I start it from the command line? I've just been clicking the green play button in VS to start tranga.
I don't use Visual Studio, however https://stackoverflow.com/questions/298708/debugging-with-command-line-parameters-in-visual-studio seems that you have to right-click the "Tranga" and set it there...
Ahh, thank you so much, sorry for making you check, couldn't figure out what to google
Got logs to download successfully. I think that's everything from my end?
Yup everything else is API-sided. Just the POST-return on the /Test Endpoints and checking why Kavita isn't updating.
I plan on using my self-hosted Vikunja instance to keep track of development items:
That link will only let you view the board, but if you're interested in collaborating using it, then you're more than welcome to create an account and then I can add you to the project :)
Good idea! Github has it's own Kanban board in Projects. I just added you, moving all your items over right now :)
Awesome! It looks great! Should I continue to make changes in the future on my own repositories like I have been or create branches in the main one?
You should be able to link your own repos in there, so do that!
Okay unless I am missing something I think everything should be implemented and working with the rework. lmk if you have anything, if not i am going to merge :)
Looks good on my end
Okay merging and praying we don't break anything 🙏🏼
Big rework for the settings popup and the filtering popup. API side does need a bit of work to be compatible for it so sorry about that, but if some of the API calls/features seem unnecessary more than happy to discuss.
General changes:
Settings pop-up before:
Settings pop-up after:
Filtering method before:
Filtering method after:
Code behavior changes:
API changes
Addresses #39 #10