@@ 128-130 (lines=3) @@ | ||
125 | ->setSourceId($this->source->getId()); |
|
126 | ||
127 | $durationMS = trim($row[$this->fieldLookup[self::INPUT_FIELD_DURATION_MMSS]]); |
|
128 | if ($durationMS && preg_match('/^\s*(\d+):(\d+)\s*$/', $durationMS, $matches)) { |
|
129 | $song->setDuration(($matches[1] * 60) + $matches[2]); |
|
130 | } |
|
131 | ||
132 | $this->dataStore->storeSong($song); // need id below |
|
133 |
@@ 133-135 (lines=3) @@ | ||
130 | ->setTitle($row[$this->fieldLookup[self::INPUT_FIELD_TITLE]]); |
|
131 | ||
132 | $durationMS = trim($row[$this->fieldLookup[self::INPUT_FIELD_DURATION_MMSS]]); |
|
133 | if ($durationMS && preg_match('/^\s*(\d+):(\d+)\s*$/', $durationMS, $matches)) { |
|
134 | $song->setDuration(($matches[1] * 60) + $matches[2]); |
|
135 | } |
|
136 | ||
137 | $sourceName = trim($row[$this->fieldLookup[self::INPUT_FIELD_SOURCE]]); |
|
138 | if ($sourceName) { |