Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced show-header to combine and show local show and global preferred words #7085

Merged
merged 7 commits into from
Aug 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Converted Edit Show to a Vue SFC ([#4486](https://github.com/pymedusa/Medusa/pull/4486)
- Improved API v2 exception reporting on Python 2 ([#6931](https://github.com/pymedusa/Medusa/pull/6931))
- Added support for qbittorrent api v2. Required from qbittorrent version > 3.2.0. ([#7040](https://github.com/pymedusa/Medusa/pull/7040))
- Show Header: Improved visibility of local and global configured required and ignored words. ([#7085](https://github.com/pymedusa/Medusa/pull/7085))

#### Fixes
- Fixed hdtorrent provider parse the publishing date with the day first ([#6847](https://github.com/pymedusa/Medusa/pull/6847))
Expand Down
90 changes: 61 additions & 29 deletions themes-default/slim/src/components/show-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,35 +169,77 @@

<tr v-if="show.config.aliases.length > 0">
<td class="showLegend" style="vertical-align: top;">Scene Name:</td>
<td>{{show.config.aliases.join(',')}}</td>
<td>{{show.config.aliases.join(', ')}}</td>
</tr>

<tr v-if="show.config.release.requiredWords.length > 0">
<td class="showLegend" style="vertical-align: top;">Required Words: </td>
<td><span class="break-word" :class="{required: type === 'snatch-selection'}">{{show.config.release.requiredWords.join(',')}}</span></td>
<tr v-if="show.config.release.requiredWords.length + search.filters.required.length > 0">
<td class="showLegend" style="vertical-align: top;">
<span :class="{required: type === 'snatch-selection'}">Required Words: </span>
</td>
<td>
<span v-if="show.config.release.requiredWords.length" class="break-word">
{{show.config.release.requiredWords.join(', ')}}
</span>
<span v-if="search.filters.required.length > 0" class="break-word global-filter">
<app-link href="config/search/#searchfilters">
<template v-if="show.config.release.requiredWords.length > 0">
<span v-if="show.config.release.requiredWordsExclude"> excluded from: </span>
<span v-else>+ </span>
</template>
{{search.filters.required.join(', ')}}
</app-link>
</span>
</td>
</tr>
<tr v-if="show.config.release.ignoredWords.length > 0">
<td class="showLegend" style="vertical-align: top;">Ignored Words: </td>
<td><span class="break-word" :class="{ignored: type === 'snatch-selection'}">{{show.config.release.ignoredWords.join(',')}}</span></td>
<tr v-if="show.config.release.ignoredWords.length + search.filters.ignored.length > 0">
<td class="showLegend" style="vertical-align: top;">
<span :class="{ignored: type === 'snatch-selection'}">Ignored Words: </span>
</td>
<td>
<span v-if="show.config.release.ignoredWords.length" class="break-word">
{{show.config.release.ignoredWords.join(', ')}}
</span>
<span v-if="search.filters.ignored.length > 0" class="break-word global-filter">
<app-link href="config/search/#searchfilters">
<template v-if="show.config.release.ignoredWords.length > 0">
<span v-if="show.config.release.ignoredWordsExclude"> excluded from: </span>
<span v-else>+ </span>
</template>
{{search.filters.ignored.join(', ')}}
</app-link>
</span>
</td>
</tr>

<tr v-if="preferredWords.length > 0">
<td class="showLegend" style="vertical-align: top;">Preferred Words: </td>
<td><span class="break-word" :class="{preferred: type === 'snatch-selection'}">{{preferredWords.join(',')}}</span></td>
<tr v-if="search.filters.preferred.length > 0">
<td class="showLegend" style="vertical-align: top;">
<span :class="{preferred: type === 'snatch-selection'}">Preferred Words: </span>
</td>
<td>
<app-link href="config/search/#searchfilters">
<span class="break-word">{{search.filters.preferred.join(', ')}}</span>
</app-link>
</td>
</tr>
<tr v-if="undesiredWords.length > 0">
<td class="showLegend" style="vertical-align: top;">Undesired Words: </td>
<td><span class="break-word" :class="{undesired: type === 'snatch-selection'}">{{undesiredWords.join(',')}}</span></td>
<tr v-if="search.filters.undesired.length > 0">
<td class="showLegend" style="vertical-align: top;">
<span :class="{undesired: type === 'snatch-selection'}">Undesired Words: </span>
</td>
<td>
<app-link href="config/search/#searchfilters">
<span class="break-word">{{search.filters.undesired.join(', ')}}</span>
</app-link>
</td>
</tr>

<tr v-if="show.config.release.whitelist && show.config.release.whitelist.length > 0">
<td class="showLegend">Wanted Groups:</td>
<td>{{show.config.release.whitelist.join(',')}}</td>
<td>{{show.config.release.whitelist.join(', ')}}</td>
</tr>

<tr v-if="show.config.release.blacklist && show.config.release.blacklist.length > 0">
<td class="showLegend">Unwanted Groups:</td>
<td>{{show.config.release.blacklist.join(',')}}</td>
<td>{{show.config.release.blacklist.join(', ')}}</td>
</tr>

<tr v-if="show.config.airdateOffset !== 0">
Expand Down Expand Up @@ -408,20 +450,6 @@ export default {
}
return result;
},
preferredWords() {
const { preferred } = this.search.filters;
if (preferred.length > 0) {
return preferred;
}
return [];
},
undesiredWords() {
const { undesired } = this.search.filters;
if (undesired.length > 0) {
return undesired;
}
return [];
},
episodeSummary() {
const { show } = this;
const { seasons } = show;
Expand Down Expand Up @@ -728,4 +756,8 @@ div#col-show-summary {
max-width: 280px;
}
}

span.global-filter {
font-style: italic;
}
</style>
2 changes: 1 addition & 1 deletion themes-default/slim/views/config_search.mako
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ window.app = new Vue({
<!-- search filters //-->
<div class="row component-group">
<div class="component-group-desc col-xs-12 col-md-2">
<h3>Search Filters</h3>
<a name="searchfilters"></a><h3>Search Filters</h3>
<p>Options to filter search results</p>
</div>
<div class="col-xs-12 col-md-10">
Expand Down
Loading