mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
Add category associated to each torrent
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { rgba } from 'polished'
|
||||
import { NoImageIcon } from 'icons'
|
||||
import { IconButton, InputAdornment, TextField, useTheme } from '@material-ui/core'
|
||||
import {
|
||||
FormControl,
|
||||
IconButton,
|
||||
InputAdornment,
|
||||
InputLabel,
|
||||
MenuItem,
|
||||
Select,
|
||||
TextField,
|
||||
useTheme,
|
||||
} from '@material-ui/core'
|
||||
import { HighlightOff as HighlightOffIcon } from '@material-ui/icons'
|
||||
|
||||
import {
|
||||
@@ -18,6 +27,7 @@ import { checkImageURL } from './helpers'
|
||||
|
||||
export default function RightSideComponent({
|
||||
setTitle,
|
||||
setCategory,
|
||||
setPosterUrl,
|
||||
setIsPosterUrlCorrect,
|
||||
setIsUserInteractedWithPoster,
|
||||
@@ -25,6 +35,7 @@ export default function RightSideComponent({
|
||||
isTorrentSourceCorrect,
|
||||
isHashAlreadyExists,
|
||||
title,
|
||||
category,
|
||||
parsedTitle,
|
||||
posterUrl,
|
||||
isPosterUrlCorrect,
|
||||
@@ -45,6 +56,7 @@ export default function RightSideComponent({
|
||||
const primary = useTheme().palette.primary.main
|
||||
|
||||
const handleTitleChange = ({ target: { value } }) => setTitle(value)
|
||||
const handleCategoryChange = ({ target: { value } }) => setCategory(value)
|
||||
const handlePosterUrlChange = ({ target: { value } }) => {
|
||||
setPosterUrl(value)
|
||||
checkImageURL(value).then(setIsPosterUrlCorrect)
|
||||
@@ -101,6 +113,26 @@ export default function RightSideComponent({
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
<FormControl fullWidth>
|
||||
<InputLabel id='torrent-category-select-label'>Torrent category</InputLabel>
|
||||
<Select
|
||||
labelId='torrent-category-select-label'
|
||||
id='torrent-category-select'
|
||||
value={category}
|
||||
label='Torrent category'
|
||||
margin='dense'
|
||||
onChange={handleCategoryChange}
|
||||
variant='outlined'
|
||||
fullWidth
|
||||
>
|
||||
<MenuItem value='Films'>Films</MenuItem>
|
||||
<MenuItem value='Series'>Series</MenuItem>
|
||||
<MenuItem value='Music'>Music</MenuItem>
|
||||
<MenuItem value='Other'>Other</MenuItem>
|
||||
<MenuItem value='Unknown'>Unknown</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</>
|
||||
) : (
|
||||
<TextField
|
||||
|
||||
Reference in New Issue
Block a user