home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
WebService and Mobile Access
Popular Plugins
MPExtended
GetMovieCategories broken?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Lightning303" data-source="post: 997808" data-attributes="member: 97876"><p>Yeah the movingpictures db can be quite complicated ;p. Luckily i visited a lecture for databases last semester at my university and now have less problems understanding the structure.</p><p>I cant really help you with the filtering itself, however i think it would be ok if the client would just take the results of GetMovieCategories and use them in the filter parameter in the GetMoviesBasic request.</p><p> </p><p>However i wanted to help fix GetMovieCategories ;P</p><p>So, i just did a quick test in php (my weapon of choice) to filter out all the categories and the entries in them.</p><p> </p><p>SQL</p><p>[CODE=SQL]SELECT node.name AS CategoryName FROM menu, menu__node, node WHERE menu.name = "Categories Menu" AND menu.id = menu__node.menu_id AND menu__node.node_id = node.id;[/CODE]</p><p> </p><p>this results in a list of all categories</p><p>[code]${AllMovies}</p><p>${UnwatchedMovies}</p><p>${RecentlyAddedMovies}</p><p>${Genres}</p><p>${Year}</p><p>${Certification}[/CODE]</p><p> </p><p> </p><p>Using this sql command</p><p>[CODE=SQL]SELECT node1.name AS CategoryName, node2.name AS CategoryItem FROM menu, menu__node, node node1, node__node, node node2 WHERE menu.name = "Categories Menu" AND menu.id = menu__node.menu_id AND menu__node.node_id = node1.id AND node1.id = node__node.node1_id AND node__node.node2_id = node2.id"[/CODE]</p><p> </p><p>i get the entries in the categories aswell (not the movies, but lets say the sub categories)</p><p>[code]${Genres}, Action</p><p>${Genres}, Adventure</p><p>${Genres}, Animation</p><p>${Genres}, Biography</p><p>${Genres}, Comedy</p><p>${Genres}, Crime</p><p>${Genres}, Documentary</p><p>${Genres}, Drama</p><p>${Genres}, Family</p><p>${Genres}, Fantasy</p><p>${Genres}, History</p><p>${Genres}, Horror</p><p>${Genres}, Music</p><p>${Genres}, Musical</p><p>${Genres}, Mystery</p><p>${Genres}, Romance</p><p>${Genres}, Sci-Fi</p><p>${Genres}, Short</p><p>${Genres}, Sport</p><p>${Genres}, Thriller</p><p>${Genres}, War</p><p>${Genres}, Western</p><p>${Year}, 1960s</p><p>${Year}, 1970s</p><p>${Year}, 1980s</p><p>${Year}, 1990s</p><p>${Year}, 2000s</p><p>${Year}, 2010s</p><p>${Certification}, G</p><p>${Certification}, NC-17</p><p>${Certification}, NR</p><p>${Certification}, PG</p><p>${Certification}, PG-13</p><p>${Certification}, R[/CODE]</p><p> </p><p>Performance wise, when using these two sql statements and outputting the data it takes 0.002 seconds.</p><p> </p><p>Hope that helps <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />.</p></blockquote><p></p>
[QUOTE="Lightning303, post: 997808, member: 97876"] Yeah the movingpictures db can be quite complicated ;p. Luckily i visited a lecture for databases last semester at my university and now have less problems understanding the structure. I cant really help you with the filtering itself, however i think it would be ok if the client would just take the results of GetMovieCategories and use them in the filter parameter in the GetMoviesBasic request. However i wanted to help fix GetMovieCategories ;P So, i just did a quick test in php (my weapon of choice) to filter out all the categories and the entries in them. SQL [CODE=SQL]SELECT node.name AS CategoryName FROM menu, menu__node, node WHERE menu.name = "Categories Menu" AND menu.id = menu__node.menu_id AND menu__node.node_id = node.id;[/CODE] this results in a list of all categories [code]${AllMovies} ${UnwatchedMovies} ${RecentlyAddedMovies} ${Genres} ${Year} ${Certification}[/CODE] Using this sql command [CODE=SQL]SELECT node1.name AS CategoryName, node2.name AS CategoryItem FROM menu, menu__node, node node1, node__node, node node2 WHERE menu.name = "Categories Menu" AND menu.id = menu__node.menu_id AND menu__node.node_id = node1.id AND node1.id = node__node.node1_id AND node__node.node2_id = node2.id"[/CODE] i get the entries in the categories aswell (not the movies, but lets say the sub categories) [code]${Genres}, Action ${Genres}, Adventure ${Genres}, Animation ${Genres}, Biography ${Genres}, Comedy ${Genres}, Crime ${Genres}, Documentary ${Genres}, Drama ${Genres}, Family ${Genres}, Fantasy ${Genres}, History ${Genres}, Horror ${Genres}, Music ${Genres}, Musical ${Genres}, Mystery ${Genres}, Romance ${Genres}, Sci-Fi ${Genres}, Short ${Genres}, Sport ${Genres}, Thriller ${Genres}, War ${Genres}, Western ${Year}, 1960s ${Year}, 1970s ${Year}, 1980s ${Year}, 1990s ${Year}, 2000s ${Year}, 2010s ${Certification}, G ${Certification}, NC-17 ${Certification}, NR ${Certification}, PG ${Certification}, PG-13 ${Certification}, R[/CODE] Performance wise, when using these two sql statements and outputting the data it takes 0.002 seconds. Hope that helps :). [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
WebService and Mobile Access
Popular Plugins
MPExtended
GetMovieCategories broken?
Contact us
RSS
Top
Bottom