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: Feature to extract Deviations from DeviantArt, so that in professional mode, use can pick from images, that are in an compressed archive #203

Conversation

DineshSolanki
Copy link
Owner

Added ManualExplorer view to the FoliCon application, enabling manual extraction of images in professional mode. The ManualExplorer view is designed to display images from the extracted deviation and allows users to pick/view them. Additionally, a ViewModel was created for this view to handle its associated functionalities. The DialogServiceExtensions class is also updated to provide dialog services for the new view.

Closes #202

… file is a compressed archive by filename

 extension

The directory permission checks were refactored to use .NET's built-in System.Security classes instead of a manual try-catch approach. This provides a more accurate and robust permission checking ability. Additionally, functionality was added to detect if a file is a compressed archive by checking its extension against a predefined list of compression extensions. Other assorted methods related to directory handling and filesystem utilities were also added.
This change includes functionality to download DeviantArt deviations, process compressed files and save them to a local path. This functionality needed a new library, 'SharpCompress,' which has been added to the project. In addition, new models have been added to handle API responses, and extensions were added for archive stream processing.
DArtImageList model has been expanded to include the DeviationId property. This required the constructor and relevant bindings to be adjusted accordingly. Further, an ExtractManually method has been added to ProSearchResultViewModel, allowing a more direct extraction from a given Deviation ID. Also, the model binding in ProSearchResult.xaml was modified for the tag to incorporate the newly added DeviationId property.
Added ManualExplorer view to the FoliCon application, enabling manual extraction of images. The ManualExplorer view is designed to display images from a specific directory and allows users to interact with them. Additionally, a ViewModel was created for this view to handle its associated functionalities. The DialogServiceExtensions class is also updated to provide dialog services for the new view.
Changed the identifier for the target directory path from the dArtDownloadResponse.Filename to the deviationId for fixing the potential long path issue.
A check has been added to differentiate between local and remote image paths when downloading images as files are local in case of ManualExtraction. The "FrameworkElement_OnUnloaded" event has been added to ensure image sources are properly released and no lock is present on them.
@DineshSolanki DineshSolanki added the enhancement New feature or request label Jul 15, 2024
@DineshSolanki DineshSolanki added this to the 4.2.1 milestone Jul 15, 2024
@DineshSolanki DineshSolanki self-assigned this Jul 15, 2024
This commit includes several crucial refactorings across multiple files in the project. Redundant code has been replaced by more efficient functions, such as the replacement of the entire GetFileSizeHumanReadable() method with the ConvertHelper.ToFileSize() function. The DArtImageList now uses base constructors for improved cleanliness. Also, the 'if' statement formatting of ProSearchResultViewModel.cs, and FileUtils.cs are streamlined, and a more descriptive method in StreamExtension.cs makes the flow of control more visible.
@DineshSolanki DineshSolanki force-pushed the 202-add-feature-to-chose-from-zip-file-when-images-are-not-directly-available-from-deviantart-as-single-images branch from 22bc510 to 023bfcf Compare July 16, 2024 04:38
Added docstrings to the `Download` method in the `DArt.cs` and `ExtractPngAndIcoToDirectory` method in `StreamExtension.cs` to provide more clarity about their usage and output.
@DineshSolanki DineshSolanki merged commit 2d54a1c into master Jul 16, 2024
2 of 3 checks passed
@DineshSolanki DineshSolanki deleted the 202-add-feature-to-chose-from-zip-file-when-images-are-not-directly-available-from-deviantart-as-single-images branch July 16, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add feature to chose from zip file when Images are not directly available from DeviantArt as single images
1 participant