Merge lp:~nik90/cliffhanger/more-improvements into lp:~flashback-dev/cliffhanger/trunk

Proposed by Nekhelesh Ramananthan on 2013-11-14
Status: Rejected
Rejected by: Nekhelesh Ramananthan on 2013-11-16
Proposed branch: lp:~nik90/cliffhanger/more-improvements
Merge into: lp:~flashback-dev/cliffhanger/trunk
Diff against target: 839 lines (+336/-97)
18 files modified
Cliffhanger.qml (+11/-10)
backend/GenreList.js (+30/-0)
backend/GenreMovies.js (+43/-0)
backend/MovieDetails.js (+14/-2)
backend/NowPlayingMovie.js (+0/-32)
backend/PersonDetails.js (+18/-5)
backend/Search.js (+9/-8)
components/Grid.qml (+106/-0)
ui/home/HomeTab.qml (+1/-2)
ui/movie/MovieByGenre.qml (+70/-0)
ui/movie/MoviePage.qml (+16/-20)
ui/movie/MovieTab.qml (+4/-4)
ui/movie/SearchMovie.qml (+1/-1)
ui/person/PersonPage.qml (+7/-7)
ui/person/PersonTab.qml (+2/-2)
ui/person/SearchPerson.qml (+1/-1)
ui/tv/SearchTv.qml (+1/-1)
ui/tv/TvTab.qml (+2/-2)
To merge this branch: bzr merge lp:~nik90/cliffhanger/more-improvements
Reviewer Review Type Date Requested Status
Nekhelesh Ramananthan Disapprove on 2013-11-16
Review via email: mp+195262@code.launchpad.net

Commit message

- Added a generic grid view element
- Added ability to filter movies by genre
- Reorganised the UI folder
- Merged UpcomingMovie.js and NowPlaying.js files
- Added comments to improve code readibility

Description of the change

- Added a generic grid view element
- Added ability to filter movies by genre
- Reorganised the UI folder
- Merged UpcomingMovie.js and NowPlaying.js files
- Added comments to improve code readibility

To post a comment you must log in.
11. By Nekhelesh Ramananthan on 2013-11-14

small code cleanup

12. By Nekhelesh Ramananthan on 2013-11-14

Reorganized the UI folder

13. By Nekhelesh Ramananthan on 2013-11-14

Added comments to backend files and improved the poster url returned to carousel

14. By Nekhelesh Ramananthan on 2013-11-14

Merged UpcomingMovie.js and NowPlayingMovie.js files

15. By Nekhelesh Ramananthan on 2013-11-14

Simplified Search.js

Nekhelesh Ramananthan (nik90) wrote :

This work done in this MP is being split to smaller MP for convenience and clarity. Hence rejecting this MP.

review: Disapprove

Unmerged revisions

15. By Nekhelesh Ramananthan on 2013-11-14

Simplified Search.js

14. By Nekhelesh Ramananthan on 2013-11-14

Merged UpcomingMovie.js and NowPlayingMovie.js files

13. By Nekhelesh Ramananthan on 2013-11-14

Added comments to backend files and improved the poster url returned to carousel

12. By Nekhelesh Ramananthan on 2013-11-14

Reorganized the UI folder

11. By Nekhelesh Ramananthan on 2013-11-14

small code cleanup

10. By Nekhelesh Ramananthan on 2013-11-14

enabled all tabs again

9. By Nekhelesh Ramananthan on 2013-11-14

merge from trunk

8. By Nekhelesh Ramananthan on 2013-11-14

Added ability to filter movies by genre

7. By Nekhelesh Ramananthan on 2013-11-14

