feat: provider filter
This commit is contained in:
@@ -33,7 +33,7 @@ export default class extends Controller {
|
|||||||
}
|
}
|
||||||
outlet.options.forEach((option) => {
|
outlet.options.forEach((option) => {
|
||||||
this.addLanguages(option, option.dataset);
|
this.addLanguages(option, option.dataset);
|
||||||
// this.addProviders(option, props);
|
this.addProviders(option, option.dataset);
|
||||||
// this.addSeasons(option, props);
|
// this.addSeasons(option, props);
|
||||||
// this.addEpisodes(option, props);
|
// this.addEpisodes(option, props);
|
||||||
})
|
})
|
||||||
@@ -54,6 +54,7 @@ export default class extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addProviders(option, props) {
|
addProviders(option, props) {
|
||||||
|
console.log(props);
|
||||||
if (!this.providers.includes(props['provider'])) {
|
if (!this.providers.includes(props['provider'])) {
|
||||||
this.providers.push(props['provider']);
|
this.providers.push(props['provider']);
|
||||||
}
|
}
|
||||||
@@ -96,7 +97,7 @@ export default class extends Controller {
|
|||||||
"resolution": this.resolutionTarget.value,
|
"resolution": this.resolutionTarget.value,
|
||||||
"codec": this.codecTarget.value,
|
"codec": this.codecTarget.value,
|
||||||
"language": this.languageTarget.value,
|
"language": this.languageTarget.value,
|
||||||
// "episodeNumber": this.episodeTarget.value,
|
"provider": this.providerTarget.value,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("movies" === this.mediaTypeValue) {
|
if ("movies" === this.mediaTypeValue) {
|
||||||
@@ -119,7 +120,7 @@ export default class extends Controller {
|
|||||||
const props = {
|
const props = {
|
||||||
"resolution": option.querySelector('#resolution').textContent.trim(),
|
"resolution": option.querySelector('#resolution').textContent.trim(),
|
||||||
"codec": option.querySelector('#codec').textContent.trim(),
|
"codec": option.querySelector('#codec').textContent.trim(),
|
||||||
// "provider": option.querySelector('#provider').textContent,
|
"provider": option.querySelector('#provider').textContent.trim(),
|
||||||
"languages": JSON.parse(option.dataset['languages']),
|
"languages": JSON.parse(option.dataset['languages']),
|
||||||
// "codec": option.querySelector('#codec').textContent,
|
// "codec": option.querySelector('#codec').textContent,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for result in results.results %}
|
{% for result in results.results %}
|
||||||
<tr class="bg-white border-b dark:bg-slate-700 dark:border-gray-600 border-gray-200" data-languages="{{ result.languages|json_encode }}">
|
<tr class="bg-white border-b dark:bg-slate-700 dark:border-gray-600 border-gray-200" data-languages="{{ result.languages|json_encode }}" data-provider="{{ result.provider }}">
|
||||||
<td id="size" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
<td id="size" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
||||||
{{ result.size }}
|
{{ result.size }}
|
||||||
</td>
|
</td>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<td id="seeders" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
<td id="seeders" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
||||||
{{ result.seeders }}
|
{{ result.seeders }}
|
||||||
</td>
|
</td>
|
||||||
<td id="provider" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
<td id="provider" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50" data-provider="{{ result.provider }}">
|
||||||
{{ result.provider }}
|
{{ result.provider }}
|
||||||
</td>
|
</td>
|
||||||
<td id="language" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50" data-languages="{{ result.languages|json_encode }}">
|
<td id="language" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50" data-languages="{{ result.languages|json_encode }}">
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for result in results.results %}
|
{% for result in results.results %}
|
||||||
<tr class="bg-white border-b dark:bg-slate-700 dark:border-gray-600 border-gray-200" data-languages="{{ result.languages|json_encode }}">
|
<tr class="bg-white border-b dark:bg-slate-700 dark:border-gray-600 border-gray-200" data-languages="{{ result.languages|json_encode }}" data-provider="{{ result.provider }}">
|
||||||
<td id="size" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
<td id="size" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
||||||
{{ result.size }}
|
{{ result.size }}
|
||||||
</td>
|
</td>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<td id="seeders" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
<td id="seeders" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
||||||
{{ result.seeders }}
|
{{ result.seeders }}
|
||||||
</td>
|
</td>
|
||||||
<td id="provider" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50">
|
<td id="provider" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50" data-provider="{{ result.provider }}">
|
||||||
{{ result.provider }}
|
{{ result.provider }}
|
||||||
</td>
|
</td>
|
||||||
<td id="language" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50" data-languages="{{ result.languages|json_encode }}">
|
<td id="language" class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-gray-50" data-languages="{{ result.languages|json_encode }}">
|
||||||
|
|||||||
Reference in New Issue
Block a user