feat: Tags!!#707
Conversation
…g for a song when available in the ui
BLeeEZ
left a comment
There was a problem hiding this comment.
Hi,
First of all thank you for this PR.
It is always beneficial to store as much information as available for better database search and user experience.
There are two major points that needs to be matched:
- Albums artists, artists, genres: all these attributes need to be linked to their DB entity not just string. This is needed to be available for searches and sorting.
- The Ampache API needs to be supported as well.
| persist() | ||
| } | ||
|
|
||
| private func persist() { |
There was a problem hiding this comment.
No direct UserDefaults access. Use User Settings that save it.
| COPY_PHASE_STRIP = NO; | ||
| DEBUG_INFORMATION_FORMAT = dwarf; | ||
| DEVELOPMENT_TEAM = U3R6D65S8W; | ||
| DEVELOPMENT_TEAM = 8N5BD6J6TY; |
There was a problem hiding this comment.
Remove adjusted DEVELOPMENT_TEAM.
| "episode", songBuffer != nil { | ||
| // Multi-artist display string | ||
| if !collectedArtistNames.isEmpty { | ||
| songBuffer?.artistsString = collectedArtistNames.joined(separator: ", ") |
There was a problem hiding this comment.
why is it save as a String and not referencing the element directly as array. This would improve DB search.
| set { managedObject.artistsString = newValue } | ||
| } | ||
|
|
||
| public var albumArtistsString: String? { |
| set { managedObject.channelCount = newValue } | ||
| } | ||
|
|
||
| public var samplingRate: Int32 { |
There was a problem hiding this comment.
Should only be Int. The wrapper is there to hide the actual size of the DB entry.
Sounds good I will get an update pushed out as soon as possible! :) |
|
|
oops forgot to run tests. Fix for the tests out in a bit |
Tag Viewer
Adds a new "View Tags" page accessible from the context menu of each song. This page is only accessible if the given song has tags. Otherwise, the option will not show up.
By default, all tags will show, but the user has the option to filter which tags they want shown. This setting will be persistent amongst songs in the library. If a tag that has not been seen before is present in a song, it will be added to the filter list, and shown by default.
This gives the user an opportunity to have an info screen about the song they are listening to. The main use case would be for a "song credits" type screen, but it is up to the user how they want to use this page.
This new page is only present in-app and is not available in CarPlay.
Artists Tag
In addition to this change, there is also an adjustment to show the "Artists" tag as the artist for a song. Previously, we were only grabbing the first artist available, so a song by Thundercat and Tame Impala would just show "Thundercat". Now, it will show both, separated by a comma.
If the Artists tag is not available, it will fall back to the original parsing we were doing before.
This new comma separated artist shows up in all views (CarPlay, system now playing, song list, and in-app now playing)
Tests
A new test was also added for the new tag viewer page.