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

[BUG] importing artwork choices fails if game was uninstalled #724

Open
wec22 opened this issue Nov 7, 2024 · 1 comment
Open

[BUG] importing artwork choices fails if game was uninstalled #724

wec22 opened this issue Nov 7, 2024 · 1 comment

Comments

@wec22
Copy link

wec22 commented Nov 7, 2024

  • Describe the bug
    If a game that was previously parsed when the artwork choices were exported is removed, attempting to import those artwork choices fails. You can edit the _selections.json to remove the entry for the missing game and it will import correctly again.

  • Steps to reproduce the behavior

  1. export artwork choices
  2. remove game from system
  3. rescan library
  4. attempt to import artwork choices
  • Expected behavior
    Import parser should import the entries it can and ignore entries in _selections.json that aren't found. Could provide a warning or message for transparency.

  • Screenshots
    image

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@Drahsid
Copy link

Drahsid commented Jan 3, 2025

I was investigating this because a friend of mine ran into this issue and we were able to bypass this error by modifying isLocalImageUnique in src/renderer/services/preview.service.ts:

isLocalImageUnique(
  imageKey: string,
  imageUrl: string,
  artworkType: ArtworkType,
  provider: MultiLocalProviderType,
) {
    if (this.onlineImages[artworkType][imageKey]?.offline === undefined || this.onlineImages[artworkType][imageKey]?.offline?.[provider] === undefined) {
      return false;
    }
    else {
      return (this.onlineImages[artworkType][imageKey].offline[provider].findIndex(
        (item) => item.imageUrl === imageUrl,
      ) === -1);
    }
}

This isn't particularly ideal, it would probably be better to create a list of missing titles and report them to the user as some sort of warning. The existing error is pretty unclear, and pretty impossible to identify for the layman.

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

No branches or pull requests

2 participants