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

[fix] anilist: Exception if field is not set on the site #2710

Merged
merged 6 commits into from
Oct 16, 2020

Conversation

BrutuZ
Copy link
Contributor

@BrutuZ BrutuZ commented Jul 22, 2020

Motivation for changes:

Discovered that site entries could have empty fields, usually ones added from very early announcements or teasers. That would result in exceptions due to parsing errors since some fields were taken for granted.

Detailed changes:

  • Replaced most direct references to dict keys with dict().get()
  • Convert to string before performing case operations to avoid NoneType exceptions
  • Changed al_links output:
    • From Dicts inside a List: [{'site': '*site_name*', 'url': '*site_url*'}, ... ]
    • To single Dict: {'*site_name*': '*site_url*', ... }
  • Alphabetize Entry() fields to improve code readability

Alphabetize Entry() fields to make code more readable
Copy link
Member

@liiight liiight left a comment

Choose a reason for hiding this comment

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

that build failure seems unrelated, looking into it

@BrutuZ
Copy link
Contributor Author

BrutuZ commented Jul 23, 2020 via email

@ianstalk
Copy link
Contributor

ianstalk commented Jul 23, 2020 via email

@BrutuZ
Copy link
Contributor Author

BrutuZ commented Jul 24, 2020

Testing for empty value now

@BrutuZ BrutuZ requested a review from ianstalk July 25, 2020 20:25
@BrutuZ BrutuZ requested a review from liiight August 2, 2020 21:16
@BrutuZ
Copy link
Contributor Author

BrutuZ commented Oct 6, 2020

Bump.

I'm stuck at this 3.1.68 branch since a couple of entries in my list have empty values that aren't handled without this, hence crashing the task.

@BrutuZ
Copy link
Contributor Author

BrutuZ commented Oct 16, 2020

Paging @Flexget

@gazpachoking
Copy link
Member

Seems good to me, thanks!

@gazpachoking gazpachoking merged commit 557963c into Flexget:develop Oct 16, 2020
@BrutuZ BrutuZ deleted the anilist-update branch October 13, 2021 23:55
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.

4 participants