summaryrefslogtreecommitdiff
path: root/src/com/p4square/grow/model/Playlist.java
diff options
context:
space:
mode:
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);
}