Skip to content

Commit

Permalink
fixed duration in track form
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMan committed Mar 2, 2024
1 parent 4932f18 commit d7d8b58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1346,13 +1346,13 @@ private function trackForm() {
$tracks = Engine::api(ILibrary::class)->search($isCollection?ILibrary::COLL_KEY:ILibrary::TRACK_KEY, 0, 2000, $_REQUEST["seltag"]);
foreach($tracks as $row) {
$this->emitHidden("track".$row["seq"], $row["track"]);
$this->emitHidden("trackDuration".$row["seq"], $row["url"]);
$this->emitHidden("trackUrl".$row["seq"], $row["url"]);
$_POST["track".$row["seq"]] = $row["track"];
$duration = $row["duration"];
if($duration)
$duration = preg_replace("/^0(0:0?)?/", "", $duration);
$this->emitHidden("trackDuration".$row["seq"], $duration);
$_POST["trackDuration".$row["seq"]] = $duration;
$this->emitHidden("trackUrl".$row["seq"], $row["url"]);
$_POST["trackUrl".$row["seq"]] = $row["url"];
if($isCollection) {
$this->emitHidden("artist" . $row["seq"], $row["artist"]);
Expand Down

0 comments on commit d7d8b58

Please sign in to comment.