Fixed bug which was causing AnkiDroid API to not list media on cards.#17859
Fixed bug which was causing AnkiDroid API to not list media on cards.#17859mikehardy merged 1 commit intoankidroid:mainfrom
Conversation
|
First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible. |
AnkiDroid/src/androidTest/java/com/ichi2/anki/tests/ContentProviderTest.kt
Show resolved
Hide resolved
|
Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically |
|
I feel like we were close here but both David and I have been really busy, apologies for the default-stale-close |
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
47b50bb to
c84f993
Compare
david-allison
left a comment
There was a problem hiding this comment.
I have force pushed this and feel it's ready for review
c84f993 to
d442c1b
Compare
|
Hi @david-allison, apologies for the delayed response — I had semester exams going on. I’m back now and will be able to contribute consistently moving forward! |
|
No worries! I've taken this to the finish line and added a decent amount more issues Thanks so much for the hard work here |
d442c1b to
2553ff9
Compare
2553ff9 to
f067bf9
Compare
Fixed bug which was causing AnkiDroid API to not list media on cards. Due to card rendering being moved to the backend, and Anki using different Regex handling code, we needed to change the implementation of `files_in_str`: [sound:] tags were stripped, for example https://github.com/ankitects/anki/blob/64ca90934bc26ddf7125913abc9dd9de8cb30c2b/pylib/anki/media.py#L136-L150 Fixes 17062
f067bf9 to
7978e17
Compare
mikehardy
left a comment
There was a problem hiding this comment.
Not going to second-guess your work here, let's get this in and we can do follow-ons as needed. Will pick to 2.21 branch so it'll hit the next release
Purpose / Description
Fixed the bug which was causing AnkiDroid API to not list media on cards. Added a unit test to confirm that media files are listed correctly in the ReviewInfo.
Fixes
Approach
Reimplemented the
filesinStrfunction which was causing the bug.How Has This Been Tested?
A unit test
testMediaFilesAddedCorrectlyInReviewInfo()has been added in theContentProviderTest.ktto confirm that theMEDIA_FILESattribute ofReviewInfogets populated correctly.Checklist
Please, go through these checks before submitting the PR.