Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes: #7144
Remove duplicated marked as played implementation
There were two implementations, one for single items and one for
multiple items. Now we always use the code for multiple items.
I also made API a lot more simpler and the PodDBAdapter now decides if
a the playback position should be reset. Which it will now do if the
we set it to PLAYED but not for NEW or UNPLAYED.
Checklist
./gradlew checkstyle spotbugsPlayDebug spotbugsDebug :app:lintPlayDebug
Question for the Reviewer
There is currently a bug in this Implementation. If an episode is currently playing the playback position will be reset but since the player is still running it will reset the position within the next second.
If the playback is currently stopped the playback will be reset but reset to the previous position as soon as the user plays the episode again.
What is the best way to solve that? Cause checking for the currenlty playing item it feels wrong to do in PodDBAdapter and also I get a circular dependency warning if I try to include the Playbackservice.