Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mythos committed Feb 5, 2022
2 parents fbc012f + 0faedab commit 6ee382d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.3 (2022-02-05)

- Applied fixes from 2.0.2 to update button

## 2.0.2 (2022-02-05)

- Fix volume creation when number is not set
Expand Down
7 changes: 5 additions & 2 deletions app/Http/Livewire/Series/ShowSeries.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ public function update():void
$this->series->status = 0;
}
}
if (!empty($result['sources'])) {

if (!empty($result['status']) && $result['status'] == 2) {
$this->series->total = $result['numVolumes'];
} elseif (!empty($result['sources'])) {
$sourceId = $result['sources'][0]['id'];
$sourceResponse = Http::get('https://api.manga-passion.de/sources/' . $sourceId);
if ($sourceResponse->successful()) {
Expand Down Expand Up @@ -198,7 +201,7 @@ private function createVolumes(): void
$volume = new Volume([
'series_id' => $this->series->id,
'isbn' => Isbn::of($volumeResult['isbn13'])->to13(),
'number' => $volumeResult['number'],
'number' => $volumeResult['number'] ?? 1,
'publish_date' => !empty($publish_date) ? $publish_date->format('Y-m-d') : null,
'price' => !empty($volumeResult['price']) ? floatval($volumeResult['price']) / 100.0 : 0,
'status' => $this->series->subscription_active,
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
| Current application version.
|
*/
'version' => env('APP_VERSION', '2.0.2'),
'version' => env('APP_VERSION', '2.0.3'),

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 6ee382d

Please sign in to comment.