jellyflood/Shared/Extensions/JellyfinAPI/PersonKind.swift
Joe Kribs a3d84a958f
[iOS] Media Item Menu - Edit Arrays (People, Genres, Studios, & Tags) (#1336)
* Cleanup / Genre & Tag Management

* Move searching to a backgroundState. Fix the font Color when bulk editing tags / genres should be secondary when editing & not selected

* Cleanup

* Now that cancelling is handled better this should prevent the issue where the suggestions fails to update on a letter entry

* Change from using an event for searchResults to using a published searchResults var

* Moved all logic to a local list where all genres/tags are populated on refresh then filterd locally instead of calling the server for changes.

* Inheritance

* Split metadata from components then alphabetize. Also, fix but where you can't add a people

* People & Permissions

* Functional but dirty. TODO: Cleanup + Trie? Trei?

* nil coalescing operator is only evaluated if the lhs is nil, coalescing operator with nil as rhs is redundant

* TODO: Search improvements & Delay search on name change

* Cleanup & reordering

* Debouncing

* Trie implementation

* Permissions Cleanup Squeezing in: https://github.com/jellyfin/jellyfin-web/issues/6361

* enhance Trie

* cleanup

* cleanup

---------

Co-authored-by: Ethan Pippin <ethanpippin2343@gmail.com>
2024-12-06 15:22:11 -07:00

98 lines
2.6 KiB
Swift

//
// Swiftfin is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, you can obtain one at https://mozilla.org/MPL/2.0/.
//
// Copyright (c) 2024 Jellyfin & Jellyfin Contributors
//
import Foundation
import JellyfinAPI
// TODO: No longer needed in 10.9+
public enum PersonKind: String, Codable, CaseIterable {
case unknown = "Unknown"
case actor = "Actor"
case director = "Director"
case composer = "Composer"
case writer = "Writer"
case guestStar = "GuestStar"
case producer = "Producer"
case conductor = "Conductor"
case lyricist = "Lyricist"
case arranger = "Arranger"
case engineer = "Engineer"
case mixer = "Mixer"
case remixer = "Remixer"
case creator = "Creator"
case artist = "Artist"
case albumArtist = "AlbumArtist"
case author = "Author"
case illustrator = "Illustrator"
case penciller = "Penciller"
case inker = "Inker"
case colorist = "Colorist"
case letterer = "Letterer"
case coverArtist = "CoverArtist"
case editor = "Editor"
case translator = "Translator"
}
// TODO: Still needed in 10.9+
extension PersonKind: Displayable {
var displayTitle: String {
switch self {
case .unknown:
return L10n.unknown
case .actor:
return L10n.actor
case .director:
return L10n.director
case .composer:
return L10n.composer
case .writer:
return L10n.writer
case .guestStar:
return L10n.guestStar
case .producer:
return L10n.producer
case .conductor:
return L10n.conductor
case .lyricist:
return L10n.lyricist
case .arranger:
return L10n.arranger
case .engineer:
return L10n.engineer
case .mixer:
return L10n.mixer
case .remixer:
return L10n.remixer
case .creator:
return L10n.creator
case .artist:
return L10n.artist
case .albumArtist:
return L10n.albumArtist
case .author:
return L10n.author
case .illustrator:
return L10n.illustrator
case .penciller:
return L10n.penciller
case .inker:
return L10n.inker
case .colorist:
return L10n.colorist
case .letterer:
return L10n.letterer
case .coverArtist:
return L10n.coverArtist
case .editor:
return L10n.editor
case .translator:
return L10n.translator
}
}
}