Discounted-Udemy-Course-Enroller icon indicating copy to clipboard operation
Discounted-Udemy-Course-Enroller copied to clipboard

Remember enrolled courses

Open jonathanhecl opened this issue 3 years ago • 4 comments

I don't want to retry every time the same courses when I know I am enrolled it.

Sugestion: Create a local storage with my enrolled courses, only when Udemy response it first time.

Regards!

jonathanhecl avatar Nov 07 '22 18:11 jonathanhecl

It would be practical for accounts having few hundred courses but if an account has around 4000 courses enrolled it would take a lot of time to start up and update the local database.

Let me your stance on the comment. Thank you.

techtanic avatar Jan 10 '23 10:01 techtanic

It could be an optional feature, retrieving the list of already enrolled courses (which will be a few requests), vs testing hundreds of courses at every launch (all courses in a language)

sebbu2 avatar Nov 02 '24 19:11 sebbu2

@sebbu2 The current implementation fetches all enrolled course IDs immediately after login. However, there's a performance bottleneck, and It can be solved by using threading.

Regarding saving a DB type file, I was initially hesitant about adding another file to the project. However, after consideration, adding this functionality might actually improve the speeds and reduce API calls. I'll run some tests to validate this approach.

techtanic avatar Nov 03 '24 03:11 techtanic

It seems there was a difference between the CLI and GUI version.

In 2.3.1 both do remember enrolled courses. They don't remember filtered or courses (due to language for example) though, which still means some requests/time consumption.

sebbu2 avatar Nov 11 '24 15:11 sebbu2