summaryrefslogtreecommitdiff
path: root/src/com/p4square/grow/model/Playlist.java
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2015-05-12 07:26:22 -0700
committerJesse Morgan <jesse@jesterpm.net>2015-05-12 07:26:22 -0700
commitb5ad47d5b77bfc023b9d3d466f9fd9ed2c29a452 (patch)
treef7409dd2e286bc5aac64b52d69cc1a11fb608e2a /src/com/p4square/grow/model/Playlist.java
parentd4e0c770e3a79e5f36ce974f3ed4dd4834639f4f (diff)
Adding tests for TrainingRecordResource.
Diffstat (limited to 'src/com/p4square/grow/model/Playlist.java')
-rw-r--r--src/com/p4square/grow/model/Playlist.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/p4square/grow/model/Playlist.java b/src/com/p4square/grow/model/Playlist.java
index b697e66..3e77ada 100644
--- a/src/com/p4square/grow/model/Playlist.java
+++ b/src/com/p4square/grow/model/Playlist.java
@@ -86,7 +86,7 @@ public class Playlist {
Chapter chapter = mPlaylist.get(chapterId);
if (chapter == null) {
- chapter = new Chapter();
+ chapter = new Chapter(chapterId);
mPlaylist.put(chapterId, chapter);
}
@@ -102,6 +102,7 @@ public class Playlist {
*/
@JsonAnySetter
public void addChapter(String chapterId, Chapter chapter) {
+ chapter.setName(chapterId);
mPlaylist.put(chapterId, chapter);
}
@@ -158,7 +159,7 @@ public class Playlist {
if (myChapter == null) {
// Add new chapter
- myChapter = new Chapter();
+ myChapter = new Chapter(chapterName);
addChapter(chapterName, myChapter);
}