mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Show CustomFormats on Interactive Search Results
This commit is contained in:
@@ -60,6 +60,12 @@ const columns = [
|
|||||||
isSortable: true,
|
isSortable: true,
|
||||||
isVisible: true
|
isVisible: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'customFormat',
|
||||||
|
label: 'Formats',
|
||||||
|
isSortable: true,
|
||||||
|
isVisible: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'rejections',
|
name: 'rejections',
|
||||||
label: React.createElement(Icon, { name: icons.DANGER }),
|
label: React.createElement(Icon, { name: icons.DANGER }),
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.quality,
|
.quality,
|
||||||
|
.customFormat,
|
||||||
.language {
|
.language {
|
||||||
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||||
}
|
}
|
||||||
|
@@ -15,6 +15,7 @@ import ProtocolLabel from 'Activity/Queue/ProtocolLabel';
|
|||||||
import Peers from './Peers';
|
import Peers from './Peers';
|
||||||
import styles from './InteractiveSearchRow.css';
|
import styles from './InteractiveSearchRow.css';
|
||||||
import MovieQuality from 'Movie/MovieQuality';
|
import MovieQuality from 'Movie/MovieQuality';
|
||||||
|
import MovieFormats from 'Movie/MovieFormats';
|
||||||
import MovieLanguage from 'Movie/MovieLanguage';
|
import MovieLanguage from 'Movie/MovieLanguage';
|
||||||
|
|
||||||
function getDownloadIcon(isGrabbing, isGrabbed, grabError) {
|
function getDownloadIcon(isGrabbing, isGrabbed, grabError) {
|
||||||
@@ -173,6 +174,12 @@ class InteractiveSearchRow extends Component {
|
|||||||
/>
|
/>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
|
|
||||||
|
<TableRowCell className={styles.customFormat}>
|
||||||
|
<MovieFormats
|
||||||
|
formats={quality.customFormats}
|
||||||
|
/>
|
||||||
|
</TableRowCell>
|
||||||
|
|
||||||
<TableRowCell className={styles.rejected}>
|
<TableRowCell className={styles.rejected}>
|
||||||
{
|
{
|
||||||
!!rejections.length &&
|
!!rejections.length &&
|
||||||
|
29
frontend/src/Movie/MovieFormats.js
Normal file
29
frontend/src/Movie/MovieFormats.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
|
import { kinds } from 'Helpers/Props';
|
||||||
|
import Label from 'Components/Label';
|
||||||
|
|
||||||
|
function MovieFormats({ formats }) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
formats.map((format) => {
|
||||||
|
return (
|
||||||
|
<Label
|
||||||
|
key={format.id}
|
||||||
|
kind={kinds.INFO}
|
||||||
|
>
|
||||||
|
{format.name}
|
||||||
|
</Label>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
MovieFormats.propTypes = {
|
||||||
|
formats: PropTypes.arrayOf(PropTypes.object).isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MovieFormats;
|
Reference in New Issue
Block a user