Skip to content

Commit

Permalink
Use album artist name for importing downloaded
Browse files Browse the repository at this point in the history
i.e. if the artist is "OutKast feat. Killer Mike" on the track, and the
album is under OutKast, this will import it under the latter instead of
the former.
  • Loading branch information
NattyNarwhal committed Nov 29, 2023
1 parent c32f50a commit 529d555
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Doing so isn't fatal (it's not a secret), but it is annoying for other contribut
* Don't show 404 messages to avoid noise w/ ID migrations
* Avoid hitting download endpoint if unneeded
* HTTP timeouts are now handled correctly
* Use remote album artist name when importing downloaded tracks
* Fix tracks unable to be downloaded from Subsonic servers
* Fix a crash when trying to play an album without any tracks
* Fix a crash if the track's duration is nil
Expand Down
5 changes: 4 additions & 1 deletion Submariner/SBImportOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ import UniformTypeIdentifiers
if let remoteTrack = remoteTrack {
titleString = remoteTrack.itemName as String?
artistString = remoteTrack.artistName as String?
if let albumArtistMaybe = remoteTrack.artistName as String?,
// first case is so that it matches the album's artist on the server
if let remoteAlbum = remoteTrack.album, let remoteAlbumArtist = remoteAlbum.artist {
albumArtistString = remoteAlbumArtist.itemName
} else if let albumArtistMaybe = remoteTrack.artistName as String?,
albumArtistMaybe != "" {
albumArtistString = albumArtistMaybe
} else {
Expand Down

0 comments on commit 529d555

Please sign in to comment.