izqalan / cy-client

Unofficial cyberdrop album downloader client
MIT License
96 stars 40 forks source link

Feat/port to avalonia #41

Closed Anequit closed 3 years ago

Anequit commented 3 years ago

Full UI remake in Avalonia Codebase refactored and optimized Asynchronous web scraping NUnit tests are written for FileDownloader and WebScraper

Anequit commented 3 years ago

This complete remake is almost a carbon copy when it comes to functionality. The only place that isn't the same is when you launch the app, instead of the file path persisting it will just default to the path the downloader was opened in. Although I wanted to replicate the functionality identically, I felt that this was a better approach, but if it is something that you would like readded. I can add it back, but not the way it was originally implemented as that's not something I think you can do with avalonia.

Anequit commented 3 years ago

I also wrote all the code for downloading files as the original method was causing a lot of errors and was overall not too great imo. I took a folder that I originally downloaded with the current version and compared it with my version and my version had a 0% loss. Any files that failed would be retried until they succeeded and any redirects that cyberdrop does my version will follow them.

Anyways looking forwards to your reaction to this!

izqalan commented 3 years ago

Coming from React-Redux-Saga, I really appreciate the file structure and readability. I need to update my VS before I can run the program, It might take some time before I can approve this PR. Loving this PR so far!

Anequit commented 3 years ago

Coming from React-Redux-Saga, I really appreciate the file structure and readability. I need to update my VS before I can run the program, It might take some time before I can approve this PR. Loving this PR so far!

One other thing is that I built this ALL on windows 11 and it works flawlessly on there. I also tested it on windows 10 and had no problem either, so it's future proof for sure!

and in order to build the program you will need the Avalonia visual studio extension but that's not a big download

izqalan commented 3 years ago

It failed to download the second url. Debug Log: Exception thrown: 'System.UriFormatException' in System.Private.Uri.dll

image

Anequit commented 3 years ago

It failed to download the second url. Debug Log: Exception thrown: 'System.UriFormatException' in System.Private.Uri.dll

image

That's odd, I've tested it with multiple URLs many times with no issues.. I'll look into and see if I can find the source of what's happening.

Anequit commented 3 years ago

The link https://cyberdrop.me/a/glOHCFDi doesn't exist. If you try to open it on cyberdrop it says that the resource is not found, so that would be be the source of the issues. Doesn't appear to be any issue with the code itself :)

Anequit commented 3 years ago

Although the code wasn't causing the issue, I did notice an issue in the way it was handling errors, so I'm working on that.

Anequit commented 3 years ago

Fixed the workflow so that it doesn't fail everytime :)

izqalan commented 3 years ago

@Anequit Ah my browser must have cached the page and didn't realized it was removed. That is really strange the fact that it was removed by an Admin. That beside the point, LGTM merging this.

Anequit commented 3 years ago

Thanks :)