Skip to content

Conversation

@TrigamDev
Copy link
Contributor

Summary

Refactors and reworks how file attributes (file name, file timestamps) and file properties (file size, duration, etc) are handled.

Previously, file properties would be stored as a FileAttributeData instance that gets filled instantly as a file is loaded, operating under the assumption that all data would be present, and then writing it all to a single label.

File properties are now stored as a dict of FilePropertyTypes and FilePropertyWidgets that get updated by callbacks as file data is loaded. Instead of the formatting taking place in a single, very messy method, the responsibility for formatting falls on the respective FilePropertyWidget, keeping everything cleanly separated.
FileAttributes has also been split into a model, view, and controller in accordance with #950.

Similarly to #1186, relevant files have been sorted into sub directories under the top level views, models, and controllers directories (and mixed, cause also doing in MVC split on media_player.py is way out of scope for this PR). This is again something that can be reverted if this is an unwanted change.

Closes

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant