mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 13:07:59 +01:00
Improved release date parsing and error display on the upload screen.
This commit is contained in:
parent
5a063e32c3
commit
fee58d0055
2 changed files with 11 additions and 2 deletions
|
@ -334,6 +334,15 @@ class ParseTrackTagsCommand extends CommandBase
|
||||||
$trackNumber = $trackNumberComponents[0];
|
$trackNumber = $trackNumberComponents[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($tags['release_date'])) {
|
||||||
|
$releaseDate = $this->parseDateString($tags['release_date'][0]);
|
||||||
|
|
||||||
|
} elseif (isset($tags['creation_date'])) {
|
||||||
|
$releaseDate = $this->parseDateString($tags['creation_date'][0]);
|
||||||
|
} else {
|
||||||
|
$releaseDate = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
[
|
[
|
||||||
'title' => isset($tags['title']) ? $tags['title'][0] : null,
|
'title' => isset($tags['title']) ? $tags['title'][0] : null,
|
||||||
|
@ -344,7 +353,7 @@ class ParseTrackTagsCommand extends CommandBase
|
||||||
'track_number' => $trackNumber,
|
'track_number' => $trackNumber,
|
||||||
'album' => isset($tags['album']) ? $tags['album'][0] : null,
|
'album' => isset($tags['album']) ? $tags['album'][0] : null,
|
||||||
'year' => isset($tags['year']) ? (int) $tags['year'][0] : null,
|
'year' => isset($tags['year']) ? (int) $tags['year'][0] : null,
|
||||||
'release_date' => isset($tags['release_date']) ? $this->parseDateString($tags['release_date'][0]) : null,
|
'release_date' => $releaseDate,
|
||||||
'comments' => isset($tags['comments']) ? $tags['comments'][0] : null,
|
'comments' => isset($tags['comments']) ? $tags['comments'][0] : null,
|
||||||
'lyrics' => isset($tags['lyrics']) ? $tags['lyrics'][0] : null,
|
'lyrics' => isset($tags['lyrics']) ? $tags['lyrics'][0] : null,
|
||||||
],
|
],
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<p>Contact <a href="mailto:feld0@pony.fm">feld0@pony.fm</a> if you run into any issues!</p>
|
<p>Contact <a href="mailto:feld0@pony.fm">feld0@pony.fm</a> if you run into any issues!</p>
|
||||||
|
|
||||||
<ul class="uploads">
|
<ul class="uploads">
|
||||||
<li ng-repeat="upload in data.queue track by $index" ng-class="{'uploading': upload.isUploading, 'has-error': upload.error != null, 'is-processing': upload.isProcessing || upload.progress >= 100}" ng-animate="'upload-queue'">
|
<li ng-repeat="upload in data.queue track by $index" ng-class="{'uploading': upload.isUploading, 'has-error': upload.error != null, 'is-processing': upload.isProcessing || (upload.progress >= 100 && upload.error == null)}" ng-animate="'upload-queue'">
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
<span ng-show="!upload.success">
|
<span ng-show="!upload.success">
|
||||||
|
|
Loading…
Reference in a new issue