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

Proposed by Nekhelesh Ramananthan
Status: Rejected
Rejected by: Nekhelesh Ramananthan
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
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

small code cleanup

12. By Nekhelesh Ramananthan

Reorganized the UI folder

13. By Nekhelesh Ramananthan

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

14. By Nekhelesh Ramananthan

Merged UpcomingMovie.js and NowPlayingMovie.js files

15. By Nekhelesh Ramananthan

Simplified Search.js

Revision history for this message
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

Simplified Search.js

14. By Nekhelesh Ramananthan

Merged UpcomingMovie.js and NowPlayingMovie.js files

13. By Nekhelesh Ramananthan

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

12. By Nekhelesh Ramananthan

Reorganized the UI folder

11. By Nekhelesh Ramananthan

small code cleanup

10. By Nekhelesh Ramananthan

enabled all tabs again

9. By Nekhelesh Ramananthan

merge from trunk

8. By Nekhelesh Ramananthan

Added ability to filter movies by genre

7. By Nekhelesh Ramananthan

Added new component Grid

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Cliffhanger.qml'
--- Cliffhanger.qml 2013-11-13 20:50:15 +0000
+++ Cliffhanger.qml 2013-11-14 23:41:47 +0000
@@ -1,8 +1,10 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import "ui/movie"
4import "ui/tv"
5import "ui/person"
6import "ui/home"
3import "ui"7import "ui"
4import "graphics"
5import "components"
68
7MainView {9MainView {
8 // objectName for functional testing purposes (autopilot-qt5)10 // objectName for functional testing purposes (autopilot-qt5)
@@ -21,9 +23,7 @@
21 height: units.gu(75)23 height: units.gu(75)
2224
23 // TODO: This is a temporary app background. Final background color needs to be decided.25 // TODO: This is a temporary app background. Final background color needs to be decided.
24 headerColor: UbuntuColors.coolGrey
25 backgroundColor: UbuntuColors.coolGrey26 backgroundColor: UbuntuColors.coolGrey
26 footerColor: UbuntuColors.coolGrey
2727
28 PageStack {28 PageStack {
29 id: pagestack29 id: pagestack
@@ -34,15 +34,14 @@
34 id: root34 id: root
3535
36 // Moviedb App Properties36 // Moviedb App Properties
37 //readonly property string baseUrl: "http://api.themoviedb.org/3"37 readonly property string baseUrl: "http://api.themoviedb.org/3"
38 readonly property string baseUrl: "http://private-4b62-themoviedb.apiary.io/3"
39 readonly property string api_Key: "?api_key=d0a2929acb64b7c203071e87a621dfb3"38 readonly property string api_Key: "?api_key=d0a2929acb64b7c203071e87a621dfb3"
4039
41 // Home Tab40 // Home Tab
42// Tab {41 // Tab {
43// title: "Home"42 // title: "Home"
44// page: HomeTab {}43 // page: HomeTab {}
45// }44 // }
4645
47 // Movies tab46 // Movies tab
48 Tab {47 Tab {
@@ -62,10 +61,12 @@
62 page: PersonTab {}61 page: PersonTab {}
63 }62 }
6463
64 // About Tab
65 Tab {65 Tab {
66 title: "About"66 title: "About"
67 page: About {}67 page: About {}
68 }68 }
69
69 }70 }
70 }71 }
71}72}
7273
=== added file 'backend/GenreList.js'
--- backend/GenreList.js 1970-01-01 00:00:00 +0000
+++ backend/GenreList.js 2013-11-14 23:41:47 +0000
@@ -0,0 +1,30 @@
1WorkerScript.onMessage = function(message) {
2 /*
3 XML HTTP Request to retrieve the list of genres. The retrieved list is synced
4 to a list model with the following structure,
5 id -> Unique ID used by the API
6 name -> Genre
7 */
8
9 var XHR = new XMLHttpRequest();
10
11 XHR.open("GET", message.url);
12 XHR.setRequestHeader("Accept", "application/json");
13
14 XHR.onreadystatechange = function() {
15 if(XHR.readyState != XHR.DONE)
16 return;
17 if(XHR.status != 200)
18 return;
19
20 var obj = JSON.parse(XHR.responseText);
21
22 for(var i=0; i<obj.genres.length; i++) {
23 message.model.append({"name": obj.genres[i].name,
24 "id": obj.genres[i].id});
25 message.model.sync()
26 }
27 };
28
29 XHR.send();
30}
031
=== added file 'backend/GenreMovies.js'
--- backend/GenreMovies.js 1970-01-01 00:00:00 +0000
+++ backend/GenreMovies.js 2013-11-14 23:41:47 +0000
@@ -0,0 +1,43 @@
1WorkerScript.onMessage = function(message) {
2 /*
3 XML HTTP Request to retrieve the movies of a certain genre. The retrieved
4 results are synced to a list model with the following structure.
5 name -> Name of the movie
6 thumb_url -> Movie poster thumbnail
7 id -> Unique identification ID used by the API
8 */
9
10 var XHR = new XMLHttpRequest();
11 var thumb_url;
12
13 // Clear model of any data before syncing it with new data
14 message.model.clear()
15
16 XHR.open("GET", message.url);
17 XHR.setRequestHeader("Accept", "application/json");
18
19 XHR.onreadystatechange = function() {
20 if(XHR.readyState != XHR.DONE)
21 return;
22 if(XHR.status != 200)
23 return;
24
25 var obj = JSON.parse(XHR.responseText);
26
27 for(var i=0; i<obj.results.length; i++) {
28
29 // Ensuring that a valid URL is always sent.
30 if (obj.results[i].poster_path == null)
31 thumb_url = "../graphics/toolbarIcon.png"
32 else
33 thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.results[i].poster_path
34
35 message.model.append({"name": obj.results[i].title,
36 "thumb_url": thumb_url,
37 "id": obj.results[i].id});
38 message.model.sync()
39 }
40 };
41
42 XHR.send();
43}
044
=== modified file 'backend/MovieDetails.js'
--- backend/MovieDetails.js 2013-11-13 20:50:15 +0000
+++ backend/MovieDetails.js 2013-11-14 23:41:47 +0000
@@ -1,4 +1,7 @@
1WorkerScript.onMessage = function(message) {1WorkerScript.onMessage = function(message) {
2 /*
3 XML HTTP Request to retrieve the details of a movie.
4 */
25
3 var XHR = new XMLHttpRequest(); 6 var XHR = new XMLHttpRequest();
4 var thumb_url;7 var thumb_url;
@@ -14,6 +17,7 @@
1417
15 var obj = JSON.parse(XHR.responseText);18 var obj = JSON.parse(XHR.responseText);
1619
20 // Syncing the movie cast to the castModel
17 for(var i=0; i<obj.credits.cast.length; i++) {21 for(var i=0; i<obj.credits.cast.length; i++) {
18 if (obj.credits.cast[i].profile_path == null)22 if (obj.credits.cast[i].profile_path == null)
19 thumb_url = "null"23 thumb_url = "null"
@@ -27,6 +31,7 @@
27 message.castModel.sync()31 message.castModel.sync()
28 }32 }
2933
34 // Syncing the movie crew to the crewModel
30 for(var j=0; j<obj.credits.crew.length; j++) {35 for(var j=0; j<obj.credits.crew.length; j++) {
31 message.crewModel.append({"name": obj.credits.crew[j].name,36 message.crewModel.append({"name": obj.credits.crew[j].name,
32 "id": obj.credits.crew[j].id,37 "id": obj.credits.crew[j].id,
@@ -34,9 +39,10 @@
34 message.crewModel.sync()39 message.crewModel.sync()
35 }40 }
3641
42 // Obtaining movies similar to the movie currently viewed
37 for(var i=0; i<obj.similar_movies.results.length; i++) {43 for(var i=0; i<obj.similar_movies.results.length; i++) {
38 if (obj.similar_movies.results[i].poster_path == null)44 if (obj.similar_movies.results[i].poster_path == null)
39 thumb_url = "null"45 thumb_url = "../graphics/toolbarIcon.png"
40 else46 else
41 thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.similar_movies.results[i].poster_path47 thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.similar_movies.results[i].poster_path
4248
@@ -46,7 +52,13 @@
46 message.similarMovieModel.sync()52 message.similarMovieModel.sync()
47 }53 }
4854
49 WorkerScript.sendMessage({ 'poster': obj.poster_path,55 if(obj.poster_path == null)
56 thumb_url = "../../graphics/toolbarIcon.png"
57 else
58 thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.poster_path
59
60 // Returning movie details such as poster path, title, description, genre, theme etc.
61 WorkerScript.sendMessage({ 'poster': thumb_url,
50 "title": obj.original_title,62 "title": obj.original_title,
51 "description": obj.overview,63 "description": obj.overview,
52 "runtime": obj.runtime,64 "runtime": obj.runtime,
5365
=== removed file 'backend/NowPlayingMovie.js'
--- backend/NowPlayingMovie.js 2013-11-13 20:50:15 +0000
+++ backend/NowPlayingMovie.js 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
1WorkerScript.onMessage = function(message) {
2
3 var XHR = new XMLHttpRequest();
4 var thumb_url;
5
6 XHR.open("GET", message.url);
7 XHR.setRequestHeader("Accept", "application/json");
8
9 XHR.onreadystatechange = function() {
10 if(XHR.readyState != XHR.DONE)
11 return;
12 if(XHR.status != 200)
13 return;
14
15 var obj = JSON.parse(XHR.responseText);
16
17 for(var i=0; i<obj.results.length; i++) {
18
19 if (obj.results[i].poster_path == null)
20 thumb_url = "null"
21 else
22 thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.results[i].poster_path
23
24 message.model.append({"name": obj.results[i].title,
25 "thumb_url": thumb_url,
26 "id": obj.results[i].id});
27 message.model.sync()
28 }
29 };
30
31 XHR.send();
32}
330
=== modified file 'backend/PersonDetails.js'
--- backend/PersonDetails.js 2013-11-13 21:28:13 +0000
+++ backend/PersonDetails.js 2013-11-14 23:41:47 +0000
@@ -37,11 +37,24 @@
37 }37 }
3838
39 for(i=0; i<obj.combined_credits.crew.length; i++) {39 for(i=0; i<obj.combined_credits.crew.length; i++) {
40 message.directedModel.append({"title": obj.combined_credits.crew[i].title,40 if (obj.combined_credits.crew[i].poster_path == null)
41 "character": obj.combined_credits.crew[i].job,41 thumb_url = "null"
42 "media_type": obj.combined_credits.cast[i].media_type,42 else
43 "id": obj.combined_credits.crew[i].id,43 thumb_url = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + obj.combined_credits.crew[i].poster_path
44 "iconUrl": thumb_url});44
45
46 if(obj.combined_credits.crew[i].media_type == "movie")
47 message.directedModel.append({"title": obj.combined_credits.crew[i].title,
48 "character": obj.combined_credits.crew[i].job,
49 "media_type": obj.combined_credits.crew[i].media_type,
50 "id": obj.combined_credits.crew[i].id,
51 "iconUrl": thumb_url});
52 else if(obj.combined_credits.crew[i].media_type == "tv")
53 message.directedModel.append({"title": obj.combined_credits.crew[i].name,
54 "character": obj.combined_credits.crew[i].job,
55 "media_type": obj.combined_credits.crew[i].media_type,
56 "id": obj.combined_credits.crew[i].id,
57 "iconUrl": thumb_url});
45 message.directedModel.sync()58 message.directedModel.sync()
46 }59 }
4760
4861
=== modified file 'backend/Search.js'
--- backend/Search.js 2013-11-13 20:50:15 +0000
+++ backend/Search.js 2013-11-14 23:41:47 +0000
@@ -2,6 +2,7 @@
22
3 var XHR = new XMLHttpRequest();3 var XHR = new XMLHttpRequest();
4 var thumb_url;4 var thumb_url;
5
5 message.model.clear()6 message.model.clear()
67
7 XHR.open("GET", message.url);8 XHR.open("GET", message.url);
@@ -17,8 +18,8 @@
1718
18 for(var i=0; i<obj.results.length; i++) {19 for(var i=0; i<obj.results.length; i++) {
1920
20 if (message.type == "movie") {21 switch(message.type) {
2122 case "movie":
22 if (obj.results[i].poster_path == null)23 if (obj.results[i].poster_path == null)
23 thumb_url = "null"24 thumb_url = "null"
24 else25 else
@@ -27,10 +28,9 @@
27 message.model.append({"name": obj.results[i].title,28 message.model.append({"name": obj.results[i].title,
28 "id": obj.results[i].id,29 "id": obj.results[i].id,
29 "thumb_url": thumb_url});30 "thumb_url": thumb_url});
30 }31 break;
3132
32 else if (message.type == "person"){33 case "person":
33
34 if (obj.results[i].profile_path == null)34 if (obj.results[i].profile_path == null)
35 thumb_url = "null"35 thumb_url = "null"
36 else36 else
@@ -39,9 +39,9 @@
39 message.model.append({"name": obj.results[i].name,39 message.model.append({"name": obj.results[i].name,
40 "id": obj.results[i].id,40 "id": obj.results[i].id,
41 "thumb_url": thumb_url});41 "thumb_url": thumb_url});
42 }42 break;
4343
44 else if (message.type == "tv") {44 case "tv":
45 if (obj.results[i].poster_path == null)45 if (obj.results[i].poster_path == null)
46 thumb_url = "null"46 thumb_url = "null"
47 else47 else
@@ -50,6 +50,7 @@
50 message.model.append({"name": obj.results[i].name,50 message.model.append({"name": obj.results[i].name,
51 "id": obj.results[i].id,51 "id": obj.results[i].id,
52 "thumb_url": thumb_url});52 "thumb_url": thumb_url});
53 break;
53 }54 }
5455
55 message.model.sync()56 message.model.sync()
5657
=== renamed file 'backend/UpcomingMovie.js' => 'backend/TrendingMovie.js'
=== added file 'components/Grid.qml'
--- components/Grid.qml 1970-01-01 00:00:00 +0000
+++ components/Grid.qml 2013-11-14 23:41:47 +0000
@@ -0,0 +1,106 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import Ubuntu.Components.ListItems 0.1
4
5Item {
6 id: grid
7
8 // Header Title
9 property alias header: header.text
10
11 // Grid Data Model
12 property alias dataModel: gridView.model
13
14 // Grid Thumbnail size
15 property int size: units.gu(12)
16
17 // Signal triggered when a thumb
18 signal thumbClicked(var model)
19
20 width: parent.width
21
22 Column {
23 id: container
24
25 anchors.fill: parent
26 spacing: units.gu(1)
27
28 Header {
29 id: header
30 text: "Default Header Title"
31 visible: text != "Default Header Title"
32 ActivityIndicator {
33 running: dataModel.count === 0 ? true : false
34 anchors.right: parent.right
35 }
36 }
37
38 Component {
39 id: gridDelegate
40 Item {
41 id: thumbContainer
42
43 width: grid.size + units.gu(2)
44 height: thumbColumn.height
45
46 Column {
47 id: thumbColumn
48 spacing: units.gu(0.5)
49 anchors.fill: parent
50
51 // Widget to curve edges and encase the thumbnail
52 UbuntuShape {
53 id: gridThumb
54
55 width: grid.size
56 height: grid.size + units.gu(5)
57
58 image: Image {
59 source: thumb_url
60 fillMode: Image.PreserveAspectFit
61 smooth: true
62 }
63
64 MouseArea {
65 anchors.fill: parent
66 onClicked: grid.thumbClicked(model)
67 }
68 }
69
70 // Label showing the movie/tv show name
71 Label {
72 id: gridThumbDescription
73
74 text: name
75 maximumLineCount: 2
76 elide: Text.ElideRight
77 wrapMode: Text.WordWrap
78 width: gridThumb.width
79 horizontalAlignment: Text.AlignHCenter
80
81 MouseArea {
82 anchors.fill: parent
83 onClicked: grid.thumbClicked(model)
84 }
85 }
86 }
87 }
88 }
89
90
91 GridView {
92 id: gridView
93
94 clip: true
95 width: parent.width
96 height: parent.height - header.height - parent.spacing
97 snapMode: GridView.SnapToRow
98
99 cellHeight: grid.size + units.gu(12)
100 cellWidth: grid.size + container.spacing
101
102 delegate: gridDelegate
103 }
104
105 }
106}
0107
=== added directory 'graphics/samples'
=== added file 'graphics/samples/america.jpg'
1Binary files graphics/samples/america.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/america.jpg 2013-11-14 23:41:47 +0000 differ108Binary 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
=== added file 'graphics/samples/avengers.jpg'
2Binary files graphics/samples/avengers.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/avengers.jpg 2013-11-14 23:41:47 +0000 differ109Binary 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
=== added file 'graphics/samples/insidious.jpg'
3Binary files graphics/samples/insidious.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/insidious.jpg 2013-11-14 23:41:47 +0000 differ110Binary 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
=== added file 'graphics/samples/iron-man.jpg'
4Binary 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 differ111Binary 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
=== added file 'graphics/samples/pirates.jpg'
5Binary files graphics/samples/pirates.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/pirates.jpg 2013-11-14 23:41:47 +0000 differ112Binary 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
=== added file 'graphics/samples/thor.jpg'
6Binary files graphics/samples/thor.jpg 1970-01-01 00:00:00 +0000 and graphics/samples/thor.jpg 2013-11-14 23:41:47 +0000 differ113Binary 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
=== added directory 'ui'
=== removed directory 'ui'
=== renamed file 'ui/About.qml' => 'ui/About.qml'
=== added directory 'ui/home'
=== renamed file 'ui/HomeTab.qml' => 'ui/home/HomeTab.qml'
--- ui/HomeTab.qml 2013-11-11 11:39:45 +0000
+++ ui/home/HomeTab.qml 2013-11-14 23:41:47 +0000
@@ -1,7 +1,6 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import "../components"3import "../../components"
4import "../tests"
54
6Page {5Page {
7 id: homePage6 id: homePage
87
=== added directory 'ui/movie'
=== added file 'ui/movie/MovieByGenre.qml'
--- ui/movie/MovieByGenre.qml 1970-01-01 00:00:00 +0000
+++ ui/movie/MovieByGenre.qml 2013-11-14 23:41:47 +0000
@@ -0,0 +1,70 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import "../../components"
4
5Page {
6 id: movieByGenrePage
7
8 title: "Genre"
9 visible: false
10 flickable: null
11
12 property string genre_id
13 property string genre_url: root.baseUrl + "/genre/list" + root.api_Key
14 property string genre_movie_url: root.baseUrl + "/genre/" + genre_id + "/movies" + root.api_Key
15
16 Component.onCompleted: {
17 genreWorker.source = "../../backend/GenreList.js"
18 genreWorker.sendMessage({"url": genre_url, "model": genreListModel})
19 }
20
21 ListModel { id: genreListModel }
22 ListModel { id: genreMoviesModel }
23
24 WorkerScript { id: genreWorker }
25
26 Flickable {
27 clip: true
28 anchors.fill: parent
29 contentHeight: mainColumn.height + units.gu(5)
30 interactive: contentHeight > parent.height
31
32 Column {
33 id: mainColumn
34
35 anchors {
36 left: parent.left;
37 right: parent.right;
38 top: parent.top;
39 margins: units.gu(2)
40 }
41
42 spacing: units.gu(2)
43
44 OptionSelector {
45 text: "Choose movie genre"
46 model: genreListModel
47 delegate: genreDelegate
48 onDelegateClicked: {
49 genreMoviesModel.clear()
50 genreWorker.source = "../../backend/GenreMovies.js"
51 genre_id = genreListModel.get(index).id
52 genreWorker.sendMessage({"model": genreMoviesModel, "url": genre_movie_url})
53 }
54 }
55
56 Component {
57 id: genreDelegate
58 OptionSelectorDelegate { text: name }
59 }
60
61 Grid {
62 id: movieList
63 dataModel: genreMoviesModel
64 visible: genreMoviesModel.count != 0
65 height: units.gu(50)
66 onThumbClicked: pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": model.id})
67 }
68 }
69 }
70}
071
=== renamed file 'ui/MoviePage.qml' => 'ui/movie/MoviePage.qml'
--- ui/MoviePage.qml 2013-11-13 20:50:15 +0000
+++ ui/movie/MoviePage.qml 2013-11-14 23:41:47 +0000
@@ -2,7 +2,7 @@
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import QtGraphicalEffects 1.03import QtGraphicalEffects 1.0
4import Ubuntu.Components.ListItems 0.14import Ubuntu.Components.ListItems 0.1
5import "../components"5import "../../components"
66
7Page {7Page {
8 id: moviePage8 id: moviePage
@@ -21,13 +21,9 @@
2121
22 WorkerScript {22 WorkerScript {
23 id: movieWorker23 id: movieWorker
24 source: "../backend/MovieDetails.js"24 source: "../../backend/MovieDetails.js"
25 onMessage: {25 onMessage: {
26 if(messageObject.poster == null)26 thumb.source = messageObject.poster
27 thumb.source = Qt.resolvedUrl("../graphics/toolbarIcon.png")
28 else
29 thumb.source = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + messageObject.poster
30
31 title.text = messageObject.title27 title.text = messageObject.title
32 description.text = messageObject.description28 description.text = messageObject.description
33 releaseDate.subText = messageObject.releasedate29 releaseDate.subText = messageObject.releasedate
@@ -47,15 +43,15 @@
4743
48 cast1.text = castModel.get(0).name44 cast1.text = castModel.get(0).name
49 cast1.subText = castModel.get(0).character45 cast1.subText = castModel.get(0).character
50 cast1.icon = castModel.get(0).iconUrl === "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : castModel.get(0).iconUrl;46 cast1.icon = castModel.get(0).iconUrl === "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : castModel.get(0).iconUrl;
5147
52 cast2.text = castModel.get(1).name48 cast2.text = castModel.get(1).name
53 cast2.subText = castModel.get(1).character49 cast2.subText = castModel.get(1).character
54 cast2.icon = castModel.get(1).iconUrl === "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : castModel.get(1).iconUrl;50 cast2.icon = castModel.get(1).iconUrl === "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : castModel.get(1).iconUrl;
5551
56 cast3.text = castModel.get(2).name52 cast3.text = castModel.get(2).name
57 cast3.subText = castModel.get(2).character53 cast3.subText = castModel.get(2).character
58 cast3.icon = castModel.get(2).iconUrl === "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : castModel.get(2).iconUrl;54 cast3.icon = castModel.get(2).iconUrl === "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : castModel.get(2).iconUrl;
5955
60 crew1.text = crewModel.get(0).name56 crew1.text = crewModel.get(0).name
61 crew1.subText = crewModel.get(0).job57 crew1.subText = crewModel.get(0).job
@@ -108,8 +104,8 @@
108 delegate: Subtitled {104 delegate: Subtitled {
109 text: name105 text: name
110 subText: character106 subText: character
111 icon: iconUrl == "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : iconUrl107 icon: iconUrl == "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : iconUrl
112 onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": id})108 onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": id})
113 }109 }
114 }110 }
115 }111 }
@@ -134,7 +130,7 @@
134 delegate: Subtitled {130 delegate: Subtitled {
135 text: name131 text: name
136 subText: job132 subText: job
137 onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": id})133 onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": id})
138 }134 }
139 }135 }
140 }136 }
@@ -223,7 +219,7 @@
223 Image{219 Image{
224 id: star220 id: star
225 width: units.gu(5)221 width: units.gu(5)
226 source: Qt.resolvedUrl("../graphics/rating.png")222 source: Qt.resolvedUrl("../../graphics/rating.png")
227 fillMode: Image.PreserveAspectFit223 fillMode: Image.PreserveAspectFit
228 smooth: true224 smooth: true
229 }225 }
@@ -271,19 +267,19 @@
271 Subtitled {267 Subtitled {
272 id: cast1;268 id: cast1;
273 progression: true269 progression: true
274 onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": castModel.get(0).id})270 onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": castModel.get(0).id})
275 }271 }
276272
277 Subtitled {273 Subtitled {
278 id: cast2;274 id: cast2;
279 progression: true275 progression: true
280 onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": castModel.get(1).id})276 onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": castModel.get(1).id})
281 }277 }
282278
283 Subtitled {279 Subtitled {
284 id: cast3;280 id: cast3;
285 progression: true281 progression: true
286 onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": castModel.get(2).id})282 onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": castModel.get(2).id})
287 }283 }
288284
289 Standard {285 Standard {
@@ -298,19 +294,19 @@
298 Subtitled {294 Subtitled {
299 id: crew1;295 id: crew1;
300 progression: true296 progression: true
301 onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": crewModel.get(0).id})297 onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": crewModel.get(0).id})
302 }298 }
303299
304 Subtitled {300 Subtitled {
305 id: crew2;301 id: crew2;
306 progression: true302 progression: true
307 onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": crewModel.get(1).id})303 onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": crewModel.get(1).id})
308 }304 }
309305
310 Subtitled {306 Subtitled {
311 id: crew3;307 id: crew3;
312 progression: true308 progression: true
313 onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": crewModel.get(2).id})309 onClicked: pageStack.push(Qt.resolvedUrl("../person/PersonPage.qml"), {"person_id": crewModel.get(2).id})
314 }310 }
315311
316 Standard {312 Standard {
317313
=== renamed file 'ui/MovieTab.qml' => 'ui/movie/MovieTab.qml'
--- ui/MovieTab.qml 2013-11-12 17:43:07 +0000
+++ ui/movie/MovieTab.qml 2013-11-14 23:41:47 +0000
@@ -1,7 +1,7 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import Ubuntu.Components.ListItems 0.13import Ubuntu.Components.ListItems 0.1
4import "../components"4import "../../components"
55
6Page {6Page {
7 // Movie URLs7 // Movie URLs
@@ -13,7 +13,7 @@
13 ListModel {13 ListModel {
14 id: nowPlayingModel14 id: nowPlayingModel
15 Component.onCompleted: {15 Component.onCompleted: {
16 homePageWorker.source = "../backend/NowPlayingMovie.js"16 homePageWorker.source = "../../backend/TrendingMovie.js"
17 homePageWorker.sendMessage({'model': nowPlayingModel, 'url': nowPlayingUrl})17 homePageWorker.sendMessage({'model': nowPlayingModel, 'url': nowPlayingUrl})
18 }18 }
19 }19 }
@@ -21,7 +21,7 @@
21 ListModel {21 ListModel {
22 id: upcomingMovieModel22 id: upcomingMovieModel
23 Component.onCompleted: {23 Component.onCompleted: {
24 homePageWorker.source = "../backend/UpcomingMovie.js"24 homePageWorker.source = "../../backend/TrendingMovie.js"
25 homePageWorker.sendMessage({'model': upcomingMovieModel, 'url': upcomingUrl})25 homePageWorker.sendMessage({'model': upcomingMovieModel, 'url': upcomingUrl})
26 }26 }
27 }27 }
@@ -88,7 +88,7 @@
88 Standard {88 Standard {
89 text: "By Genre"89 text: "By Genre"
90 progression: true90 progression: true
91 enabled: false91 onClicked: pageStack.push(Qt.resolvedUrl("MovieByGenre.qml"))
92 }92 }
9393
94 Standard {94 Standard {
9595
=== renamed file 'ui/SearchMovie.qml' => 'ui/movie/SearchMovie.qml'
--- ui/SearchMovie.qml 2013-11-12 20:09:36 +0000
+++ ui/movie/SearchMovie.qml 2013-11-14 23:41:47 +0000
@@ -1,6 +1,6 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import "../components"3import "../../components"
44
5// Page to search for movies5// Page to search for movies
6Page {6Page {
77
=== added directory 'ui/person'
=== renamed file 'ui/PersonPage.qml' => 'ui/person/PersonPage.qml'
--- ui/PersonPage.qml 2013-11-13 21:28:13 +0000
+++ ui/person/PersonPage.qml 2013-11-14 23:41:47 +0000
@@ -18,10 +18,10 @@
1818
19 WorkerScript {19 WorkerScript {
20 id: personWorker20 id: personWorker
21 source: "../backend/PersonDetails.js"21 source: "../../backend/PersonDetails.js"
22 onMessage: {22 onMessage: {
23 if(messageObject.poster == null)23 if(messageObject.poster == null)
24 thumb.source = Qt.resolvedUrl("../graphics/toolbarIcon.png")24 thumb.source = Qt.resolvedUrl("../../graphics/toolbarIcon.png")
25 else25 else
26 thumb.source = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + messageObject.poster26 thumb.source = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/" + "w185/" + messageObject.poster
2727
@@ -30,7 +30,7 @@
30 birthYear.text = messageObject.birthday == null ? "Not Available" : "Born: " + messageObject.birthday30 birthYear.text = messageObject.birthday == null ? "Not Available" : "Born: " + messageObject.birthday
31 deathYear.text = messageObject.deathday == null ? "Not Available" :"Dead: " + messageObject.deathday31 deathYear.text = messageObject.deathday == null ? "Not Available" :"Dead: " + messageObject.deathday
32 birthPlace.text = messageObject.place_of_birth == null ? "Birth Place Not Available" : messageObject.place_of_birth32 birthPlace.text = messageObject.place_of_birth == null ? "Birth Place Not Available" : messageObject.place_of_birth
33 contact.text = messageObject.homepage33 contact.text = messageObject.homepage == null ? "Homepage Not Available" : messageObject.homepage
34 }34 }
35 }35 }
3636
@@ -168,10 +168,10 @@
168168
169 model: actedModel169 model: actedModel
170 delegate: Subtitled {170 delegate: Subtitled {
171 icon: iconUrl == "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : iconUrl171 icon: iconUrl == "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : iconUrl
172 text: title172 text: title
173 subText: character173 subText: character
174 onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie")174 onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("../movie/MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie")
175 }175 }
176 }176 }
177177
@@ -191,10 +191,10 @@
191191
192 model: directedModel192 model: directedModel
193 delegate: Subtitled {193 delegate: Subtitled {
194 icon: iconUrl == "null" ? Qt.resolvedUrl("../graphics/toolbarIcon.png") : iconUrl194 icon: iconUrl == "null" ? Qt.resolvedUrl("../../graphics/toolbarIcon.png") : iconUrl
195 text: title195 text: title
196 subText: character196 subText: character
197 onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie")197 onClicked: media_type == "movie" ? pageStack.push(Qt.resolvedUrl("../movie/MoviePage.qml"), {"movie_id": id}) : console.log("Not a movie")
198 }198 }
199 }199 }
200 }200 }
201201
=== renamed file 'ui/PersonTab.qml' => 'ui/person/PersonTab.qml'
--- ui/PersonTab.qml 2013-11-12 20:09:36 +0000
+++ ui/person/PersonTab.qml 2013-11-14 23:41:47 +0000
@@ -1,6 +1,6 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import "../components"3import "../../components"
44
5Page {5Page {
6 // Person URLs6 // Person URLs
@@ -9,7 +9,7 @@
9 ListModel {9 ListModel {
10 id: popularModel10 id: popularModel
11 Component.onCompleted: {11 Component.onCompleted: {
12 peopleWorker.source = "../backend/PopularPeople.js"12 peopleWorker.source = "../../backend/PopularPeople.js"
13 peopleWorker.sendMessage({'model': popularModel, 'url': popularUrl})13 peopleWorker.sendMessage({'model': popularModel, 'url': popularUrl})
14 }14 }
15 }15 }
1616
=== renamed file 'ui/SearchPerson.qml' => 'ui/person/SearchPerson.qml'
--- ui/SearchPerson.qml 2013-11-12 20:09:36 +0000
+++ ui/person/SearchPerson.qml 2013-11-14 23:41:47 +0000
@@ -1,6 +1,6 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import "../components"3import "../../components"
44
5// Page to search for persons5// Page to search for persons
6Page {6Page {
77
=== added directory 'ui/tv'
=== renamed file 'ui/SearchTv.qml' => 'ui/tv/SearchTv.qml'
--- ui/SearchTv.qml 2013-11-12 20:09:36 +0000
+++ ui/tv/SearchTv.qml 2013-11-14 23:41:47 +0000
@@ -1,6 +1,6 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import "../components"3import "../../components"
44
5// Page to search for tv shows5// Page to search for tv shows
6Page {6Page {
77
=== renamed file 'ui/TvTab.qml' => 'ui/tv/TvTab.qml'
--- ui/TvTab.qml 2013-11-12 20:09:36 +0000
+++ ui/tv/TvTab.qml 2013-11-14 23:41:47 +0000
@@ -1,6 +1,6 @@
1import QtQuick 2.01import QtQuick 2.0
2import Ubuntu.Components 0.12import Ubuntu.Components 0.1
3import "../components"3import "../../components"
44
5Page {5Page {
6 // Tv Show URLs6 // Tv Show URLs
@@ -9,7 +9,7 @@
9 ListModel {9 ListModel {
10 id: popularModel10 id: popularModel
11 Component.onCompleted: {11 Component.onCompleted: {
12 tvPageWorker.source = "../backend/PopularShow.js"12 tvPageWorker.source = "../../backend/PopularShow.js"
13 tvPageWorker.sendMessage({'model': popularModel, 'url': popularUrl})13 tvPageWorker.sendMessage({'model': popularModel, 'url': popularUrl})
14 }14 }
15 }15 }

Subscribers

People subscribed via source and target branches