-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix chapter list not updating and/or crashing (issue #4696) #4697
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
Conversation
iina/PlaySliderCell.swift
Outdated
@@ -206,9 +206,8 @@ class PlaySliderCell: NSSliderCell { | |||
if let totalSec = info.videoDuration?.second { | |||
chapterStrokeColor.setStroke() | |||
var chapters = info.chapters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var chapters = info.chapters | |
let chapters = info.chapters |
iina/MainMenuActions.swift
Outdated
let chapter = player.info.chapters[index] | ||
guard let chapter = player.playChapter(index) else { | ||
Logger.log("Cannot switch to chapter \(index) because it was not found! Will ignore request and reload chapters instead", | ||
level: .error, subsystem: player.subsystem) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think error is too strong for this situation. The user can trigger this. IINA recovers. There isn't an error that needs to be corrected. I would emit this as a debug level message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulled PR, tested, confirmed crash no longer happens.
The variable in PlaySliderCell
should be changed to be a let constant to correct a new compiler warning.
I would change the log level of that one message although that is not critical.
…g of chapters to improve safety + efficiency
f15f8ad
to
70856bd
Compare
Done. Committed (also rebased). In the XCode 15 release notes, I saw this:
Doesn't seem to be fixed in all cases, unfortunately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good to me.
I have experienced that Xcode behavior where warnings are not shown as well. Very frustrating. PRs are being merged for a 1.3.4 release. The main focus of this release is the switch to Open Subtitle's REST API as the old API is shutting down at the end of the year. This PR is on the list for that release. |
Thanks! |
Description:
PlayerCore.getChapters()
which returned early when chapter count == 0. This resulted in chapter list not getting updated in this situation.