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: Error logic and updated message and mis-escaped quotes #1434

Merged
merged 10 commits into from
Oct 17, 2024

Conversation

HirschBerge
Copy link
Contributor

@HirschBerge HirschBerge commented Oct 6, 2024

Checks to see if the episode selected is in the list of scraped episodes available for that show and season. Updated error message to reflect result

Pull Request Template

Type of change

  • Bug fix
  • Feature
  • Documentation update

Description

Adds additional error messages as discussed in #1429. Previously, any time there was an error, it would always say "Episode not released!" which is not true sometimes. This happens in the case of an episode being released, but not pulling a source correctly (or source not available). This just adds a simple check to see if the $ep_no is in $ep_list. If it is and $episode is empty, it states that the episode is released, but no source available, else, it falls back to the current error message.

While I was here, I implemented 71zenith's suggestion in #1391 to fix issues with specifically Oshi No Ko's second season. It didn't quite work as perfectly as I hoped, so I had to add an extra pipe to remove the literal "'s, but it is tested and working with the above use case.

Sorry for making two unrelated fixes in one PR, I didn't see any guidelines against it though. Please let me know if there are better, or more polished ways to implement my fixes. I'm not as strong in bash as I am some other langs.
Thanks!

Checklist

  • any anime playing
  • bumped version

  • next, prev and replay work
  • -c history and continue work
  • -d downloads work
  • -s syncplay works
  • -q quality works
  • -v vlc works
  • -e select episode works
  • -S select index works
  • -r range selection works
  • --skip ani-skip works
  • --skip-title ani-skip title argument works
  • --no-detach no detach works
  • --dub and regular (sub) mode both work
  • all providers return links (not necessarily on a single anime, use debug mode to confirm)

  • -h help info is up to date
  • Readme is up to date
  • Man page is up to date

Additional Testcases

  • The safe bet: One Piece
  • Episode 0: Saenai Heroine no Sodatekata ♭
  • Unicode: Saenai Heroine no Sodatekata ♭
  • Non-whole episodes: Tensei shitara slime datta ken (ep. 24.5, ep. 24.9)

Checks to see if the episode selected is in the list of scraped episodes
available for that show and season. Updated error message to reflect
result
in pystardust#1391 I used 71zenith's recommendation for fixing quotes escaped.
Tested and working with Oshi No Ko's Second season.
likely because it's hard to be consistent with the way 「押しの子」is shown in
English.
@HirschBerge HirschBerge requested a review from Derisis13 as a code owner October 6, 2024 18:28
@HirschBerge HirschBerge changed the title Error logic and updated message and mis-escaped quotes bugfix: Error logic and updated message and mis-escaped quotes Oct 6, 2024
@HirschBerge HirschBerge changed the title bugfix: Error logic and updated message and mis-escaped quotes fix: Error logic and updated message and mis-escaped quotes Oct 7, 2024
Copy link
Collaborator

@Derisis13 Derisis13 left a comment

Choose a reason for hiding this comment

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

Looks promising, although I have not tried it. My only issue is so far the echo statement.

tested working
@port19x
Copy link
Collaborator

port19x commented Oct 14, 2024

Note I have not done any testing on this PR

@port19x
Copy link
Collaborator

port19x commented Oct 17, 2024

@Derisis13 You need to revise your review for this to become mergeable

Copy link
Collaborator

@Derisis13 Derisis13 left a comment

Choose a reason for hiding this comment

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

Sorry, go ahead

@port19x port19x merged commit e5a8b95 into pystardust:master Oct 17, 2024
9 checks passed
@HirschBerge
Copy link
Contributor Author

Thank you both!

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.

Wrong anime title due to wrong extraction from regex caused by escaped ".
3 participants