Skip to content
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

lib::track::Track refactor #379

Merged
merged 10 commits into from
Oct 31, 2024
Merged

lib::track::Track refactor #379

merged 10 commits into from
Oct 31, 2024

Conversation

hasezoey
Copy link
Contributor

This PR mainly refactors Track to store less needed / derivable data, in more details:

  • refactor Track to not store any initial strings which like Unsupported or Unknown and have all consuming places decide how to handle None
  • refactor Track to not store directory, ext, filename, file and only store a single URI|Path (and derive the other values on-demand
  • refactor Track to always require a location, which can either be a Path or Uri

This PR also does:

  • refactor lib::utils::get_parent_folder and all functions using it to use Paths instead of strings (way less back-and-forth)
  • use one single const string for all fallback Unknown Artist|Title strings (because of this there is no more Unsupported? only Unknown Artist|Title or empty for Albums)
  • change the fallback of filename from album to title only

PS: because this PR touches upon the default unknown strings, it kinda messes with new database entries, though i am planning to re-do the database anyway

@tramhao tramhao merged commit 73ea0cf into tramhao:master Oct 31, 2024
3 of 4 checks passed
@hasezoey hasezoey deleted the trackRefactor branch October 31, 2024 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants