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

[FEATURE] Internal change for the handling of external data #411

Open
EasyG0ing1 opened this issue Jan 10, 2024 · 17 comments
Open

[FEATURE] Internal change for the handling of external data #411

EasyG0ing1 opened this issue Jan 10, 2024 · 17 comments
Labels
App 💻 Issues/Pull Requests which update Drifty Application Code feature ✨ New feature request or addition hacktoberfest Issues/Pull Requests for Hacktoberfest help wanted Extra attention and support, and contributors are needed
Milestone

Comments

@EasyG0ing1
Copy link
Contributor

EasyG0ing1 commented Jan 10, 2024

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like.

This is not so much a feature request as it is an idea for internally restructuring Drifty so that it no longer relies on text files for things like URL lists, download queues, or even settings (where leveraging the Java Preferences class has limitations).

Instead, I am proposing that Drifty might be a good candidate to leverage a SQLite database for the storage and retrieval of dynamic data. The database / SQL method of storing and retrieving information is well understood and is relatively easy to implement.

A core class called something like DB could be created which contains all of the methods required to interact with external data. The database could have various tables, for example, a Jobs table which contains all of the relevant data for a download job in each record, or even a Log table which can store the various logs that Drifty generates. A Settings table could be used to store things like download folders, video quality preferences, or settings for GUI themes in the future. We could even keep a table for download statistics that keeps track of download metrics such as transfer speeds for past downloads etc. which then provides metrics that might be interesting in different contexts.

This change to Drifty could be developed non-invasively at first where it would just be a class that maintains the database file where the methods are defined then once they are in place and tested and working, it would then be a matter of converting those places throughout the program where it keeps information in flat files, and convert those methods to use the DB methods.

The database methods could even be presented to other developers as sort of an interface to external data where future development might be streamlined by the presence of the DB class, but this will be highly dependent on the nature of any future development.

Screenshots

No response

Additional information

This would also remove the GSON dependency because the use of Json files would be removed from the program all together.

@EasyG0ing1 EasyG0ing1 added App 💻 Issues/Pull Requests which update Drifty Application Code feature ✨ New feature request or addition labels Jan 10, 2024
Copy link
Contributor

Hello 👋! Thank you very much for raising an issue 🙌! The maintainers will get back to you soon for discussion over the issue! 🚀

Meanwhile you can also discuss about the project in our Discord Server 😀

@SaptarshiSarkar12
Copy link
Owner

Thank you for raising the issue @EasyG0ing1! It's a great improvement that can be implemented.
Would you like to work on this issue?

@SaptarshiSarkar12 SaptarshiSarkar12 added help wanted Extra attention and support, and contributors are needed and removed help wanted Extra attention and support, and contributors are needed labels Jan 10, 2024
@SaptarshiSarkar12 SaptarshiSarkar12 added this to the Drifty v2.1.0 milestone Jan 10, 2024
@SaptarshiSarkar12
Copy link
Owner

I am going to work on this issue. Self-assigning myself 😃

@SaptarshiSarkar12 SaptarshiSarkar12 self-assigned this Mar 4, 2024
@Viereckig
Copy link

Hello @SaptarshiSarkar12. Are you still working on this or can i try it?

@SaptarshiSarkar12
Copy link
Owner

@Viereckig Thank you for your interest 😄.
Sorry, due to lack of time, I could not focus on this issue.
Hence, you can work on this issue. If you face any problem, you can post it here and we can discuss on this issue in our Discord Server 😃.

@Viereckig
Copy link

which Java SDK do i need to use?

@SaptarshiSarkar12
Copy link
Owner

@Viereckig The latest LTS Release - JDK 21.

@Viereckig
Copy link

Viereckig commented Apr 11, 2024

Hey @SaptarshiSarkar12 have you ever encountered a problem when trying to run the program via Docker, as described in the README, where it fails to fetch packages?
image
image

What i already tryed:

  • PC restart
  • Docker Desktop reinstallation
  • Windows Firewall deaktivated
  • checked Internet connection

@SaptarshiSarkar12
Copy link
Owner

@Viereckig No, I haven't encountered such problems before. But, you can try running sudo docker compose run cli command again after deleting the cached images using sudo docker system prune. Please let me know if it works for you 😄.

I tried today morning (IST timezone) and it works for me 👇
image

@SaptarshiSarkar12
Copy link
Owner

@Viereckig If that does not work for you, you can try changing your DNS to 1.1.1.1 which is a free public domain offered by Cloudflare. You can change your DNS by following this tutorial - https://one.one.one.one/dns/#setup-instructions.

@Viereckig
Copy link

@Viereckig If that does not work for you, you can try changing your DNS to 1.1.1.1 which is a free public domain offered by Cloudflare. You can change your DNS by following this tutorial - https://one.one.one.one/dns/#setup-instructions.

already did that...

@Viereckig
Copy link

@Viereckig No, I haven't encountered such problems before. But, you can try running sudo docker compose run cli command again after deleting the cached images using sudo docker system prune. Please let me know if it works for you 😄.

I tried today morning (IST timezone) and it works for me 👇 image

yeah i try that thanks

@SaptarshiSarkar12
Copy link
Owner

@Viereckig No, I haven't encountered such problems before. But, you can try running sudo docker compose run cli command again after deleting the cached images using sudo docker system prune. Please let me know if it works for you 😄.
I tried today morning (IST timezone) and it works for me 👇 image

yeah i try that thanks

@Viereckig Did that work?

@Viereckig
Copy link

docker system prune

@SaptarshiSarkar12 sorry for the late response, I was very bussy the last few days! yeah it works now thanks

@SaptarshiSarkar12
Copy link
Owner

docker system prune

@SaptarshiSarkar12 sorry for the late response, I was very bussy the last few days! yeah it works now thanks

@Viereckig It's fine 🙂. That's a good command to clear everything (caches, images, containers, etc.) from docker and helps in most cases of unexpected errors.

@SaptarshiSarkar12
Copy link
Owner

@Viereckig Are you facing any issues? Have you started working on this? Please let me know 😄.

@SaptarshiSarkar12
Copy link
Owner

@Viereckig has informed me that he is no longer going to work on this issue.
This issue is now open for contribution.

@SaptarshiSarkar12 SaptarshiSarkar12 pinned this issue Jun 13, 2024
@SaptarshiSarkar12 SaptarshiSarkar12 added the help wanted Extra attention and support, and contributors are needed label Jun 13, 2024
@SaptarshiSarkar12 SaptarshiSarkar12 added the hacktoberfest Issues/Pull Requests for Hacktoberfest label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App 💻 Issues/Pull Requests which update Drifty Application Code feature ✨ New feature request or addition hacktoberfest Issues/Pull Requests for Hacktoberfest help wanted Extra attention and support, and contributors are needed
Projects
Status: Todo
Development

No branches or pull requests

3 participants