Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions Amperfy/Storage/EntityWrappers/Genre.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,11 @@ extension Genre: PlayableContainable {
func infoDetails(for api: BackenApiType, type: DetailType) -> [String] {
var infoContent = [String]()
if api == .ampache {
if artists.count == 1 {
infoContent.append("1 Artist")
} else if artists.count > 1 {
infoContent.append("\(artists.count) Artists")
}
}
if albums.count == 1 {
infoContent.append("1 Album")
} else if albums.count > 1 {
infoContent.append("\(albums.count) Albums")
}
if songs.count == 1 {
infoContent.append("1 Song")
} else if songs.count > 1 {
infoContent.append("\(songs.count) Songs")
infoContent.append("\(artists.count) Artist\(artists.count > 1 ? "s" : "")")
}
infoContent.append("\(albums.count) Album\(albums.count > 1 ? "s" : "")")
infoContent.append("\(songs.count) Songs\(songs.count > 1 ? "s" : "")")

if type == .long {
let completeDuration = songs.reduce(0, {$0 + $1.duration})
if completeDuration > 0 {
Expand Down