diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2014-01-30 20:16:05 -0800 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2014-01-30 20:37:54 -0800 |
commit | bbf247245f5395b98d15def3e689a7e804010212 (patch) | |
tree | dc724754257fb95a6f3efe97b266af7e9f178c6c | |
parent | e38de23db148ffb47bd5f076764ebbd5f2a35812 (diff) |
Updating Videos and Script.20140130a
Video numbers may now be decimals (i.e. 5.1, 5.2). If the number is 0 it
is not displayed on the website.
Updating the videos-from-csv.py script to distinguish between user
facing video numbers and video ids.
Also updating urls for many videos.
38 files changed, 118 insertions, 97 deletions
diff --git a/devfiles/scripts/videos-from-csv.py b/devfiles/scripts/videos-from-csv.py index c1899b7..e9718d8 100755 --- a/devfiles/scripts/videos-from-csv.py +++ b/devfiles/scripts/videos-from-csv.py @@ -9,7 +9,18 @@ from string import Template #BASE_URL="http://foursquaregrow.s3-website-us-east-1.amazonaws.com/" BASE_URL="http://d12xq7pqelpwt.cloudfront.net/" -def mkjson(chapter, number, title, length, image, pdf, videos): +""" +Create the json file for a particular video. The fields are: + chapter: The chapter (i.e. Seeker, Believer, etc) + videoNumber: The number of the video in the chapter, starting with 1 + number: The video number to display to the user. 0 to hide number. + title: The video title. + length: The video length in seconds. + image: The url of the image to display. + pdf: The url of the outline pdf. + videos: A dictionary of mime type to video urls +""" +def mkjson(chapter, videoNumber, number, title, length, image, pdf, videos): vtemplate = Template("""{ "id": "$id", "number": "$number", @@ -30,9 +41,9 @@ def mkjson(chapter, number, title, length, image, pdf, videos): pass else: raise - filename = string.lower(directory + "/" + chapter + "-" + number + ".json") + filename = string.lower(directory + "/" + chapter + "-" + str(videoNumber) + ".json") with open(filename, 'w') as outfile: - outfile.write(vtemplate.substitute(dict(id=string.lower(chapter+"-"+number), + outfile.write(vtemplate.substitute(dict(id=string.lower(chapter+"-"+str(videoNumber)), chapter=chapter, number=number, title=title, length=length, image=BASE_URL + urllib.quote(image), pdf=BASE_URL + urllib.quote(pdf)))) @@ -47,6 +58,8 @@ def mkjson(chapter, number, title, length, image, pdf, videos): filename = sys.argv[1]; with open(filename, 'rb') as csvfile: + videoNumbers = dict() + reader = csv.reader(csvfile) for row in reader: chapter = row[0] @@ -58,7 +71,15 @@ with open(filename, 'rb') as csvfile: h264 = row[6] webm = row[7] + # Number the videos in the chapter starting with 1 + videoNumber = 1 + if chapter in videoNumbers: + videoNumber = videoNumbers[chapter] + + # Update the number for the next video + videoNumbers[chapter] = videoNumber + 1 + videos = { "video/mp4": h264, "video/webm": webm } - mkjson(chapter, number, title, length, image, pdf, videos) + mkjson(chapter, videoNumber, number, title, length, image, pdf, videos) diff --git a/devfiles/videos/believer/believer-1.json b/devfiles/videos/believer/believer-1.json index 6a2e2ca..17797c9 100644 --- a/devfiles/videos/believer/believer-1.json +++ b/devfiles/videos/believer/believer-1.json @@ -1,10 +1,10 @@ { "id": "believer-1", - "number": "1", + "number": "0", "title": "Intro", "length": 460, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%201%20-%20Intro.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%201%20-%20Intro.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%201%20-%20Intro-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%201%20-%20Intro.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-1-intro.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-1-intro.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-10.json b/devfiles/videos/believer/believer-10.json index 779effc..151bd43 100644 --- a/devfiles/videos/believer/believer-10.json +++ b/devfiles/videos/believer/believer-10.json @@ -1,10 +1,10 @@ { "id": "believer-10", - "number": "10", + "number": "8", "title": "Resurrection", "length": 529, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%2010%20-%20Resurrection.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%2010%20-%20Resurrection.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%2010%20-%20Resurrection-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%2010%20-%20Resurrection.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-10-resurrection.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-10-resurrection.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-2.json b/devfiles/videos/believer/believer-2.json index 00592cf..4fb9c2e 100644 --- a/devfiles/videos/believer/believer-2.json +++ b/devfiles/videos/believer/believer-2.json @@ -1,10 +1,10 @@ { "id": "believer-2", - "number": "2", + "number": "1", "title": "The Bible", "length": 386, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%202%20-%20The%20Bible.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%202%20-%20The%20Bible.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%202%20-%20The%20Bible-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%202%20-%20The%20Bible.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-2-the-bible.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-2-the-bible.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-3.json b/devfiles/videos/believer/believer-3.json index df8009f..f4d32bc 100644 --- a/devfiles/videos/believer/believer-3.json +++ b/devfiles/videos/believer/believer-3.json @@ -1,10 +1,10 @@ { "id": "believer-3", - "number": "3", + "number": "2", "title": "The Trinity", "length": 364, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%203%20-%20The%20Trinity.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%203%20-%20The%20Trinity.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%203%20-%20The%20Trinity-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%203%20-%20The%20Trinity.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-3-the-trinity.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-3-the-trinity.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-4.json b/devfiles/videos/believer/believer-4.json index 1378f2e..ff82e7f 100644 --- a/devfiles/videos/believer/believer-4.json +++ b/devfiles/videos/believer/believer-4.json @@ -1,10 +1,10 @@ { "id": "believer-4", - "number": "4", + "number": "3", "title": "Created Beings", "length": 360, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%204%20-%20Created%20Beings.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%204%20-%20Created%20Beings.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%204%20-%20Created%20Beings-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%204%20-%20Created%20Beings.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-4-created-beings.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-4-created-beings.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-5.json b/devfiles/videos/believer/believer-5.json index 628ee86..33c70d3 100644 --- a/devfiles/videos/believer/believer-5.json +++ b/devfiles/videos/believer/believer-5.json @@ -1,10 +1,10 @@ { "id": "believer-5", - "number": "5", + "number": "4", "title": "God Becomes Man", "length": 797, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%205%20-%20God%20Becomes%20Man.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%205%20-%20God%20Becomes%20Man.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%205%20-%20God%20Becomes%20Man-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%205%20-%20God%20Becomes%20Man.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-5-god-becomes-man.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-5-god-becomes-man.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-6.json b/devfiles/videos/believer/believer-6.json index cb9e699..4cd7015 100644 --- a/devfiles/videos/believer/believer-6.json +++ b/devfiles/videos/believer/believer-6.json @@ -1,6 +1,6 @@ { "id": "believer-6", - "number": "6", + "number": "5.1", "title": "The Church Part 1", "length": 405, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%206%20-%20The%20Church%20Part%201.png", diff --git a/devfiles/videos/believer/believer-7.json b/devfiles/videos/believer/believer-7.json index 8d039fb..a46fe93 100644 --- a/devfiles/videos/believer/believer-7.json +++ b/devfiles/videos/believer/believer-7.json @@ -1,10 +1,10 @@ { "id": "believer-7", - "number": "7", + "number": "5.2", "title": "The Church Part 2", "length": 573, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%207%20-%20The%20Church%20Part%202.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%207%20-%20The%20Church%20Part%202.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%207%20-%20The%20Church%20Part%202-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%207%20-%20The%20Church%20Part%202.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-7-the-church-part-2.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-7-the-church-part-2.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-8.json b/devfiles/videos/believer/believer-8.json index abe4ded..102d95c 100644 --- a/devfiles/videos/believer/believer-8.json +++ b/devfiles/videos/believer/believer-8.json @@ -1,10 +1,10 @@ { "id": "believer-8", - "number": "8", + "number": "6", "title": "The Spirit", "length": 513, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%208%20The%20Spirit.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%208%20The%20Spirit.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%208%20The%20Spirit-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%208The%20Spirit.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-8-the-spirit.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-8-the-spirit.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/believer/believer-9.json b/devfiles/videos/believer/believer-9.json index d44b16a..e2ac040 100644 --- a/devfiles/videos/believer/believer-9.json +++ b/devfiles/videos/believer/believer-9.json @@ -1,10 +1,10 @@ { "id": "believer-9", - "number": "9", + "number": "7", "title": "Second Coming", "length": 478, "image": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%209%20-%20Second%20Coming.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%209%20-%20Second%20Coming.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%209%20-%20Second%20Coming-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Believer%20Video%209%20-%20Second%20Comming.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-9-second-comming.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/believer-video-9-second-comming.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-1.json b/devfiles/videos/disciple/disciple-1.json index e32441e..d0c1973 100644 --- a/devfiles/videos/disciple/disciple-1.json +++ b/devfiles/videos/disciple/disciple-1.json @@ -1,6 +1,6 @@ { "id": "disciple-1", - "number": "1", + "number": "0", "title": "Intro", "length": 344, "image": "http://d12xq7pqelpwt.cloudfront.net/Discipleship%20Video%201%20-%20Intro.png", diff --git a/devfiles/videos/disciple/disciple-10.json b/devfiles/videos/disciple/disciple-10.json index b65ef27..d2beffe 100644 --- a/devfiles/videos/disciple/disciple-10.json +++ b/devfiles/videos/disciple/disciple-10.json @@ -1,10 +1,10 @@ { "id": "disciple-10", - "number": "10", + "number": "9", "title": "Conclusion", "length": 405, "image": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%2010%20-%20Conclusion.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%2010%20-%20Conclusion.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%2010%20-%20Conclusion-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%2010%20-%20Conclusion.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-10-conclusion.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-10-conclusion.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-2.json b/devfiles/videos/disciple/disciple-2.json index 4defa16..f2471f2 100644 --- a/devfiles/videos/disciple/disciple-2.json +++ b/devfiles/videos/disciple/disciple-2.json @@ -1,10 +1,10 @@ { "id": "disciple-2", - "number": "2", + "number": "1", "title": "Life Of A Disciple", "length": 551, "image": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%202%20-%20Life%20Of%20A%20Disciple.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%202%20-%20Life%20Of%20A%20Disciple.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%202%20-%20Life%20Of%20A%20Disciple-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%202%20-%20Life%20of%20a%20Disciple.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-2-life-of-a-disciple.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-2-life-of-a-disciple.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-3.json b/devfiles/videos/disciple/disciple-3.json index aaddd7e..22aeace 100644 --- a/devfiles/videos/disciple/disciple-3.json +++ b/devfiles/videos/disciple/disciple-3.json @@ -1,10 +1,10 @@ { "id": "disciple-3", - "number": "3", + "number": "2", "title": "The Word", "length": 438, "image": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%203%20-%20The%20Word.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%203%20-%20The%20Word.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%203%20-%20The%20Word-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%203%20-%20The%20Word.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-3-the-word.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-3-the-word.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-4.json b/devfiles/videos/disciple/disciple-4.json index 9ac3f69..050b1aa 100644 --- a/devfiles/videos/disciple/disciple-4.json +++ b/devfiles/videos/disciple/disciple-4.json @@ -1,10 +1,10 @@ { "id": "disciple-4", - "number": "4", + "number": "3", "title": "Prayer", "length": 682, "image": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%204%20-%20Prayer.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%204%20-%20Prayer.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%204%20-%20Prayer-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%204%20-%20Prayer.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-4-prayer.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-4-prayer.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-5.json b/devfiles/videos/disciple/disciple-5.json index e5b13a4..be1f0a1 100644 --- a/devfiles/videos/disciple/disciple-5.json +++ b/devfiles/videos/disciple/disciple-5.json @@ -1,10 +1,10 @@ { "id": "disciple-5", - "number": "5", + "number": "4", "title": "Fasting", "length": 511, "image": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%205%20-%20Fasting.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%205%20-%20Fasting.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%205%20-%20Fasting-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%205%20-%20Fasting.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-5-fasting.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-5-fasting.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-6.json b/devfiles/videos/disciple/disciple-6.json index 98cae9e..12c9ed7 100644 --- a/devfiles/videos/disciple/disciple-6.json +++ b/devfiles/videos/disciple/disciple-6.json @@ -1,10 +1,10 @@ { "id": "disciple-6", - "number": "6", + "number": "5", "title": "Worship", "length": 701, "image": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%206%20-%20Worship.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%206%20-%20Worship.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%206%20-%20Worship-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%206%20-%20Worship.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-6-worship.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-6-worship.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-7.json b/devfiles/videos/disciple/disciple-7.json index 433524a..483ce1c 100644 --- a/devfiles/videos/disciple/disciple-7.json +++ b/devfiles/videos/disciple/disciple-7.json @@ -1,10 +1,10 @@ { "id": "disciple-7", - "number": "7", + "number": "6", "title": "Solitude", "length": 470, "image": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%207%20-%20Solitude.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%207%20-%20Solitude.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%207%20-%20Solitude-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%207%20-%20Solitude.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-7-solitude.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-7-solitude.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-8.json b/devfiles/videos/disciple/disciple-8.json index 4f9eaed..1be9338 100644 --- a/devfiles/videos/disciple/disciple-8.json +++ b/devfiles/videos/disciple/disciple-8.json @@ -1,10 +1,10 @@ { "id": "disciple-8", - "number": "8", + "number": "7", "title": "Stewardship", "length": 163, "image": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%208%20-%20Stewardship.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%208%20-%20Stewardship.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%208%20-%20Stewardship-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%208%20-%20Stewardship.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-8-stewardship.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-8-stewardship.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/disciple/disciple-9.json b/devfiles/videos/disciple/disciple-9.json index c2eef86..e651097 100644 --- a/devfiles/videos/disciple/disciple-9.json +++ b/devfiles/videos/disciple/disciple-9.json @@ -1,10 +1,10 @@ { "id": "disciple-9", - "number": "9", + "number": "8", "title": "Evangelism", "length": 490, "image": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%209%20-%20Evangelism.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%209%20-%20Evangelism.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%209%20-%20Evangelism-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Disciple%20Video%209%20-%20Evangelism.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-9-evangelism.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/disciple-video-9-evangelism.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/introduction/introduction-1.json b/devfiles/videos/introduction/introduction-1.json index 5d04930..a0f8421 100644 --- a/devfiles/videos/introduction/introduction-1.json +++ b/devfiles/videos/introduction/introduction-1.json @@ -1,6 +1,6 @@ { "id": "introduction-1", - "number": "1", + "number": "0", "title": "Introduction", "length": 140, "image": "http://d12xq7pqelpwt.cloudfront.net/Grow%20-%20Introduction.png", diff --git a/devfiles/videos/leader/leader-1.json b/devfiles/videos/leader/leader-1.json index c145db2..1a68edf 100644 --- a/devfiles/videos/leader/leader-1.json +++ b/devfiles/videos/leader/leader-1.json @@ -5,6 +5,6 @@ "length": 423, "image": "http://d12xq7pqelpwt.cloudfront.net/Group%20Leader%20Video%201%20-%20Purpose.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Group%20Leader%20Video%201%20-%20Purpose%20Final.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Group%20Leader%20Video%201%20-%20Purpose-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Group%20Leader%20Video%201%20-%20Purpose.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/group-leader-video-1-purpose.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/group-leader-video-1-purpose.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/leader/leader-3.json b/devfiles/videos/leader/leader-3.json index 59ad0fe..3a45ac6 100644 --- a/devfiles/videos/leader/leader-3.json +++ b/devfiles/videos/leader/leader-3.json @@ -5,6 +5,6 @@ "length": 616, "image": "http://d12xq7pqelpwt.cloudfront.net/Group%20Leader%20Video%203%20-%20Qualifications.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Group%20Leader%20Video%203%20-%20Qualifications.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Group%20Leader%20Video%203%20-%20Qualifications-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Group%20Leader%20Video%203%20-%20Qualifications.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/group-leader-video-3-qualifications.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/group-leader-video-3-qualifications.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/seeker/seeker-1.json b/devfiles/videos/seeker/seeker-1.json index fdd9859..5c99e54 100644 --- a/devfiles/videos/seeker/seeker-1.json +++ b/devfiles/videos/seeker/seeker-1.json @@ -1,6 +1,6 @@ { "id": "seeker-1", - "number": "1", + "number": "0", "title": "Introduction", "length": 395, "image": "http://d12xq7pqelpwt.cloudfront.net/Video%201%20-%20Introduction%20Final.png", diff --git a/devfiles/videos/seeker/seeker-2.json b/devfiles/videos/seeker/seeker-2.json index b5da8f0..275aa1e 100644 --- a/devfiles/videos/seeker/seeker-2.json +++ b/devfiles/videos/seeker/seeker-2.json @@ -1,6 +1,6 @@ { "id": "seeker-2", - "number": "2", + "number": "1", "title": "Our Condition", "length": 612, "image": "http://d12xq7pqelpwt.cloudfront.net/Video%202%20-%20Our%20Condition.png", diff --git a/devfiles/videos/seeker/seeker-3.json b/devfiles/videos/seeker/seeker-3.json index fb2e1a8..b779786 100644 --- a/devfiles/videos/seeker/seeker-3.json +++ b/devfiles/videos/seeker/seeker-3.json @@ -1,10 +1,10 @@ { "id": "seeker-3", - "number": "3", + "number": "2", "title": "God Searches", "length": 399, "image": "http://d12xq7pqelpwt.cloudfront.net/Video%203%20-%20God%20Searches.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Video%203%20-%20God%20Searches.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Video%203%20-%20God%20Searches-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Video%203%20-%20God%20Searches.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/video-3-god-searches.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/video-3-god-searches.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/seeker/seeker-4.json b/devfiles/videos/seeker/seeker-4.json index 7b262a5..364f06d 100644 --- a/devfiles/videos/seeker/seeker-4.json +++ b/devfiles/videos/seeker/seeker-4.json @@ -1,10 +1,10 @@ { "id": "seeker-4", - "number": "4", + "number": "3", "title": "The Cross", "length": 289, "image": "http://d12xq7pqelpwt.cloudfront.net/Video%204%20-%20The%20Cross.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Video%204%20-%20The%20Cross.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Video%204%20-%20The%20Cross-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Video%204%20-%20The%20Cross.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/video-4-the-cross.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/video-4-the-cross.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/seeker/seeker-5.json b/devfiles/videos/seeker/seeker-5.json index a631e72..daba57e 100644 --- a/devfiles/videos/seeker/seeker-5.json +++ b/devfiles/videos/seeker/seeker-5.json @@ -1,10 +1,10 @@ { "id": "seeker-5", - "number": "5", + "number": "4", "title": "Our Response", "length": 469, "image": "http://d12xq7pqelpwt.cloudfront.net/Video%205%20-%20Our%20Response.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Video%205%20-%20Our%20Response.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Video%205%20-%20Our%20Response-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Video%205%20-%20Our%20Response.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/video-5-our-response.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/video-5-our-response.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-1.json b/devfiles/videos/teacher/teacher-1.json index cd356f3..e02883e 100644 --- a/devfiles/videos/teacher/teacher-1.json +++ b/devfiles/videos/teacher/teacher-1.json @@ -1,6 +1,6 @@ { "id": "teacher-1", - "number": "1", + "number": "0", "title": "Intro", "length": 182, "image": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%201%20-%20Intro.png", diff --git a/devfiles/videos/teacher/teacher-2.json b/devfiles/videos/teacher/teacher-2.json index 5330361..5fd8db9 100644 --- a/devfiles/videos/teacher/teacher-2.json +++ b/devfiles/videos/teacher/teacher-2.json @@ -1,10 +1,10 @@ { "id": "teacher-2", - "number": "2", + "number": "1", "title": "Biblical Expectations", "length": 481, "image": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%202%20-%20Biblical%20Expectations.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%202%20-%20Biblical%20Expectations.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%202%20-%20Biblical%20Expectations-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%202%20-%20Biblical%20Expectations.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-2-biblical-expectations.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-2-biblical-expectations.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-3.json b/devfiles/videos/teacher/teacher-3.json index 9b8a85b..7777e7b 100644 --- a/devfiles/videos/teacher/teacher-3.json +++ b/devfiles/videos/teacher/teacher-3.json @@ -1,10 +1,10 @@ { "id": "teacher-3", - "number": "3", + "number": "2", "title": "Foursquare Expectations", "length": 342, "image": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%203%20-%20Foursquare%20Expectations.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%203%20-%20Foursquare%20Expectations.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%203%20-%20Foursquare%20Expectations-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%203%20-%20Foursquare%20Expectations.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-3-foursquare-expectations.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-3-foursquare-expectations.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-4.json b/devfiles/videos/teacher/teacher-4.json index 194d59d..6e3cc2f 100644 --- a/devfiles/videos/teacher/teacher-4.json +++ b/devfiles/videos/teacher/teacher-4.json @@ -1,10 +1,10 @@ { "id": "teacher-4", - "number": "4", + "number": "3", "title": "Conforming to Doctrine", "length": 355, "image": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%204%20-%20Conforming%20to%20Doctrine.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%204%20-%20Conforming%20to%20Doctrine.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%204%20-%20Conforming%20to%20Doctrine-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%204%20-%20Conforming%20to%20Doctorine.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-4-conforming-to-doctorine.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-4-conforming-to-doctorine.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-5.json b/devfiles/videos/teacher/teacher-5.json index 28faddb..d8c0dc2 100644 --- a/devfiles/videos/teacher/teacher-5.json +++ b/devfiles/videos/teacher/teacher-5.json @@ -1,6 +1,6 @@ { "id": "teacher-5", - "number": "5", + "number": "4", "title": "Adhering to Mission & Values", "length": 222, "image": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%205%20-%20Adhering%20to%20Mission%20%26%20Values.png", diff --git a/devfiles/videos/teacher/teacher-6.json b/devfiles/videos/teacher/teacher-6.json index 767e1ea..caa191f 100644 --- a/devfiles/videos/teacher/teacher-6.json +++ b/devfiles/videos/teacher/teacher-6.json @@ -1,10 +1,10 @@ { "id": "teacher-6", - "number": "6", + "number": "5", "title": "Being a Disciple & Developing Others", "length": 722, "image": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%206%20-%20Being%20a%20Disciple%20%26%20Developing%20Others.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%206%20-%20Being%20a%20Disciple%20%26%20Developing%20Others.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%206%20-%20Being%20a%20Disciple%20%26%20Developing%20Others-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%206%20-%20Being%20a%20Disciple%20%26%20Developing%20Others.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-6-being-a-disciple-%26-developing-others.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-6-being-a-disciple-%26-developing-others.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/devfiles/videos/teacher/teacher-7.json b/devfiles/videos/teacher/teacher-7.json index c3f84a6..8d3ab23 100644 --- a/devfiles/videos/teacher/teacher-7.json +++ b/devfiles/videos/teacher/teacher-7.json @@ -1,10 +1,10 @@ { "id": "teacher-7", - "number": "7", + "number": "6", "title": "Prerequisites", "length": 535, "image": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%207%20-%20Prerequisites.png", "pdf": "http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%207%20-%20Prerequisites.pdf", - "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%207%20-%20Prerequisites-low.mp4", "type":"video/mp4"}, -{"src":"http://d12xq7pqelpwt.cloudfront.net/Teacher%20Video%207%20-%20Prerequisites.webmhd.webm", "type":"video/webm"}] + "urls": [{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-7-prerequisites.mp4", "type":"video/mp4"}, +{"src":"http://d12xq7pqelpwt.cloudfront.net/teacher-video-7-prerequisites.webmhd.webm", "type":"video/webm"}] }
\ No newline at end of file diff --git a/src/com/p4square/grow/frontend/TrainingPageResource.java b/src/com/p4square/grow/frontend/TrainingPageResource.java index 0706ead..2010ca3 100644 --- a/src/com/p4square/grow/frontend/TrainingPageResource.java +++ b/src/com/p4square/grow/frontend/TrainingPageResource.java @@ -58,10 +58,10 @@ public class TrainingPageResource extends FreeMarkerPageResource { return -1; } - int leftNumber = Integer.valueOf(leftNumberStr); - int rightNumber = Integer.valueOf(rightNumberStr); + double leftNumber = Double.valueOf(leftNumberStr); + double rightNumber = Double.valueOf(rightNumberStr); - return leftNumber - rightNumber; + return Double.compare(leftNumber, rightNumber); } }; diff --git a/src/templates/templates/training.ftl b/src/templates/templates/training.ftl index f40f4ce..3f5331e 100644 --- a/src/templates/templates/training.ftl +++ b/src/templates/templates/training.ftl @@ -37,7 +37,7 @@ <#list videos as video> <article> <div class="image <#if video.completed>completed</#if> <#if allowed>allowed</#if>" id="${video.id}"><a href="#" onclick="playVideo('${video.id}'); return false"><img src="${video.image!staticRoot+"/images/videoimage.jpg"}" alt="${video.title}" /></a></div> - <h2>${video.number}. ${video.title}</h2> + <h2><#if video.number != "0">${video.number}. </#if>${video.title}</h2> <span class="duration"><@hms seconds=video.length /></span> <#if (video.pdf!"") != ""> <span class="pdf"><a href="${video.pdf}" target="_blank">Outline</a></span> |