build fixes - type errors, missing icons, tauri externals, unused imports
This commit is contained in:
@@ -3,12 +3,10 @@ import { useNavigate } from 'react-router-dom'
|
||||
import { motion } from 'framer-motion'
|
||||
import { Film, Tv, AlertCircle } from '../lib/icons'
|
||||
import { useLibraryItems } from '../hooks/use-jellyfin'
|
||||
import { getBestImage, getStoredServerUrl } from '../api/jellyfin'
|
||||
import PosterCard from '../components/ui/PosterCard'
|
||||
|
||||
export default function DuplicatesPage() {
|
||||
const navigate = useNavigate()
|
||||
const serverUrl = getStoredServerUrl()
|
||||
const { data, isLoading } = useLibraryItems(undefined, {
|
||||
includeItemTypes: ['Movie', 'Series'],
|
||||
sortBy: ['SortName'],
|
||||
|
||||
@@ -191,6 +191,7 @@ export default function PlayerPage() {
|
||||
const stillWatchingTargetRef = useRef<string | null>(null)
|
||||
|
||||
/* Preferences */
|
||||
const sleepTimerMinutes = usePreferencesStore(s => s.sleepTimerMinutes)
|
||||
const autoplayNext = usePreferencesStore(s => s.autoplayNext)
|
||||
const subtitleMode = usePreferencesStore(s => s.subtitleMode)
|
||||
const subtitleLanguage = usePreferencesStore(s => s.subtitleLanguage)
|
||||
@@ -1520,7 +1521,7 @@ export default function PlayerPage() {
|
||||
streamUrl,
|
||||
})
|
||||
}}
|
||||
isDownloaded={!!item && useDownloads.getState().items.some(d => d.itemId === item.Id)},
|
||||
isDownloaded={!!item && useDownloads.getState().items.some(d => d.itemId === item.Id)}
|
||||
/>
|
||||
|
||||
{/* Center play/pause indicator (only shown briefly when paused) */}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useMemo } from 'react'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { motion } from 'framer-motion'
|
||||
import { Activity, Monitor, Users, Server as ServerIcon, Clock, Film } from '../../../lib/icons'
|
||||
import { Activity, MonitorPlay, Users, Server as ServerIcon, Clock, Film } from '../../../lib/icons'
|
||||
import { jellyfinClient, getSystemApi, getSessionApi, getActivityLogApi } from '../../../api/jellyfin'
|
||||
import { Section, Row, SubHeading } from '../_ui'
|
||||
import { Section, SubHeading } from '../_ui'
|
||||
|
||||
function useApi() {
|
||||
return jellyfinClient.getApi()
|
||||
@@ -49,12 +49,13 @@ export function ServerDashboardSection() {
|
||||
const transcodes = activeSessions.filter(s => s.PlayState?.PlayMethod === 'Transcode')
|
||||
|
||||
const uptime = useMemo(() => {
|
||||
if (!info?.ServerStartTime) return null
|
||||
const ms = Date.now() - new Date(info.ServerStartTime).getTime()
|
||||
const start = (info as any)?.ServerStartTime
|
||||
if (!start) return null
|
||||
const ms = Date.now() - new Date(start).getTime()
|
||||
const days = Math.floor(ms / 86_400_000)
|
||||
const hrs = Math.floor((ms % 86_400_000) / 3_600_000)
|
||||
return days > 0 ? `${days}d ${hrs}h` : `${hrs}h`
|
||||
}, [info?.ServerStartTime])
|
||||
}, [info])
|
||||
|
||||
return (
|
||||
<Section id="server-dashboard" title="Server dashboard" description="Live stats and activity">
|
||||
@@ -62,7 +63,7 @@ export function ServerDashboardSection() {
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 mb-6">
|
||||
<StatCard label="Version" value={info?.Version || '-'} icon={<ServerIcon size={12} className="text-accent" />} />
|
||||
<StatCard label="Uptime" value={uptime || '-'} icon={<Clock size={12} className="text-accent" />} />
|
||||
<StatCard label="Active streams" value={String(activeSessions.length)} icon={<Monitor size={12} className="text-accent" />} />
|
||||
<StatCard label="Active streams" value={String(activeSessions.length)} icon={<MonitorPlay size={12} className="text-accent" />} />
|
||||
<StatCard label="Transcoding" value={String(transcodes.length)} icon={<Activity size={12} className="text-accent" />} />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ExternalLink, Loader2, Check, Trash2 } from '../../../lib/icons'
|
||||
import { Section, Row, Input, Toggle } from '../_ui'
|
||||
import { useTrakt } from '../../../stores/trakt-store'
|
||||
import { useWatchlist } from '../../../hooks/use-watchlist'
|
||||
import { requestDeviceCode, pollDeviceToken, fetchTraktWatchlist, addToTraktWatchlist } from '../../../lib/trakt'
|
||||
import { requestDeviceCode, pollDeviceToken, fetchTraktWatchlist } from '../../../lib/trakt'
|
||||
import { toast } from '../../../stores/toast-store'
|
||||
import { useLibraryByTmdbId } from '../../../hooks/use-jellyfin'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user