File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,11 @@ class EffectsPlayer: PlaybackProtocol, Hashable {
9999 strongSelf. cachedFrameCount = strongSelf. audioFile!. length
100100 DataManager . sharedManager. saveFrameCount ( episode: episode, frameCount: strongSelf. cachedFrameCount)
101101
102- // If the count is still 0 then way may not be able to read the file correctly, so throw an error
102+ // Throw an error if the frame count is 0
103+ // `cachedFrameCount` is used to calculate the duration of the episode and a 0 value
104+ // will result in the episode immediately being marked as played or can cause Inf/NaN issues.
105+ //
106+ // For more info, see: https://github.com/Automattic/pocket-casts-ios/issues/900
103107 if strongSelf. cachedFrameCount == 0 {
104108 throw PlaybackError . unableToOpenFile
105109 }
You can’t perform that action at this time.
0 commit comments