Skip to content

A self-hosted media server and file management system

feat: remove poster_url from metadata edit requests

aminnausin3f9a3ce7fbce
diff --git a/app/Http/Requests/MetadataStoreRequest.php b/app/Http/Requests/MetadataStoreRequest.php
index 4cc9e3db..bdd53bc4 100644
--- a/app/Http/Requests/MetadataStoreRequest.php
+++ b/app/Http/Requests/MetadataStoreRequest.php
@@ -14,15 +14,6 @@ class MetadataStoreRequest extends FormRequest {
return Auth::check();
}
- /**
- * Prepare the data for validation.
- */
- protected function prepareForValidation() {
- if ($this->has('poster_url')) {
- $this->merge(['poster_url' => str_replace(' ', '%20', $this->input('poster_url'))]);
- }
- }
-
/**
* Get the validation rules that apply to the request.
*
diff --git a/app/Http/Requests/MetadataUpdateRequest.php b/app/Http/Requests/MetadataUpdateRequest.php
index e7a2ff80..daf3f0a3 100644
--- a/app/Http/Requests/MetadataUpdateRequest.php
+++ b/app/Http/Requests/MetadataUpdateRequest.php
@@ -14,21 +14,6 @@ class MetadataUpdateRequest extends FormRequest {
return Auth::check();
}
- /**
- * Prepare the data for validation.
- */
- protected function prepareForValidation() {
- if ($this->has('poster_url')) {
- $this->merge(['poster_url' => str_replace(' ', '%20', $this->input('poster_url'))]); // TODO: supposedly invalid
- }
-
- /**
- * Supposed Fix: if ($this->filled('poster_url')) { $this->merge([ 'poster_url' => filter_var($this->poster_url, FILTER_SANITIZE_URL), ]); }
- *
- * (Issue has not come up yet so complete this later)
- */
- }
-
/**
* Get the validation rules that apply to the request.
*
diff --git a/app/Support/MetadataRules.php b/app/Support/MetadataRules.php
index c5e2edb8..2cd3a8c1 100644
--- a/app/Support/MetadataRules.php
+++ b/app/Support/MetadataRules.php
@@ -12,7 +12,6 @@ class MetadataRules {
'album' => 'nullable|max:255',
'episode' => RequestPresets::NON_NEGATIVE_INT,
'season' => RequestPresets::NON_NEGATIVE_INT,
- 'poster_url' => 'nullable|url',
'released_at' => 'nullable|date|date_format:Y-m-d',
'tags' => 'nullable|max:128',
'intro_start' => 'nullable|min:0',