Merge branch 'main' into support-redirects

This commit is contained in:
Ethan Pippin 2022-01-15 22:13:00 -07:00 committed by GitHub
commit abdd303ccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 209 additions and 181 deletions

View File

@ -18,18 +18,19 @@ extension BaseItemDto {
let builder = DeviceProfileBuilder()
// TODO: fix bitrate settings
builder.setMaxBitrate(bitrate: 120_000_000)
let tempOverkillBitrate = 360_000_000
builder.setMaxBitrate(bitrate: tempOverkillBitrate)
let profile = builder.buildProfile()
let playbackInfo = PlaybackInfoDto(userId: SessionManager.main.currentLogin.user.id,
maxStreamingBitrate: 120_000_000,
maxStreamingBitrate: tempOverkillBitrate,
startTimeTicks: self.userData?.playbackPositionTicks ?? 0,
deviceProfile: profile,
autoOpenLiveStream: true)
return MediaInfoAPI.getPostedPlaybackInfo(itemId: self.id!,
userId: SessionManager.main.currentLogin.user.id,
maxStreamingBitrate: 120_000_000,
maxStreamingBitrate: tempOverkillBitrate,
startTimeTicks: self.userData?.playbackPositionTicks ?? 0,
autoOpenLiveStream: true,
playbackInfoDto: playbackInfo)

View File

@ -0,0 +1,28 @@
//
// 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) 2022 Jellyfin & Jellyfin Contributors
//
import Foundation
class TranslationService {
static let shared = TranslationService()
func lookupTranslation(forKey key: String, inTable table: String) -> String {
let expectedValue = Bundle.main.localizedString(forKey: key, value: nil, table: table)
if expectedValue == key || NSLocale.preferredLanguages.first == "en" {
guard let path = Bundle.main.path(forResource: "en", ofType: "lproj"),
let bundle = Bundle(path: path) else { return expectedValue }
return NSLocalizedString(key, bundle: bundle, comment: "")
} else {
return expectedValue
}
}
}

View File

@ -11,289 +11,289 @@ import Foundation
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
internal enum L10n {
/// About
internal static let about = L10n.tr("Localizable", "about")
internal static var about: String { return L10n.tr("Localizable", "about") }
/// Accessibility
internal static let accessibility = L10n.tr("Localizable", "accessibility")
internal static var accessibility: String { return L10n.tr("Localizable", "accessibility") }
/// Add URL
internal static let addURL = L10n.tr("Localizable", "addURL")
internal static var addURL: String { return L10n.tr("Localizable", "addURL") }
/// Airs %s
internal static func airWithDate(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "airWithDate", p1)
}
/// All Genres
internal static let allGenres = L10n.tr("Localizable", "allGenres")
internal static var allGenres: String { return L10n.tr("Localizable", "allGenres") }
/// All Media
internal static let allMedia = L10n.tr("Localizable", "allMedia")
internal static var allMedia: String { return L10n.tr("Localizable", "allMedia") }
/// Appearance
internal static let appearance = L10n.tr("Localizable", "appearance")
internal static var appearance: String { return L10n.tr("Localizable", "appearance") }
/// Apply
internal static let apply = L10n.tr("Localizable", "apply")
internal static var apply: String { return L10n.tr("Localizable", "apply") }
/// Audio
internal static let audio = L10n.tr("Localizable", "audio")
internal static var audio: String { return L10n.tr("Localizable", "audio") }
/// Audio & Captions
internal static let audioAndCaptions = L10n.tr("Localizable", "audioAndCaptions")
internal static var audioAndCaptions: String { return L10n.tr("Localizable", "audioAndCaptions") }
/// Audio Track
internal static let audioTrack = L10n.tr("Localizable", "audioTrack")
internal static var audioTrack: String { return L10n.tr("Localizable", "audioTrack") }
/// Auto Play
internal static let autoPlay = L10n.tr("Localizable", "autoPlay")
internal static var autoPlay: String { return L10n.tr("Localizable", "autoPlay") }
/// Back
internal static let back = L10n.tr("Localizable", "back")
internal static var back: String { return L10n.tr("Localizable", "back") }
/// Cancel
internal static let cancel = L10n.tr("Localizable", "cancel")
internal static var cancel: String { return L10n.tr("Localizable", "cancel") }
/// Cannot connect to host
internal static let cannotConnectToHost = L10n.tr("Localizable", "cannotConnectToHost")
internal static var cannotConnectToHost: String { return L10n.tr("Localizable", "cannotConnectToHost") }
/// CAST
internal static let cast = L10n.tr("Localizable", "cast")
internal static var cast: String { return L10n.tr("Localizable", "cast") }
/// Cast & Crew
internal static let castAndCrew = L10n.tr("Localizable", "castAndCrew")
internal static var castAndCrew: String { return L10n.tr("Localizable", "castAndCrew") }
/// Change Server
internal static let changeServer = L10n.tr("Localizable", "changeServer")
internal static var changeServer: String { return L10n.tr("Localizable", "changeServer") }
/// Channels
internal static let channels = L10n.tr("Localizable", "channels")
internal static var channels: String { return L10n.tr("Localizable", "channels") }
/// Cinematic Views
internal static let cinematicViews = L10n.tr("Localizable", "cinematicViews")
internal static var cinematicViews: String { return L10n.tr("Localizable", "cinematicViews") }
/// Closed Captions
internal static let closedCaptions = L10n.tr("Localizable", "closedCaptions")
internal static var closedCaptions: String { return L10n.tr("Localizable", "closedCaptions") }
/// Compact
internal static let compact = L10n.tr("Localizable", "compact")
internal static var compact: String { return L10n.tr("Localizable", "compact") }
/// Confirm Close
internal static let confirmClose = L10n.tr("Localizable", "confirmClose")
internal static var confirmClose: String { return L10n.tr("Localizable", "confirmClose") }
/// Connect
internal static let connect = L10n.tr("Localizable", "connect")
internal static var connect: String { return L10n.tr("Localizable", "connect") }
/// Connect Manually
internal static let connectManually = L10n.tr("Localizable", "connectManually")
internal static var connectManually: String { return L10n.tr("Localizable", "connectManually") }
/// Connect to Jellyfin
internal static let connectToJellyfin = L10n.tr("Localizable", "connectToJellyfin")
internal static var connectToJellyfin: String { return L10n.tr("Localizable", "connectToJellyfin") }
/// Connect to a Jellyfin server
internal static let connectToJellyfinServer = L10n.tr("Localizable", "connectToJellyfinServer")
internal static var connectToJellyfinServer: String { return L10n.tr("Localizable", "connectToJellyfinServer") }
/// Connect to a Jellyfin server to get started
internal static let connectToJellyfinServerStart = L10n.tr("Localizable", "connectToJellyfinServerStart")
internal static var connectToJellyfinServerStart: String { return L10n.tr("Localizable", "connectToJellyfinServerStart") }
/// Connect to Server
internal static let connectToServer = L10n.tr("Localizable", "connectToServer")
internal static var connectToServer: String { return L10n.tr("Localizable", "connectToServer") }
/// Containers
internal static let containers = L10n.tr("Localizable", "containers")
internal static var containers: String { return L10n.tr("Localizable", "containers") }
/// Continue
internal static let `continue` = L10n.tr("Localizable", "continue")
internal static var `continue`: String { return L10n.tr("Localizable", "continue") }
/// Continue Watching
internal static let continueWatching = L10n.tr("Localizable", "continueWatching")
internal static var continueWatching: String { return L10n.tr("Localizable", "continueWatching") }
/// Customize
internal static let customize = L10n.tr("Localizable", "customize")
internal static var customize: String { return L10n.tr("Localizable", "customize") }
/// Dark
internal static let dark = L10n.tr("Localizable", "dark")
internal static var dark: String { return L10n.tr("Localizable", "dark") }
/// Default Scheme
internal static let defaultScheme = L10n.tr("Localizable", "defaultScheme")
internal static var defaultScheme: String { return L10n.tr("Localizable", "defaultScheme") }
/// DIRECTOR
internal static let director = L10n.tr("Localizable", "director")
internal static var director: String { return L10n.tr("Localizable", "director") }
/// Discovered Servers
internal static let discoveredServers = L10n.tr("Localizable", "discoveredServers")
internal static var discoveredServers: String { return L10n.tr("Localizable", "discoveredServers") }
/// Display order
internal static let displayOrder = L10n.tr("Localizable", "displayOrder")
internal static var displayOrder: String { return L10n.tr("Localizable", "displayOrder") }
/// Edit Jump Lengths
internal static let editJumpLengths = L10n.tr("Localizable", "editJumpLengths")
internal static var editJumpLengths: String { return L10n.tr("Localizable", "editJumpLengths") }
/// Empty Next Up
internal static let emptyNextUp = L10n.tr("Localizable", "emptyNextUp")
internal static var emptyNextUp: String { return L10n.tr("Localizable", "emptyNextUp") }
/// Episodes
internal static let episodes = L10n.tr("Localizable", "episodes")
internal static var episodes: String { return L10n.tr("Localizable", "episodes") }
/// Error
internal static let error = L10n.tr("Localizable", "error")
internal static var error: String { return L10n.tr("Localizable", "error") }
/// Existing Server
internal static let existingServer = L10n.tr("Localizable", "existingServer")
internal static var existingServer: String { return L10n.tr("Localizable", "existingServer") }
/// Existing User
internal static let existingUser = L10n.tr("Localizable", "existingUser")
internal static var existingUser: String { return L10n.tr("Localizable", "existingUser") }
/// Experimental
internal static let experimental = L10n.tr("Localizable", "experimental")
internal static var experimental: String { return L10n.tr("Localizable", "experimental") }
/// Favorites
internal static let favorites = L10n.tr("Localizable", "favorites")
internal static var favorites: String { return L10n.tr("Localizable", "favorites") }
/// File
internal static let file = L10n.tr("Localizable", "file")
internal static var file: String { return L10n.tr("Localizable", "file") }
/// Filter Results
internal static let filterResults = L10n.tr("Localizable", "filterResults")
internal static var filterResults: String { return L10n.tr("Localizable", "filterResults") }
/// Filters
internal static let filters = L10n.tr("Localizable", "filters")
internal static var filters: String { return L10n.tr("Localizable", "filters") }
/// Genres
internal static let genres = L10n.tr("Localizable", "genres")
internal static var genres: String { return L10n.tr("Localizable", "genres") }
/// Home
internal static let home = L10n.tr("Localizable", "home")
internal static var home: String { return L10n.tr("Localizable", "home") }
/// Information
internal static let information = L10n.tr("Localizable", "information")
internal static var information: String { return L10n.tr("Localizable", "information") }
/// Items
internal static let items = L10n.tr("Localizable", "items")
internal static var items: String { return L10n.tr("Localizable", "items") }
/// Jump Backward Length
internal static let jumpBackwardLength = L10n.tr("Localizable", "jumpBackwardLength")
internal static var jumpBackwardLength: String { return L10n.tr("Localizable", "jumpBackwardLength") }
/// Jump Forward Length
internal static let jumpForwardLength = L10n.tr("Localizable", "jumpForwardLength")
internal static var jumpForwardLength: String { return L10n.tr("Localizable", "jumpForwardLength") }
/// Jump Gestures Enabled
internal static let jumpGesturesEnabled = L10n.tr("Localizable", "jumpGesturesEnabled")
internal static var jumpGesturesEnabled: String { return L10n.tr("Localizable", "jumpGesturesEnabled") }
/// %s seconds
internal static func jumpLengthSeconds(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "jumpLengthSeconds", p1)
}
/// Larger
internal static let larger = L10n.tr("Localizable", "larger")
internal static var larger: String { return L10n.tr("Localizable", "larger") }
/// Largest
internal static let largest = L10n.tr("Localizable", "largest")
internal static var largest: String { return L10n.tr("Localizable", "largest") }
/// Latest %@
internal static func latestWithString(_ p1: Any) -> String {
return L10n.tr("Localizable", "latestWithString", String(describing: p1))
}
/// Library
internal static let library = L10n.tr("Localizable", "library")
internal static var library: String { return L10n.tr("Localizable", "library") }
/// Light
internal static let light = L10n.tr("Localizable", "light")
internal static var light: String { return L10n.tr("Localizable", "light") }
/// Loading
internal static let loading = L10n.tr("Localizable", "loading")
internal static var loading: String { return L10n.tr("Localizable", "loading") }
/// Local Servers
internal static let localServers = L10n.tr("Localizable", "localServers")
internal static var localServers: String { return L10n.tr("Localizable", "localServers") }
/// Login
internal static let login = L10n.tr("Localizable", "login")
internal static var login: String { return L10n.tr("Localizable", "login") }
/// Login to %@
internal static func loginToWithString(_ p1: Any) -> String {
return L10n.tr("Localizable", "loginToWithString", String(describing: p1))
}
/// Media
internal static let media = L10n.tr("Localizable", "media")
internal static var media: String { return L10n.tr("Localizable", "media") }
/// Missing
internal static let missing = L10n.tr("Localizable", "missing")
internal static var missing: String { return L10n.tr("Localizable", "missing") }
/// Missing Items
internal static let missingItems = L10n.tr("Localizable", "missingItems")
internal static var missingItems: String { return L10n.tr("Localizable", "missingItems") }
/// More Like This
internal static let moreLikeThis = L10n.tr("Localizable", "moreLikeThis")
internal static var moreLikeThis: String { return L10n.tr("Localizable", "moreLikeThis") }
/// Movies
internal static let movies = L10n.tr("Localizable", "movies")
internal static var movies: String { return L10n.tr("Localizable", "movies") }
/// %d users
internal static func multipleUsers(_ p1: Int) -> String {
return L10n.tr("Localizable", "multipleUsers", p1)
}
/// Name
internal static let name = L10n.tr("Localizable", "name")
internal static var name: String { return L10n.tr("Localizable", "name") }
/// Networking
internal static let networking = L10n.tr("Localizable", "networking")
internal static var networking: String { return L10n.tr("Localizable", "networking") }
/// Network timed out
internal static let networkTimedOut = L10n.tr("Localizable", "networkTimedOut")
internal static var networkTimedOut: String { return L10n.tr("Localizable", "networkTimedOut") }
/// Next
internal static let next = L10n.tr("Localizable", "next")
internal static var next: String { return L10n.tr("Localizable", "next") }
/// Next Up
internal static let nextUp = L10n.tr("Localizable", "nextUp")
internal static var nextUp: String { return L10n.tr("Localizable", "nextUp") }
/// No Cast devices found..
internal static let noCastdevicesfound = L10n.tr("Localizable", "noCastdevicesfound")
internal static var noCastdevicesfound: String { return L10n.tr("Localizable", "noCastdevicesfound") }
/// No Codec
internal static let noCodec = L10n.tr("Localizable", "noCodec")
internal static var noCodec: String { return L10n.tr("Localizable", "noCodec") }
/// No episodes available
internal static let noEpisodesAvailable = L10n.tr("Localizable", "noEpisodesAvailable")
internal static var noEpisodesAvailable: String { return L10n.tr("Localizable", "noEpisodesAvailable") }
/// No local servers found
internal static let noLocalServersFound = L10n.tr("Localizable", "noLocalServersFound")
internal static var noLocalServersFound: String { return L10n.tr("Localizable", "noLocalServersFound") }
/// None
internal static let `none` = L10n.tr("Localizable", "none")
internal static var `none`: String { return L10n.tr("Localizable", "none") }
/// No overview available
internal static let noOverviewAvailable = L10n.tr("Localizable", "noOverviewAvailable")
internal static var noOverviewAvailable: String { return L10n.tr("Localizable", "noOverviewAvailable") }
/// No results.
internal static let noResults = L10n.tr("Localizable", "noResults")
internal static var noResults: String { return L10n.tr("Localizable", "noResults") }
/// Normal
internal static let normal = L10n.tr("Localizable", "normal")
internal static var normal: String { return L10n.tr("Localizable", "normal") }
/// N/A
internal static let notAvailableSlash = L10n.tr("Localizable", "notAvailableSlash")
internal static var notAvailableSlash: String { return L10n.tr("Localizable", "notAvailableSlash") }
/// Type: %@ not implemented yet :(
internal static func notImplementedYetWithType(_ p1: Any) -> String {
return L10n.tr("Localizable", "notImplementedYetWithType", String(describing: p1))
}
/// No title
internal static let noTitle = L10n.tr("Localizable", "noTitle")
internal static var noTitle: String { return L10n.tr("Localizable", "noTitle") }
/// Ok
internal static let ok = L10n.tr("Localizable", "ok")
internal static var ok: String { return L10n.tr("Localizable", "ok") }
/// 1 user
internal static let oneUser = L10n.tr("Localizable", "oneUser")
internal static var oneUser: String { return L10n.tr("Localizable", "oneUser") }
/// Operating System
internal static let operatingSystem = L10n.tr("Localizable", "operatingSystem")
internal static var operatingSystem: String { return L10n.tr("Localizable", "operatingSystem") }
/// Other
internal static let other = L10n.tr("Localizable", "other")
internal static var other: String { return L10n.tr("Localizable", "other") }
/// Other User
internal static let otherUser = L10n.tr("Localizable", "otherUser")
internal static var otherUser: String { return L10n.tr("Localizable", "otherUser") }
/// Overlay
internal static let overlay = L10n.tr("Localizable", "overlay")
internal static var overlay: String { return L10n.tr("Localizable", "overlay") }
/// Overlay Type
internal static let overlayType = L10n.tr("Localizable", "overlayType")
internal static var overlayType: String { return L10n.tr("Localizable", "overlayType") }
/// Overview
internal static let overview = L10n.tr("Localizable", "overview")
internal static var overview: String { return L10n.tr("Localizable", "overview") }
/// Page %1$@ of %2$@
internal static func pageOfWithNumbers(_ p1: Any, _ p2: Any) -> String {
return L10n.tr("Localizable", "pageOfWithNumbers", String(describing: p1), String(describing: p2))
}
/// Password
internal static let password = L10n.tr("Localizable", "password")
internal static var password: String { return L10n.tr("Localizable", "password") }
/// Play
internal static let play = L10n.tr("Localizable", "play")
internal static var play: String { return L10n.tr("Localizable", "play") }
/// Playback settings
internal static let playbackSettings = L10n.tr("Localizable", "playbackSettings")
internal static var playbackSettings: String { return L10n.tr("Localizable", "playbackSettings") }
/// Playback Speed
internal static let playbackSpeed = L10n.tr("Localizable", "playbackSpeed")
internal static var playbackSpeed: String { return L10n.tr("Localizable", "playbackSpeed") }
/// Play From Beginning
internal static let playFromBeginning = L10n.tr("Localizable", "playFromBeginning")
internal static var playFromBeginning: String { return L10n.tr("Localizable", "playFromBeginning") }
/// Play Next
internal static let playNext = L10n.tr("Localizable", "playNext")
internal static var playNext: String { return L10n.tr("Localizable", "playNext") }
/// Play Next Item
internal static let playNextItem = L10n.tr("Localizable", "playNextItem")
internal static var playNextItem: String { return L10n.tr("Localizable", "playNextItem") }
/// Play Previous Item
internal static let playPreviousItem = L10n.tr("Localizable", "playPreviousItem")
internal static var playPreviousItem: String { return L10n.tr("Localizable", "playPreviousItem") }
/// Present
internal static let present = L10n.tr("Localizable", "present")
internal static var present: String { return L10n.tr("Localizable", "present") }
/// Press Down for Menu
internal static let pressDownForMenu = L10n.tr("Localizable", "pressDownForMenu")
internal static var pressDownForMenu: String { return L10n.tr("Localizable", "pressDownForMenu") }
/// Programs
internal static let programs = L10n.tr("Localizable", "programs")
internal static var programs: String { return L10n.tr("Localizable", "programs") }
/// Rated
internal static let rated = L10n.tr("Localizable", "rated")
internal static var rated: String { return L10n.tr("Localizable", "rated") }
/// Recently Added
internal static let recentlyAdded = L10n.tr("Localizable", "recentlyAdded")
internal static var recentlyAdded: String { return L10n.tr("Localizable", "recentlyAdded") }
/// Recommended
internal static let recommended = L10n.tr("Localizable", "recommended")
internal static var recommended: String { return L10n.tr("Localizable", "recommended") }
/// Refresh
internal static let refresh = L10n.tr("Localizable", "refresh")
internal static var refresh: String { return L10n.tr("Localizable", "refresh") }
/// Regular
internal static let regular = L10n.tr("Localizable", "regular")
internal static var regular: String { return L10n.tr("Localizable", "regular") }
/// Released
internal static let released = L10n.tr("Localizable", "released")
internal static var released: String { return L10n.tr("Localizable", "released") }
/// Remove
internal static let remove = L10n.tr("Localizable", "remove")
internal static var remove: String { return L10n.tr("Localizable", "remove") }
/// Remove All Users
internal static let removeAllUsers = L10n.tr("Localizable", "removeAllUsers")
internal static var removeAllUsers: String { return L10n.tr("Localizable", "removeAllUsers") }
/// Remove From Resume
internal static let removeFromResume = L10n.tr("Localizable", "removeFromResume")
internal static var removeFromResume: String { return L10n.tr("Localizable", "removeFromResume") }
/// Reset
internal static let reset = L10n.tr("Localizable", "reset")
internal static var reset: String { return L10n.tr("Localizable", "reset") }
/// Reset App Settings
internal static let resetAppSettings = L10n.tr("Localizable", "resetAppSettings")
internal static var resetAppSettings: String { return L10n.tr("Localizable", "resetAppSettings") }
/// Reset User Settings
internal static let resetUserSettings = L10n.tr("Localizable", "resetUserSettings")
internal static var resetUserSettings: String { return L10n.tr("Localizable", "resetUserSettings") }
/// Resume 5 Second Offset
internal static let resume5SecondOffset = L10n.tr("Localizable", "resume5SecondOffset")
internal static var resume5SecondOffset: String { return L10n.tr("Localizable", "resume5SecondOffset") }
/// Retry
internal static let retry = L10n.tr("Localizable", "retry")
internal static var retry: String { return L10n.tr("Localizable", "retry") }
/// Runtime
internal static let runtime = L10n.tr("Localizable", "runtime")
internal static var runtime: String { return L10n.tr("Localizable", "runtime") }
/// Search
internal static let search = L10n.tr("Localizable", "search")
internal static var search: String { return L10n.tr("Localizable", "search") }
/// Search
internal static let searchDots = L10n.tr("Localizable", "searchDots")
internal static var searchDots: String { return L10n.tr("Localizable", "searchDots") }
/// Searching
internal static let searchingDots = L10n.tr("Localizable", "searchingDots")
internal static var searchingDots: String { return L10n.tr("Localizable", "searchingDots") }
/// Season
internal static let season = L10n.tr("Localizable", "season")
internal static var season: String { return L10n.tr("Localizable", "season") }
/// S%1$@:E%2$@
internal static func seasonAndEpisode(_ p1: Any, _ p2: Any) -> String {
return L10n.tr("Localizable", "seasonAndEpisode", String(describing: p1), String(describing: p2))
}
/// Seasons
internal static let seasons = L10n.tr("Localizable", "seasons")
internal static var seasons: String { return L10n.tr("Localizable", "seasons") }
/// See All
internal static let seeAll = L10n.tr("Localizable", "seeAll")
internal static var seeAll: String { return L10n.tr("Localizable", "seeAll") }
/// See More
internal static let seeMore = L10n.tr("Localizable", "seeMore")
internal static var seeMore: String { return L10n.tr("Localizable", "seeMore") }
/// Select Cast Destination
internal static let selectCastDestination = L10n.tr("Localizable", "selectCastDestination")
internal static var selectCastDestination: String { return L10n.tr("Localizable", "selectCastDestination") }
/// Series
internal static let series = L10n.tr("Localizable", "series")
internal static var series: String { return L10n.tr("Localizable", "series") }
/// Server
internal static let server = L10n.tr("Localizable", "server")
internal static var server: String { return L10n.tr("Localizable", "server") }
/// Server %s is already connected
internal static func serverAlreadyConnected(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "serverAlreadyConnected", p1)
@ -303,95 +303,95 @@ internal enum L10n {
return L10n.tr("Localizable", "serverAlreadyExistsPrompt", p1)
}
/// Server Details
internal static let serverDetails = L10n.tr("Localizable", "serverDetails")
internal static var serverDetails: String { return L10n.tr("Localizable", "serverDetails") }
/// Server Information
internal static let serverInformation = L10n.tr("Localizable", "serverInformation")
internal static var serverInformation: String { return L10n.tr("Localizable", "serverInformation") }
/// Servers
internal static let servers = L10n.tr("Localizable", "servers")
internal static var servers: String { return L10n.tr("Localizable", "servers") }
/// Server URL
internal static let serverURL = L10n.tr("Localizable", "serverURL")
internal static var serverURL: String { return L10n.tr("Localizable", "serverURL") }
/// Settings
internal static let settings = L10n.tr("Localizable", "settings")
internal static var settings: String { return L10n.tr("Localizable", "settings") }
/// Show Cast & Crew
internal static let showCastAndCrew = L10n.tr("Localizable", "showCastAndCrew")
internal static var showCastAndCrew: String { return L10n.tr("Localizable", "showCastAndCrew") }
/// Show Missing Episodes
internal static let showMissingEpisodes = L10n.tr("Localizable", "showMissingEpisodes")
internal static var showMissingEpisodes: String { return L10n.tr("Localizable", "showMissingEpisodes") }
/// Show Missing Seasons
internal static let showMissingSeasons = L10n.tr("Localizable", "showMissingSeasons")
internal static var showMissingSeasons: String { return L10n.tr("Localizable", "showMissingSeasons") }
/// Show Poster Labels
internal static let showPosterLabels = L10n.tr("Localizable", "showPosterLabels")
internal static var showPosterLabels: String { return L10n.tr("Localizable", "showPosterLabels") }
/// Signed in as %@
internal static func signedInAsWithString(_ p1: Any) -> String {
return L10n.tr("Localizable", "signedInAsWithString", String(describing: p1))
}
/// Sign In
internal static let signIn = L10n.tr("Localizable", "signIn")
internal static var signIn: String { return L10n.tr("Localizable", "signIn") }
/// Sign in to get started
internal static let signInGetStarted = L10n.tr("Localizable", "signInGetStarted")
internal static var signInGetStarted: String { return L10n.tr("Localizable", "signInGetStarted") }
/// Sign In to %s
internal static func signInToServer(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "signInToServer", p1)
}
/// Smaller
internal static let smaller = L10n.tr("Localizable", "smaller")
internal static var smaller: String { return L10n.tr("Localizable", "smaller") }
/// Smallest
internal static let smallest = L10n.tr("Localizable", "smallest")
internal static var smallest: String { return L10n.tr("Localizable", "smallest") }
/// Sort by
internal static let sortBy = L10n.tr("Localizable", "sortBy")
internal static var sortBy: String { return L10n.tr("Localizable", "sortBy") }
/// STUDIO
internal static let studio = L10n.tr("Localizable", "studio")
internal static var studio: String { return L10n.tr("Localizable", "studio") }
/// Studios
internal static let studios = L10n.tr("Localizable", "studios")
internal static var studios: String { return L10n.tr("Localizable", "studios") }
/// Subtitles
internal static let subtitles = L10n.tr("Localizable", "subtitles")
internal static var subtitles: String { return L10n.tr("Localizable", "subtitles") }
/// Subtitle Size
internal static let subtitleSize = L10n.tr("Localizable", "subtitleSize")
internal static var subtitleSize: String { return L10n.tr("Localizable", "subtitleSize") }
/// Suggestions
internal static let suggestions = L10n.tr("Localizable", "suggestions")
internal static var suggestions: String { return L10n.tr("Localizable", "suggestions") }
/// Switch User
internal static let switchUser = L10n.tr("Localizable", "switchUser")
internal static var switchUser: String { return L10n.tr("Localizable", "switchUser") }
/// System
internal static let system = L10n.tr("Localizable", "system")
internal static var system: String { return L10n.tr("Localizable", "system") }
/// Tags
internal static let tags = L10n.tr("Localizable", "tags")
internal static var tags: String { return L10n.tr("Localizable", "tags") }
/// Too Many Redirects
internal static let tooManyRedirects = L10n.tr("Localizable", "tooManyRedirects")
internal static let tooManyRedirects: String { return L10n.tr("Localizable", "tooManyRedirects") }
/// Try again
internal static let tryAgain = L10n.tr("Localizable", "tryAgain")
internal static var tryAgain: String { return L10n.tr("Localizable", "tryAgain") }
/// TV Shows
internal static let tvShows = L10n.tr("Localizable", "tvShows")
internal static var tvShows: String { return L10n.tr("Localizable", "tvShows") }
/// Unable to connect to server
internal static let unableToConnectServer = L10n.tr("Localizable", "unableToConnectServer")
internal static var unableToConnectServer: String { return L10n.tr("Localizable", "unableToConnectServer") }
/// Unaired
internal static let unaired = L10n.tr("Localizable", "unaired")
internal static var unaired: String { return L10n.tr("Localizable", "unaired") }
/// Unauthorized
internal static let unauthorized = L10n.tr("Localizable", "unauthorized")
internal static var unauthorized: String { return L10n.tr("Localizable", "unauthorized") }
/// Unauthorized user
internal static let unauthorizedUser = L10n.tr("Localizable", "unauthorizedUser")
internal static var unauthorizedUser: String { return L10n.tr("Localizable", "unauthorizedUser") }
/// Unknown
internal static let unknown = L10n.tr("Localizable", "unknown")
internal static var unknown: String { return L10n.tr("Localizable", "unknown") }
/// Unknown Error
internal static let unknownError = L10n.tr("Localizable", "unknownError")
internal static var unknownError: String { return L10n.tr("Localizable", "unknownError") }
/// URL
internal static let url = L10n.tr("Localizable", "url")
internal static var url: String { return L10n.tr("Localizable", "url") }
/// User
internal static let user = L10n.tr("Localizable", "user")
internal static var user: String { return L10n.tr("Localizable", "user") }
/// User %s is already signed in
internal static func userAlreadySignedIn(_ p1: UnsafePointer<CChar>) -> String {
return L10n.tr("Localizable", "userAlreadySignedIn", p1)
}
/// Username
internal static let username = L10n.tr("Localizable", "username")
internal static var username: String { return L10n.tr("Localizable", "username") }
/// Version
internal static let version = L10n.tr("Localizable", "version")
internal static var version: String { return L10n.tr("Localizable", "version") }
/// Video Player
internal static let videoPlayer = L10n.tr("Localizable", "videoPlayer")
internal static var videoPlayer: String { return L10n.tr("Localizable", "videoPlayer") }
/// Who's watching?
internal static let whosWatching = L10n.tr("Localizable", "WhosWatching")
internal static var whosWatching: String { return L10n.tr("Localizable", "WhosWatching") }
/// WIP
internal static let wip = L10n.tr("Localizable", "wip")
internal static var wip: String { return L10n.tr("Localizable", "wip") }
/// Your Favorites
internal static let yourFavorites = L10n.tr("Localizable", "yourFavorites")
internal static var yourFavorites: String { return L10n.tr("Localizable", "yourFavorites") }
}
// swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:enable nesting type_body_length type_name vertical_whitespace_opening_braces
@ -400,19 +400,7 @@ internal enum L10n {
extension L10n {
private static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String {
let format = BundleToken.bundle.localizedString(forKey: key, value: nil, table: table)
let format = TranslationService.shared.lookupTranslation(forKey:inTable:)(key, table)
return String(format: format, locale: Locale.current, arguments: args)
}
}
// swiftlint:disable convenience_type
private final class BundleToken {
static let bundle: Bundle = {
#if SWIFT_PACKAGE
return Bundle.module
#else
return Bundle(for: BundleToken.self)
#endif
}()
}
// swiftlint:enable convenience_type

View File

@ -136,6 +136,7 @@ final class HomeViewModel: ViewModel {
.people,
.chapters,
],
includeItemTypes: ["Movie", "Series"],
enableImageTypes: [.primary, .backdrop, .thumb],
enableUserData: true,
limit: 8)

