@@ 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) { |
@@ 123-125 (lines=3) @@ | ||
120 | ->setSourceId($this->source->getId()); |
|
121 | ||
122 | $durationMS = trim($row[$this->fieldLookup[self::INPUT_FIELD_DURATION_MMSS]]); |
|
123 | if ($durationMS && preg_match('/^\s*(\d+):(\d+)\s*$/', $durationMS, $matches)) { |
|
124 | $song->setDuration(($matches[1] * 60) + $matches[2]); |
|
125 | } |
|
126 | ||
127 | $this->dataStore->storeSong($song); // need id below |
|
128 |