-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Merged
DineshSolanki
merged 13 commits into
master
from
202-add-feature-to-chose-from-zip-file-when-images-are-not-directly-available-from-deviantart-as-single-images
Jul 16, 2024
Merged
Feature: Feature to extract Deviations from DeviantArt, so that in professional mode, use can pick from images, that are in an compressed archive #203
DineshSolanki
merged 13 commits into
master
from
202-add-feature-to-chose-from-zip-file-when-images-are-not-directly-available-from-deviantart-as-single-images
Jul 16, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rpolation for placebo url
… 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.
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.
22bc510
to
023bfcf
Compare
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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