View File

@ -317,6 +317,9 @@
E13DD4022717EE79009D4DAF /* UserListCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13DD4012717EE79009D4DAF /* UserListCoordinator.swift */; };
E13F26AF278754E300DF4761 /* CinematicSeriesItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13F26AE278754E300DF4761 /* CinematicSeriesItemView.swift */; };
E13F26B12787589300DF4761 /* CinematicSeasonItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13F26B02787589300DF4761 /* CinematicSeasonItemView.swift */; };
E14B4141279354770016CBE5 /* LocalizedLookup.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14B4140279354770016CBE5 /* LocalizedLookup.swift */; };
E14B4142279354770016CBE5 /* LocalizedLookup.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14B4140279354770016CBE5 /* LocalizedLookup.swift */; };
E14B4143279354770016CBE5 /* LocalizedLookup.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14B4140279354770016CBE5 /* LocalizedLookup.swift */; };
E14F7D0726DB36EF007C3AE6 /* ItemPortraitMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14F7D0626DB36EF007C3AE6 /* ItemPortraitMainView.swift */; };
E14F7D0926DB36F7007C3AE6 /* ItemLandscapeMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14F7D0826DB36F7007C3AE6 /* ItemLandscapeMainView.swift */; };
E173DA5026D048D600CC4EB7 /* ServerDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E173DA4F26D048D600CC4EB7 /* ServerDetailView.swift */; };
@ -688,6 +691,7 @@
E13DD4012717EE79009D4DAF /* UserListCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserListCoordinator.swift; sourceTree = "<group>"; };
E13F26AE278754E300DF4761 /* CinematicSeriesItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CinematicSeriesItemView.swift; sourceTree = "<group>"; };
E13F26B02787589300DF4761 /* CinematicSeasonItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CinematicSeasonItemView.swift; sourceTree = "<group>"; };
E14B4140279354770016CBE5 /* LocalizedLookup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedLookup.swift; sourceTree = "<group>"; };
E14F7D0626DB36EF007C3AE6 /* ItemPortraitMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemPortraitMainView.swift; sourceTree = "<group>"; };
E14F7D0826DB36F7007C3AE6 /* ItemLandscapeMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemLandscapeMainView.swift; sourceTree = "<group>"; };
E173DA4F26D048D600CC4EB7 /* ServerDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerDetailView.swift; sourceTree = "<group>"; };
@ -1253,6 +1257,7 @@
isa = PBXGroup;
children = (
6264E88B273850380081A12A /* Strings.swift */,
E14B4140279354770016CBE5 /* LocalizedLookup.swift */,
);
path = Generated;
sourceTree = "<group>";
@ -2147,6 +2152,7 @@
531690ED267ABF46005D8AB9 /* ContinueWatchingView.swift in Sources */,
E17885A4278105170094FBCF /* SFSymbolButton.swift in Sources */,
E13DD3ED27178A54009D4DAF /* UserSignInViewModel.swift in Sources */,
E14B4142279354770016CBE5 /* LocalizedLookup.swift in Sources */,
E1B59FD92786AE4600A5287E /* NextUpCard.swift in Sources */,
62EC3530267666A5000E9F2D /* SessionManager.swift in Sources */,
E1E5D5372783A52C00692DFE /* CinematicEpisodeItemView.swift in Sources */,
@ -2305,6 +2311,7 @@
E13DD3EC27178A54009D4DAF /* UserSignInViewModel.swift in Sources */,
625CB5772678C34300530A6E /* ConnectToServerViewModel.swift in Sources */,
C4BE07852728446F003F4AD1 /* LiveTVChannelsViewModel.swift in Sources */,
E14B4141279354770016CBE5 /* LocalizedLookup.swift in Sources */,
E111DE222790BB46008118A3 /* DetectBottomScrollView.swift in Sources */,
5D160403278A41FD00D22B99 /* VLCPlayer+subtitles.swift in Sources */,
536D3D78267BD5C30004248C /* ViewModel.swift in Sources */,
@ -2441,6 +2448,7 @@
E10D87E0278510E400BD264C /* PosterSize.swift in Sources */,
E1AD105426D97161003E4A08 /* BaseItemDtoExtensions.swift in Sources */,
E1FCD09A26C4F35A007C8DCF /* ErrorMessage.swift in Sources */,
E14B4143279354770016CBE5 /* LocalizedLookup.swift in Sources */,
628B95272670CABD0091AF3B /* NextUpWidget.swift in Sources */,
E13DD3F72717E87D009D4DAF /* SwiftfinNotificationCenter.swift in Sources */,
E1D4BF8D2719F3A300A11E64 /* VideoPlayerJumpLength.swift in Sources */,

Binary file not shown.

View File

@ -3,3 +3,5 @@ strings:
outputs:
- templateName: structured-swift5
output: Shared/Generated/Strings.swift
params:
lookupFunction: TranslationService.shared.lookupTranslation(forKey:inTable:)