mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Rework Tags for Music
This commit is contained in:
parent
d6efae537f
commit
8f45fe0afe
6 changed files with 27 additions and 20 deletions
|
@ -49,7 +49,7 @@ class TagsModalContent extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
seriesTags,
|
||||
artistTags,
|
||||
tagList,
|
||||
onModalClose,
|
||||
onApplyTagsPress
|
||||
|
@ -108,7 +108,7 @@ class TagsModalContent extends Component {
|
|||
|
||||
<div className={styles.result}>
|
||||
{
|
||||
seriesTags.map((t) => {
|
||||
artistTags.map((t) => {
|
||||
const tag = _.find(tagList, { id: t });
|
||||
|
||||
if (!tag) {
|
||||
|
@ -140,7 +140,7 @@ class TagsModalContent extends Component {
|
|||
return null;
|
||||
}
|
||||
|
||||
if (seriesTags.indexOf(t) > -1) {
|
||||
if (artistTags.indexOf(t) > -1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ class TagsModalContent extends Component {
|
|||
}
|
||||
|
||||
TagsModalContent.propTypes = {
|
||||
seriesTags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
artistTags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
tagList: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
onModalClose: PropTypes.func.isRequired,
|
||||
onApplyTagsPress: PropTypes.func.isRequired
|
||||
|
|
|
@ -15,10 +15,10 @@ function createMapStateToProps() {
|
|||
return s.id === id;
|
||||
});
|
||||
|
||||
const seriesTags = _.uniq(_.concat(..._.map(series, 'tags')));
|
||||
const artistTags = _.uniq(_.concat(..._.map(series, 'tags')));
|
||||
|
||||
return {
|
||||
seriesTags,
|
||||
artistTags,
|
||||
tagList
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue