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

Non downloaded library items #2101

Merged
merged 6 commits into from
Oct 1, 2024
Merged

Non downloaded library items #2101

merged 6 commits into from
Oct 1, 2024

Conversation

halgari
Copy link
Collaborator

@halgari halgari commented Sep 26, 2024

This delinks-the NexusModsLibraryFile models from DownloadedFile and instead links them to LibraryItem. A few reasons we discussed this morning for why we may want to do this:

  1. Updates for mods will not yet be downloaded, but we still what to show them in the UI
  2. Collections will reference files that are not yet downloaded.

In general it would be helpful if the Library grid was a generic way to display any sort of file we know about, we could then filter this grid by downloaded, not downloaded, required, has update, game, etc. The alternative option is to re-implement parts of the grid for each page. But I think in general we'd like it if we could simply display the same UI control everywhere and use different filters

A few issues with the design in this file:

  1. We do not currently have a way to add a Nexus file without also starting the download
  2. If we somehow did add a nexus library item and not start the download there would be no way to start it (we need to implement the download control for these rows in the library
  3. Should we then re-name NexusModsLibraryFile to NexusModsLibraryItem?

This PR exists mostly as a proof-of-concept, to show how simple it would be to swap over to a model where Nexus files don't have to exist on disk to be in the library.

@halgari halgari marked this pull request as ready for review September 26, 2024 18:59
@halgari halgari requested a review from a team September 26, 2024 18:59
Copy link
Member

@erri120 erri120 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For NexusModsLibraryFile, which we can rename to NexusModsLibraryItem, we should be able to just manually add the LibraryFile attributes when we download the item.

@halgari
Copy link
Collaborator Author

halgari commented Oct 1, 2024

agreed, I'll refactor this next to break apart adding the LibraryFile attributes when the download completes

@halgari halgari merged commit 5d4479f into main Oct 1, 2024
11 checks passed
@halgari halgari deleted the non-downloaded-library-items branch October 1, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants