We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 106fe78 commit 6b4ae43Copy full SHA for 6b4ae43
lib/Tmdb/Factory/TvFactory.php
@@ -154,6 +154,19 @@ public function create(array $data = [])
154
$tvShow->setGenres($this->getGenreFactory()->createCollection($data['genres']));
155
}
156
157
+ /** Genres */
158
+ if (array_key_exists('genre_ids', $data)) {
159
+ $formattedData = [];
160
+
161
+ foreach ($data['genre_ids'] as $genreId) {
162
+ $formattedData[] = [
163
+ 'id' => $genreId
164
+ ];
165
+ }
166
167
+ $tvShow->setGenres($this->getGenreFactory()->createCollection($formattedData));
168
169
170
/** Images */
171
if (array_key_exists('images', $data) && $data['images'] !== null) {
172
$tvShow->setImages(
0 commit comments