To prepare for some future features, it makes sense to move the indexing logic to it's own "feature" folder and maybe also refactor the code a bit.
How
During the refactoring, I've noticed that I've forgot to add a check when we made "year" a part of uniqueness when adding a new album (as some artists release multiple albums under the same name).
In addition, we noticed some places where we delete any unused artwork early (which is good in case we forget), however, those calls were before we called cleanUpArtwork(), so we can forgo that step and rely more on cleanUpArtwork().
Test Plan
We should get the same output as prior when we open the app for the first time as a new user. The cleanup logic should also work as expected (can be tested by deleting a track temporary on our device).
Checklist
[ ] Documentation is up to date to reflect these changes (ie: CHANGELOG.md & README.md).
[ ] Add new dependencies into THIRD_PARTY.md.
[x] This diff will work correctly for pnpm android:prod.
Why
To prepare for some future features, it makes sense to move the indexing logic to it's own "feature" folder and maybe also refactor the code a bit.
How
During the refactoring, I've noticed that I've forgot to add a check when we made "year" a part of uniqueness when adding a new album (as some artists release multiple albums under the same name).
In addition, we noticed some places where we delete any unused artwork early (which is good in case we forget), however, those calls were before we called
cleanUpArtwork()
, so we can forgo that step and rely more oncleanUpArtwork()
.Test Plan
We should get the same output as prior when we open the app for the first time as a new user. The cleanup logic should also work as expected (can be tested by deleting a track temporary on our device).
Checklist
CHANGELOG.md
&README.md
).THIRD_PARTY.md
.pnpm android:prod
.