Added new component Grid

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Cliffhanger.qml'
2--- Cliffhanger.qml 2013-11-13 20:50:15 +0000
3+++ Cliffhanger.qml 2013-11-14 23:41:47 +0000
4@@ -1,8 +1,10 @@
5 import QtQuick 2.0
6 import Ubuntu.Components 0.1
7+import "ui/movie"
8+import "ui/tv"
9+import "ui/person"
10+import "ui/home"
11 import "ui"
12-import "graphics"
13-import "components"
14
15 MainView {
16 // objectName for functional testing purposes (autopilot-qt5)
17@@ -21,9 +23,7 @@
18 height: units.gu(75)
19
20 // TODO: This is a temporary app background. Final background color needs to be decided.
21- headerColor: UbuntuColors.coolGrey
22 backgroundColor: UbuntuColors.coolGrey
23- footerColor: UbuntuColors.coolGrey
24
25 PageStack {
26 id: pagestack
27@@ -34,15 +34,14 @@
28 id: root
29
30 // Moviedb App Properties
31- //readonly property string baseUrl: "http://api.themoviedb.org/3"
32- readonly property string baseUrl: "http://private-4b62-themoviedb.apiary.io/3"
33+ readonly property string baseUrl: "http://api.themoviedb.org/3"
34 readonly property string api_Key: "?api_key=d0a2929acb64b7c203071e87a621dfb3"
35
36 // Home Tab
37-// Tab {
38-// title: "Home"
39-// page: HomeTab {}
40-// }
41+ // Tab {
42+ // title: "Home"
43+ // page: HomeTab {}
44+ // }
45
46 // Movies tab
47 Tab {
48@@ -62,10 +61,12 @@
49 page: PersonTab {}
50 }
51
52+ // About Tab
53 Tab {
54 title: "About"
55 page: About {}
56 }
57+
58 }
59 }
60 }
61
62=== added file 'backend/GenreList.js'
63--- backend/GenreList.js 1970-01-01 00:00:00 +0000
64+++ backend/GenreList.js 2013-11-14 23:41:47 +0000
65@@ -0,0 +1,30 @@
66+WorkerScript.onMessage = function(message) {
67+ /*
68+ XML HTTP Request to retrieve the list of genres. The retrieved list is synced
69+ to a list model with the following structure,
70+ id -> Unique ID used by the API
71+ name -> Genre
72+ */
73+
74+ var XHR = new XMLHttpRequest();
75+
76+ XHR.open("GET", message.url);
77+ XHR.setRequestHeader("Accept", "application/json");
78+
79+ XHR.onreadystatechange = function() {
80+ if(XHR.readyState != XHR.DONE)
81+ return;
82+ if(XHR.status != 200)
83+ return;
84+
85+ var obj = JSON.parse(XHR.responseText);
86+
87+ for(var i=0; i<obj.genres.length; i++) {
88+ message.model.append({"name": obj.genres[i].name,
89+ "id": obj.genres[i].id});
90+ message.model.sync()
91+ }
92+ };
93+
94+ XHR.send();
95+}
96
97=== added file 'backend/GenreMovies.js'
98--- backend/GenreMovies.js 1970-01-01 00:00:00 +0000
99+++ backend/GenreMovies.js 2013-11-14 23:41:47 +0000
100@@ -0,0 +1,43 @@
101+WorkerScript.onMessage = function(message) {
102+ /*
103+ XML HTTP Request to retrieve the movies of a certain genre. The retrieved
104+ results are synced to a list model with the following structure.
105+ name -> Name of the movie
106+ thumb_url -> Movie poster thumbnail
107+ id -> Unique identification ID used by the API
108+ */
109+
110+ var XHR = new XMLHttpRequest();
111+ var thumb_url;
112+
113+ // Clear model of any data before syncing it with new data
114+ message.model.clear()
115+
116+ XHR.open("GET", message.url);
117+ XHR.setRequestHeader("Accept", "application/json");
118+
119+ XHR.onreadystatechange = function() {
120+ if(XHR.readyState != XHR.DONE)
121+ return;
122+ if(XHR.status != 200)
123+ return;
124+
125+ var obj = JSON.parse(XHR.responseText);
126+
127+ for(var i=0; i<obj.results.length; i++) {
128+
129+ // Ensuring that a valid URL is always sent.
130+ if (obj.results[i].poster_path == null)
131+ thumb_url = "../graphics/toolbarIcon.png"
132+ else
133+ thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.results[i].poster_path
134+
135+ message.model.append({"name": obj.results[i].title,
136+ "thumb_url": thumb_url,
137+ "id": obj.results[i].id});
138+ message.model.sync()
139+ }
140+ };
141+
142+ XHR.send();
143+}
144
145=== modified file 'backend/MovieDetails.js'
146--- backend/MovieDetails.js 2013-11-13 20:50:15 +0000
147+++ backend/MovieDetails.js 2013-11-14 23:41:47 +0000
148@@ -1,4 +1,7 @@
149 WorkerScript.onMessage = function(message) {
150+ /*
151+ XML HTTP Request to retrieve the details of a movie.
152+ */
153
154 var XHR = new XMLHttpRequest();
155 var thumb_url;
156@@ -14,6 +17,7 @@
157
158 var obj = JSON.parse(XHR.responseText);
159
160+ // Syncing the movie cast to the castModel
161 for(var i=0; i<obj.credits.cast.length; i++) {
162 if (obj.credits.cast[i].profile_path == null)
163 thumb_url = "null"
164@@ -27,6 +31,7 @@
165 message.castModel.sync()
166 }
167
168+ // Syncing the movie crew to the crewModel
169 for(var j=0; j<obj.credits.crew.length; j++) {
170 message.crewModel.append({"name": obj.credits.crew[j].name,
171 "id": obj.credits.crew[j].id,
172@@ -34,9 +39,10 @@
173 message.crewModel.sync()
174 }
175
176+ // Obtaining movies similar to the movie currently viewed
177 for(var i=0; i<obj.similar_movies.results.length; i++) {
178 if (obj.similar_movies.results[i].poster_path == null)
179- thumb_url = "null"
180+ thumb_url = "../graphics/toolbarIcon.png"
181 else
182 thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.similar_movies.results[i].poster_path
183
184@@ -46,7 +52,13 @@
185 message.similarMovieModel.sync()
186 }
187
188- WorkerScript.sendMessage({ 'poster': obj.poster_path,
189+ if(obj.poster_path == null)
190+ thumb_url = "../../graphics/toolbarIcon.png"
191+ else
192+ thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.poster_path
193+
194+ // Returning movie details such as poster path, title, description, genre, theme etc.
195+ WorkerScript.sendMessage({ 'poster': thumb_url,
196 "title": obj.original_title,
197 "description": obj.overview,
198 "runtime": obj.runtime,
199
200=== removed file 'backend/NowPlayingMovie.js'
201--- backend/NowPlayingMovie.js 2013-11-13 20:50:15 +0000
202+++ backend/NowPlayingMovie.js 1970-01-01 00:00:00 +0000
203@@ -1,32 +0,0 @@
204-WorkerScript.onMessage = function(message) {
205-
206- var XHR = new XMLHttpRequest();
207- var thumb_url;
208-
209- XHR.open("GET", message.url);
210- XHR.setRequestHeader("Accept", "application/json");
211-
212- XHR.onreadystatechange = function() {
213- if(XHR.readyState != XHR.DONE)
214- return;
215- if(XHR.status != 200)
216- return;
217-
218- var obj = JSON.parse(XHR.responseText);
219-
220- for(var i=0; i<obj.results.length; i++) {
221-
222- if (obj.results[i].poster_path == null)
223- thumb_url = "null"
224- else
225- thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.results[i].poster_path
226-
227- message.model.append({"name": obj.results[i].title,
228- "thumb_url": thumb_url,
229- "id": obj.results[i].id});
230- message.model.sync()
231- }
232- };
233-
234- XHR.send();
235-}
236
237=== modified file 'backend/PersonDetails.js'
238--- backend/PersonDetails.js 2013-11-13 21:28:13 +0000
239+++ backend/PersonDetails.js 2013-11-14 23:41:47 +0000
240@@ -37,11 +37,24 @@
241 }
242
243 for(i=0; i<obj.combined_credits.crew.length; i++) {
244- message.directedModel.append({"title": obj.combined_credits.crew[i].title,
245- "character": obj.combined_credits.crew[i].job,
246- "media_type": obj.combined_credits.cast[i].media_type,
247- "id": obj.combined_credits.crew[i].id,
248- "iconUrl": thumb_url});
249+ if (obj.combined_credits.crew[i].poster_path == null)
250+ thumb_url = "null"
251+ else
252+ thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.combined_credits.crew[i].poster_path
253+
254+
255+ if(obj.combined_credits.crew[i].media_type == "movie")
256+ message.directedModel.append({"title": obj.combined_credits.crew[i].title,
257+ "character": obj.combined_credits.crew[i].job,
258+ "media_type": obj.combined_credits.crew[i].media_type,
259+ "id": obj.combined_credits.crew[i].id,
260+ "iconUrl": thumb_url});
261+ else if(obj.combined_credits.crew[i].media_type == "tv")
262+ message.directedModel.append({"title": obj.combined_credits.crew[i].name,
263+ "character": obj.combined_credits.crew[i].job,
264+ "media_type": obj.combined_credits.crew[i].media_type,
265+ "id": obj.combined_credits.crew[i].id,
266+ "iconUrl": thumb_url});
267 message.directedModel.sync()
268 }
269
270
271=== modified file 'backend/Search.js'
272--- backend/Search.js 2013-11-13 20:50:15 +0000
273+++ backend/Search.js 2013-11-14 23:41:47 +0000
274@@ -2,6 +2,7 @@
275
276 var XHR = new XMLHttpRequest();
277 var thumb_url;
278+
279 message.model.clear()
280
281 XHR.open("GET", message.url);
282@@ -17,8 +18,8 @@
283
284 for(var i=0; i<obj.results.length; i++) {
285
286- if (message.type == "movie") {
287-
288+ switch(message.type) {
289+ case "movie":
290 if (obj.results[i].poster_path == null)
291 thumb_url = "null"
292 else
293@@ -27,10 +28,9 @@
294 message.model.append({"name": obj.results[i].title,
295 "id": obj.results[i].id,
296 "thumb_url": thumb_url});
297- }
298-
299- else if (message.type == "person"){
300-
301+ break;
302+
303+ case "person":
304 if (obj.results[i].profile_path == null)
305 thumb_url = "null"
306 else
307@@ -39,9 +39,9 @@
308 message.model.append({"name": obj.results[i].name,
309 "id": obj.results[i].id,
310 "thumb_url": thumb_url});
311- }
312+ break;
313
314- else if (message.type == "tv") {
315+ case "tv":
316 if (obj.results[i].poster_path == null)
317 thumb_url = "null"
318 else
319@@ -50,6 +50,7 @@
320 message.model.append({"name": obj.results[i].name,
321 "id": obj.results[i].id,
322 "thumb_url": thumb_url});
323+ break;
324 }
325
326 message.model.sync()
327
328=== renamed file 'backend/UpcomingMovie.js' => 'backend/TrendingMovie.js'
329=== added file 'components/Grid.qml'
330--- components/Grid.qml 1970-01-01 00:00:00 +0000
331+++ components/Grid.qml 2013-11-14 23:41:47 +0000
332@@ -0,0 +1,106 @@
333+import QtQuick 2.0
334+import Ubuntu.Components 0.1
335+import Ubuntu.Components.ListItems 0.1
336+
337+Item {
338+ id: grid
339+
340+ // Header Title
341+ property alias header: header.text
342+
343+ // Grid Data Model
344+ property alias dataModel: gridView.model
345+
346+ // Grid Thumbnail size
347+ property int size: units.gu(12)
348+
349+ // Signal triggered when a thumb
350+ signal thumbClicked(var model)
351+
352+ width: parent.width
353+
354+ Column {
355+ id: container
356+
357+ anchors.fill: parent
358+ spacing: units.gu(1)
359+
360+ Header {
361+ id: header
362+ text: "Default Header Title"
363+ visible: text != "Default Header Title"
364+ ActivityIndicator {
365+ running: dataModel.count === 0 ? true : false
366+ anchors.right: parent.right
367+ }
368+ }
369+
370+ Component {
371+ id: gridDelegate
372+ Item {
373+ id: thumbContainer
374+
375+ width: grid.size + units.gu(2)
376+ height: thumbColumn.height
377+
378+ Column {
379+ id: thumbColumn
380+ spacing: units.gu(0.5)
381+ anchors.fill: parent
382+
383+ // Widget to curve edges and encase the thumbnail
384+ UbuntuShape {
385+ id: gridThumb
386+
387+ width: grid.size
388+ height: grid.size + units.gu(5)
389+
390+ image: Image {
391+ source: thumb_url
392+ fillMode: Image.PreserveAspectFit
393+ smooth: true
394+ }
395+
396+ MouseArea {
397+ anchors.fill: parent
398+ onClicked: grid.thumbClicked(model)
399+ }
400+ }
401+
402+ // Label showing the movie/tv show name
403+ Label {
404+ id: gridThumbDescription
405+
406+ text: name
407+ maximumLineCount: 2
408+ elide: Text.ElideRight
409+ wrapMode: Text.WordWrap
410+ width: gridThumb.width
411+ horizontalAlignment: Text.AlignHCenter
412+
413+ MouseArea {
414+ anchors.fill: parent
415+ onClicked: grid.thumbClicked(model)
416+ }
417+ }
418+ }
419+ }
420+ }
421+
422+
423+ GridView {
424+ id: gridView
425+
426+ clip: true
427+ width: parent.width
428+ height: parent.height - header.height - parent.spacing
429+ snapMode: GridView.SnapToRow
430+
431+ cellHeight: grid.size + units.gu(12)
432+ cellWidth: grid.size + container.spacing
433+
434+ delegate: gridDelegate
435+ }
436+
437+ }
438+}
439
440=== added directory 'graphics/samples'
441=== added file 'graphics/samples/america.jpg'
442Binary files graphics/samples/america.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/america.jpg 2013-11-14 23:41:47 +0000 differ
443=== added file 'graphics/samples/avengers.jpg'
444Binary files graphics/samples/avengers.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/avengers.jpg 2013-11-14 23:41:47 +0000 differ
445=== added file 'graphics/samples/insidious.jpg'
446Binary files graphics/samples/insidious.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/insidious.jpg 2013-11-14 23:41:47 +0000 differ
447=== added file 'graphics/samples/iron-man.jpg'
448Binary files graphics/samples/iron-man.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/iron-man.jpg 2013-11-14 23:41:47 +0000 differ
449=== added file 'graphics/samples/pirates.jpg'
450Binary files graphics/samples/pirates.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/pirates.jpg 2013-11-14 23:41:47 +0000 differ
451=== added file 'graphics/samples/thor.jpg'
452Binary files graphics/samples/thor.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/thor.jpg 2013-11-14 23:41:47 +0000 differ
453=== added directory 'ui'
454=== removed directory 'ui'
455=== renamed file 'ui/About.qml' => 'ui/About.qml'
456=== added directory 'ui/home'
457=== renamed file 'ui/HomeTab.qml' => 'ui/home/HomeTab.qml'
458--- ui/HomeTab.qml 2013-11-11 11:39:45 +0000
459+++ ui/home/HomeTab.qml 2013-11-14 23:41:47 +0000
460@@ -1,7 +1,6 @@
461 import QtQuick 2.0
462 import Ubuntu.Components 0.1
463-import "../components"
464-import "../tests"
465+import "../../components"
466
467 Page {
468 id: homePage
469
470=== added directory 'ui/movie'
471=== added file 'ui/movie/MovieByGenre.qml'
472--- ui/movie/MovieByGenre.qml 1970-01-01 00:00:00 +0000
473+++ ui/movie/MovieByGenre.qml 2013-11-14 23:41:47 +0000
474@@ -0,0 +1,70 @@
475+import QtQuick 2.0
476+import Ubuntu.Components 0.1
477+import "../../components"
478+
479+Page {
480+ id: movieByGenrePage
481+
482+ title: "Genre"
483+ visible: false
484+ flickable: null
485+
486+ property string genre_id
487+ property string genre_url: root.baseUrl + "/genre/list" + root.api_Key
488+ property string genre_movie_url: root.baseUrl + "/genre/" + genre_id + "/movies" + root.api_Key
489+
490+ Component.onCompleted: {
491+ genreWorker.source = "../../backend/GenreList.js"
492+ genreWorker.sendMessage({"url": genre_url, "model": genreListModel})
493+ }
494+
495+ ListModel { id: genreListModel }
496+ ListModel { id: genreMoviesModel }
497+
498+ WorkerScript { id: genreWorker }
499+
500+ Flickable {
501+ clip: true
502+ anchors.fill: parent
503+ contentHeight: mainColumn.height + units.gu(5)
504+ interactive: contentHeight > parent.height
505+
506+ Column {
507+ id: mainColumn
508+
509+ anchors {
510+ left: parent.left;
511+ right: parent.right;
512+ top: parent.top;
513+ margins: units.gu(2)
514+ }
515+
516+ spacing: units.gu(2)
517+
518+ OptionSelector {
519+ text: "Choose movie genre"
520+ model: genreListModel
521+ delegate: genreDelegate
522+ onDelegateClicked: {
523+ genreMoviesModel.clear()
524+ genreWorker.source = "../../backend/GenreMovies.js"
525+ genre_id = genreListModel.get(index).id
526+ genreWorker.sendMessage({"model": genreMoviesModel, "url": genre_movie_url})
527+ }
528+ }
529+
530+ Component {
531+ id: genreDelegate
532+ OptionSelectorDelegate { text: name }
533+ }
534+
535+ Grid {
536+ id: movieList
537+ dataModel: genreMoviesModel
538+ visible: genreMoviesModel.count != 0
539+ height: units.gu(50)
540+ onThumbClicked: pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": model.id})
541+ }
542+ }
543+ }
544+}
545
546=== renamed file 'ui/MoviePage.qml' => 'ui/movie/MoviePage.qml'
547--- ui/MoviePage.qml 2013-11-13 20:50:15 +0000
548+++ ui/movie/MoviePage.qml 2013-11-14 23:41:47 +0000
549@@ -2,7 +2,7 @@
550 import Ubuntu.Components 0.1
551 import QtGraphicalEffects 1.0
552 import Ubuntu.Components.ListItems 0.1
553-import "../components"
554+import "../../components"
555
556 Page {
557 id: moviePage
558@@ -21,13 +21,9 @@
559
560 WorkerScript {
561 id: movieWorker
562- source: "../backend/MovieDetails.js"
563+ source: "../../backend/MovieDetails.js"
564 onMessage: {
565- if(messageObject.poster == null)
566- thumb.source = Qt.resolvedUrl("../graphics/toolbarIcon.png")
567- else
568- thumb.source = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + messageObject.poster
569-
570+ thumb.source = messageObject.poster
571 title.text = messageObject.title
572 description.text = messageObject.description
573 releaseDate.subText = messageObject.releasedate
574@@ -47,15 +43,15 @@
575
576 cast1.text = castModel.get(0).name
577 cast1.subText = castModel.get(0).character
578- cast1.icon = castModel.get(0).iconUrl === "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : castModel.get(0).iconUrl;
579+ cast1.icon = castModel.get(0).iconUrl === "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : castModel.get(0).iconUrl;
580
581 cast2.text = castModel.get(1).name
582 cast2.subText = castModel.get(1).character
583- cast2.icon = castModel.get(1).iconUrl === "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : castModel.get(1).iconUrl;
584+ cast2.icon = castModel.get(1).iconUrl === "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : castModel.get(1).iconUrl;
585
586 cast3.text = castModel.get(2).name
587 cast3.subText = castModel.get(2).character
588- cast3.icon = castModel.get(2).iconUrl === "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : castModel.get(2).iconUrl;
589+ cast3.icon = castModel.get(2).iconUrl === "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : castModel.get(2).iconUrl;
590
591 crew1.text = crewModel.get(0).name
592 crew1.subText = crewModel.get(0).job
593@@ -108,8 +104,8 @@
594 delegate: Subtitled {
595 text: name
596 subText: character
597- icon: iconUrl == "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : iconUrl
598- onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": id})
599+ icon: iconUrl == "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : iconUrl
600+ onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": id})
601 }
602 }
603 }
604@@ -134,7 +130,7 @@
605 delegate: Subtitled {
606 text: name
607 subText: job
608- onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": id})
609+ onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": id})
610 }
611 }
612 }
613@@ -223,7 +219,7 @@
614 Image{
615 id: star
616 width: units.gu(5)
617- source: Qt.resolvedUrl("../graphics/rating.png")
618+ source: Qt.resolvedUrl("../../graphics/rating.png")
619 fillMode: Image.PreserveAspectFit
620 smooth: true
621 }
622@@ -271,19 +267,19 @@
623 Subtitled {
624 id: cast1;
625 progression: true
626- onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": castModel.get(0).id})
627+ onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": castModel.get(0).id})
628 }
629
630 Subtitled {
631 id: cast2;
632 progression: true
633- onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": castModel.get(1).id})
634+ onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": castModel.get(1).id})
635 }
636
637 Subtitled {
638 id: cast3;
639 progression: true
640- onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": castModel.get(2).id})
641+ onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": castModel.get(2).id})
642 }
643
644 Standard {
645@@ -298,19 +294,19 @@
646 Subtitled {
647 id: crew1;
648 progression: true
649- onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": crewModel.get(0).id})
650+ onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": crewModel.get(0).id})
651 }
652
653 Subtitled {
654 id: crew2;
655 progression: true
656- onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": crewModel.get(1).id})
657+ onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": crewModel.get(1).id})
658 }
659
660 Subtitled {
661 id: crew3;
662 progression: true
663- onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": crewModel.get(2).id})
664+ onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": crewModel.get(2).id})
665 }
666
667 Standard {
668
669=== renamed file 'ui/MovieTab.qml' => 'ui/movie/MovieTab.qml'
670--- ui/MovieTab.qml 2013-11-12 17:43:07 +0000
671+++ ui/movie/MovieTab.qml 2013-11-14 23:41:47 +0000
672@@ -1,7 +1,7 @@
673 import QtQuick 2.0
674 import Ubuntu.Components 0.1
675 import Ubuntu.Components.ListItems 0.1
676-import "../components"
677+import "../../components"
678
679 Page {
680 // Movie URLs
681@@ -13,7 +13,7 @@
682 ListModel {
683 id: nowPlayingModel
684 Component.onCompleted: {
685- homePageWorker.source = "../backend/NowPlayingMovie.js"
686+ homePageWorker.source = "../../backend/TrendingMovie.js"
687 homePageWorker.sendMessage({'model': nowPlayingModel, 'url': nowPlayingUrl})
688 }
689 }
690@@ -21,7 +21,7 @@
691 ListModel {
692 id: upcomingMovieModel
693 Component.onCompleted: {
694- homePageWorker.source = "../backend/UpcomingMovie.js"
695+ homePageWorker.source = "../../backend/TrendingMovie.js"
696 homePageWorker.sendMessage({'model': upcomingMovieModel, 'url': upcomingUrl})
697 }
698 }
699@@ -88,7 +88,7 @@
700 Standard {
701 text: "By Genre"
702 progression: true
703- enabled: false
704+ onClicked: pageStack.push(Qt.resolvedUrl("MovieByGenre.qml"))
705 }
706
707 Standard {
708
709=== renamed file 'ui/SearchMovie.qml' => 'ui/movie/SearchMovie.qml'
710--- ui/SearchMovie.qml 2013-11-12 20:09:36 +0000
711+++ ui/movie/SearchMovie.qml 2013-11-14 23:41:47 +0000
712@@ -1,6 +1,6 @@
713 import QtQuick 2.0
714 import Ubuntu.Components 0.1
715-import "../components"
716+import "../../components"
717
718 // Page to search for movies
719 Page {
720
721=== added directory 'ui/person'
722=== renamed file 'ui/PersonPage.qml' => 'ui/person/PersonPage.qml'
723--- ui/PersonPage.qml 2013-11-13 21:28:13 +0000
724+++ ui/person/PersonPage.qml 2013-11-14 23:41:47 +0000
725@@ -18,10 +18,10 @@
726
727 WorkerScript {
728 id: personWorker
729- source: "../backend/PersonDetails.js"
730+ source: "../../backend/PersonDetails.js"
731 onMessage: {
732 if(messageObject.poster == null)
733- thumb.source = Qt.resolvedUrl("../graphics/toolbarIcon.png")
734+ thumb.source = Qt.resolvedUrl("../../graphics/toolbarIcon.png")
735 else
736 thumb.source = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + messageObject.poster
737
738@@ -30,7 +30,7 @@
739 birthYear.text = messageObject.birthday == null ? "Not Available" : "Born: " + messageObject.birthday
740 deathYear.text = messageObject.deathday == null ? "Not Available" :"Dead: " + messageObject.deathday
741 birthPlace.text = messageObject.place_of_birth == null ? "Birth Place Not Available" : messageObject.place_of_birth
742- contact.text = messageObject.homepage
743+ contact.text = messageObject.homepage == null ? "Homepage Not Available" : messageObject.homepage
744 }
745 }
746
747@@ -168,10 +168,10 @@
748
749 model: actedModel
750 delegate: Subtitled {
751- icon: iconUrl == "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : iconUrl
752+ icon: iconUrl == "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : iconUrl
753 text: title
754 subText: character
755- onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie")
756+ onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("../movie/MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie")
757 }
758 }
759
760@@ -191,10 +191,10 @@
761
762 model: directedModel
763 delegate: Subtitled {
764- icon: iconUrl == "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : iconUrl
765+ icon: iconUrl == "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : iconUrl
766 text: title
767 subText: character
768- onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie")
769+ onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("../movie/MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie")
770 }
771 }
772 }
773
774=== renamed file 'ui/PersonTab.qml' => 'ui/person/PersonTab.qml'
775--- ui/PersonTab.qml 2013-11-12 20:09:36 +0000
776+++ ui/person/PersonTab.qml 2013-11-14 23:41:47 +0000
777@@ -1,6 +1,6 @@
778 import QtQuick 2.0
779 import Ubuntu.Components 0.1
780-import "../components"
781+import "../../components"
782
783 Page {
784 // Person URLs
785@@ -9,7 +9,7 @@
786 ListModel {
787 id: popularModel
788 Component.onCompleted: {
789- peopleWorker.source = "../backend/PopularPeople.js"
790+ peopleWorker.source = "../../backend/PopularPeople.js"
791 peopleWorker.sendMessage({'model': popularModel, 'url': popularUrl})
792 }
793 }
794
795=== renamed file 'ui/SearchPerson.qml' => 'ui/person/SearchPerson.qml'
796--- ui/SearchPerson.qml 2013-11-12 20:09:36 +0000
797+++ ui/person/SearchPerson.qml 2013-11-14 23:41:47 +0000
798@@ -1,6 +1,6 @@
799 import QtQuick 2.0
800 import Ubuntu.Components 0.1
801-import "../components"
802+import "../../components"
803
804 // Page to search for persons
805 Page {
806
807=== added directory 'ui/tv'
808=== renamed file 'ui/SearchTv.qml' => 'ui/tv/SearchTv.qml'
809--- ui/SearchTv.qml 2013-11-12 20:09:36 +0000
810+++ ui/tv/SearchTv.qml 2013-11-14 23:41:47 +0000
811@@ -1,6 +1,6 @@
812 import QtQuick 2.0
813 import Ubuntu.Components 0.1
814-import "../components"
815+import "../../components"
816
817 // Page to search for tv shows
818 Page {
819
820=== renamed file 'ui/TvTab.qml' => 'ui/tv/TvTab.qml'
821--- ui/TvTab.qml 2013-11-12 20:09:36 +0000
822+++ ui/tv/TvTab.qml 2013-11-14 23:41:47 +0000
823@@ -1,6 +1,6 @@
824 import QtQuick 2.0
825 import Ubuntu.Components 0.1
826-import "../components"
827+import "../../components"
828
829 Page {
830 // Tv Show URLs
831@@ -9,7 +9,7 @@
832 ListModel {
833 id: popularModel
834 Component.onCompleted: {
835- tvPageWorker.source = "../backend/PopularShow.js"
836+ tvPageWorker.source = "../../backend/PopularShow.js"
837 tvPageWorker.sendMessage({'model': popularModel, 'url': popularUrl})
838 }
839 }

Subscribers

People subscribed via source and target branches