diff --git a/assets/controllers/download_button_controller.js b/assets/controllers/download_button_controller.js index 9cffbab..7459173 100644 --- a/assets/controllers/download_button_controller.js +++ b/assets/controllers/download_button_controller.js @@ -23,7 +23,7 @@ export default class extends Controller { }, body: JSON.stringify({ url: this.urlValue, - title: this.titleValue, + title: this.element.dataset['title'], filename: this.filenameValue, mediaType: this.mediaTypeValue, imdbId: this.imdbIdValue diff --git a/assets/controllers/movie_results_controller.js b/assets/controllers/movie_results_controller.js index a59af7b..7d2ca27 100644 --- a/assets/controllers/movie_results_controller.js +++ b/assets/controllers/movie_results_controller.js @@ -7,6 +7,7 @@ import { Controller } from '@hotwired/stimulus'; /* stimulusFetch: 'lazy' */ export default class extends Controller { static values = { + title: String, tmdbId: String, imdbId: String }; @@ -26,6 +27,7 @@ export default class extends Controller { .then(response => { this.element.innerHTML = response; this.options = this.element.querySelectorAll('tbody tr'); + this.options.forEach((option) => option.querySelector('.download-btn').dataset['title'] = this.titleValue); }); } } diff --git a/assets/controllers/tv_results_controller.js b/assets/controllers/tv_results_controller.js index ef4d5ef..524a9f5 100644 --- a/assets/controllers/tv_results_controller.js +++ b/assets/controllers/tv_results_controller.js @@ -7,6 +7,7 @@ import { Controller } from '@hotwired/stimulus'; /* stimulusFetch: 'lazy' */ export default class extends Controller { static values = { + title: String, tmdbId: String, imdbId: String, season: String, @@ -31,6 +32,7 @@ export default class extends Controller { .then(response => { this.element.innerHTML = response; this.options = this.element.querySelectorAll('tbody tr'); + this.options.forEach((option) => option.querySelector('.download-btn').dataset['title'] = this.titleValue); this.optionsLoaded = true; this.loadingIconOutlet.increaseCount(); }); diff --git a/bash/app/wget_download.sh b/bash/app/wget_download.sh index fa15a09..168c033 100755 --- a/bash/app/wget_download.sh +++ b/bash/app/wget_download.sh @@ -1,2 +1,2 @@ # $1 = movies/tvshows/etc, $2 = title of media, $3 = URL of download -cd /dl/${1} && if [ ! -d "${2}" ]; then mkdir "${2}"; fi && cd "${2}" && wget "${3}" +cd /var/download/${1} && if [ ! -d "${2}" ]; then mkdir "${2}"; fi && cd "${2}" && wget "${3}" diff --git a/compose.yml b/compose.yml index a190618..a34cd45 100755 --- a/compose.yml +++ b/compose.yml @@ -21,6 +21,7 @@ services: build: . volumes: - ./:/var/www + - ./var/download:/var/download command: php ./bin/console messenger:consume async -vvv --time-limit=3600 --limit=10 database: diff --git a/src/Torrentio/Action/Handler/GetTvShowOptionsHandler.php b/src/Torrentio/Action/Handler/GetTvShowOptionsHandler.php index e994ba8..6e72d78 100644 --- a/src/Torrentio/Action/Handler/GetTvShowOptionsHandler.php +++ b/src/Torrentio/Action/Handler/GetTvShowOptionsHandler.php @@ -3,12 +3,14 @@ namespace App\Torrentio\Action\Handler; use App\Tmdb\Tmdb; +use App\Torrentio\Action\Command\GetTvShowOptionsCommand; use App\Torrentio\Action\Result\GetTvShowOptionsResult; use App\Torrentio\Client\Torrentio; use OneToMany\RichBundle\Contract\CommandInterface; use OneToMany\RichBundle\Contract\HandlerInterface; use OneToMany\RichBundle\Contract\ResultInterface; +/** @implements HandlerInterface */ class GetTvShowOptionsHandler implements HandlerInterface { public function __construct( diff --git a/templates/search/result.html.twig b/templates/search/result.html.twig index d95acaa..ddb923d 100644 --- a/templates/search/result.html.twig +++ b/templates/search/result.html.twig @@ -27,7 +27,7 @@ {{ include('search/partial/filter.html.twig') }} {% if "movies" == results.media.mediaType %} -
+
{% elseif "tvshows" == results.media.mediaType %} {% for season, episodes in results.media.episodes %} @@ -35,7 +35,9 @@ {% for episode in episodes %}
-