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
MediaPortal 1 Plugins
[Plugin] MediaBrowser for MediaPortal (v0.30-beta) [2014/08/20]
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="Pog" data-source="post: 1078106" data-attributes="member: 97724"><p>Hey Wiz... I've had a look through the source and have experimented a bit.</p><p></p><p>Armand has a "smart facade" system that allows you the query MB to build a MP facade control from any MP window. So if you use the following eg on your home screen you will see the latest added movies:</p><p>[SPOILER="Latest Media Test"]</p><p>[code] <control></p><p> <description>MediaBrowser.Query.TEST.RecentlyAdded.Movie.5</description></p><p> <type>facadeview</type></p><p> <id>450</id></p><p> <control></p><p> <description>Thumbnail Panel</description></p><p> <type>thumbnailpanel</type></p><p> <posX>400</posX></p><p> <posY>200</posY></p><p> <width>1000</width></p><p> <height>400</height></p><p> <!-- Small Icons 0.66 aspect ratio --></p><p> <itemWidth>150</itemWidth></p><p> <itemHeight>217</itemHeight></p><p> <textureWidth>150</textureWidth></p><p> <textureHeight>216</textureHeight></p><p> <thumbWidth>135</thumbWidth></p><p> <thumbHeight>202</thumbHeight></p><p> <thumbPosX>7</thumbPosX></p><p> <thumbPosY>7</thumbPosY></p><p> <!-- Large Icons 0.66 aspect ratio --></p><p> <textureWidthBig>228</textureWidthBig></p><p> <textureHeightBig>319</textureHeightBig></p><p> <itemWidthBig>226</itemWidthBig></p><p> <itemHeightBig>316</itemHeightBig></p><p> <thumbWidthBig>204</thumbWidthBig></p><p> <thumbHeightBig>294</thumbHeightBig></p><p> <thumbPosXBig>12</thumbPosXBig></p><p> <thumbPosYBig>12</thumbPosYBig></p><p> <imageFolderFocus>thumbborder3.png</imageFolderFocus></p><p> <font>font12</font></p><p> <suffix>|</suffix></p><p> <thumbZoom>yes</thumbZoom></p><p> <enableFocusZoom>no</enableFocusZoom></p><p> <keepaspectratio>no</keepaspectratio></p><p> </control></p><p> </control></p><p>[/code]</p><p>[/SPOILER]</p><p>You can change the description to whatever query you need:</p><p></p><p><description>MediaBrowser.Query.TEST.RecentlyAdded.Movie.5</description></p><p></p><p>You can also use multiple facades, just repeat the code and change the "TEST" to the name you want (also use unique control ID).</p><p></p><p>Here is what I pulled from Armands source. You can follow the type of query you want to put together from this:</p><p></p><p>[SPOILER="MB source query part"]</p><p>[code] while (index < tokens.Length)</p><p> {</p><p> // MediaBrowser.Query.CustomIdentifier.Parameter1.Parameter2.Etc (.Limit as int)</p><p> // Skin properties published are prefixed with: #MediaBrowser.Query.CustomIdentifier (.Loading, .Selected)</p><p> //</p><p> // examples:</p><p> // MediaBrowser.Query.MyDashboardQuery.RecentlyAdded.Movie.3 (shows 3 movies that were recently added)</p><p> // MediaBrowser.Query.MyDashboardQuery.Random.Movie.5 (shows 5 random movies)</p><p> // MediaBrowser.Query.MyDashboardQuery.RecentlyAdded.Episode.Unwatched.8 (shows 8 episodes that were recently added and unwatched)</p><p></p><p> switch (tokens[index])</p><p> {</p><p> // Item Types</p><p> case MediaBrowserType.MusicAlbum:</p><p> query = query.MusicAlbum();</p><p> break;</p><p> case MediaBrowserType.Audio:</p><p> query = query.Audio();</p><p> break;</p><p> case MediaBrowserType.Series:</p><p> query = query.Series();</p><p> break;</p><p> case MediaBrowserType.Season:</p><p> query = query.Season();</p><p> break;</p><p> case MediaBrowserType.Episode:</p><p> query = query.Episode();</p><p> break;</p><p> case MediaBrowserType.Movie:</p><p> query = query.Movies();</p><p> break;</p><p> // Item Filters</p><p> case "Dislikes":</p><p> query = query.Filters(ItemFilter.Dislikes);</p><p> break;</p><p> case "Likes":</p><p> query = query.Filters(ItemFilter.Likes);</p><p> break;</p><p> case "Favorite":</p><p> query = query.Filters(ItemFilter.IsFavorite);</p><p> break;</p><p> case "Resumable":</p><p> query = query.Filters(ItemFilter.IsResumable);</p><p> break;</p><p> case "Watched":</p><p> query = query.Filters(ItemFilter.IsPlayed);</p><p> break;</p><p> case "Unwatched":</p><p> query = query.Filters(ItemFilter.IsUnplayed);</p><p> break;</p><p> // Presets and sorting</p><p> case "RecentlyPlayed":</p><p> query = query.SortBy(ItemSortBy.DatePlayed, ItemSortBy.SortName).Descending();</p><p> break;</p><p> case "RecentlyAdded":</p><p> query = query.SortBy(ItemSortBy.DateCreated, ItemSortBy.SortName).Descending();</p><p> break;</p><p> case "Random":</p><p> query = query.SortBy(ItemSortBy.Random);</p><p> break;</p><p> case "SortName":</p><p> query = query.SortBy(ItemSortBy.SortName);</p><p> break;</p><p> case "DatePlayed":</p><p> query = query.SortBy(ItemSortBy.DatePlayed);</p><p> break;</p><p> case "Ascending":</p><p> query = query.Ascending();</p><p> break;</p><p> case "Descending":</p><p> query = query.Descending();</p><p> break;</p><p> default:</p><p> Int32.TryParse(tokens[index], out limit);</p><p> break;[/code]</p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="Pog, post: 1078106, member: 97724"] Hey Wiz... I've had a look through the source and have experimented a bit. Armand has a "smart facade" system that allows you the query MB to build a MP facade control from any MP window. So if you use the following eg on your home screen you will see the latest added movies: [SPOILER="Latest Media Test"] [code] <control> <description>MediaBrowser.Query.TEST.RecentlyAdded.Movie.5</description> <type>facadeview</type> <id>450</id> <control> <description>Thumbnail Panel</description> <type>thumbnailpanel</type> <posX>400</posX> <posY>200</posY> <width>1000</width> <height>400</height> <!-- Small Icons 0.66 aspect ratio --> <itemWidth>150</itemWidth> <itemHeight>217</itemHeight> <textureWidth>150</textureWidth> <textureHeight>216</textureHeight> <thumbWidth>135</thumbWidth> <thumbHeight>202</thumbHeight> <thumbPosX>7</thumbPosX> <thumbPosY>7</thumbPosY> <!-- Large Icons 0.66 aspect ratio --> <textureWidthBig>228</textureWidthBig> <textureHeightBig>319</textureHeightBig> <itemWidthBig>226</itemWidthBig> <itemHeightBig>316</itemHeightBig> <thumbWidthBig>204</thumbWidthBig> <thumbHeightBig>294</thumbHeightBig> <thumbPosXBig>12</thumbPosXBig> <thumbPosYBig>12</thumbPosYBig> <imageFolderFocus>thumbborder3.png</imageFolderFocus> <font>font12</font> <suffix>|</suffix> <thumbZoom>yes</thumbZoom> <enableFocusZoom>no</enableFocusZoom> <keepaspectratio>no</keepaspectratio> </control> </control> [/code] [/SPOILER] You can change the description to whatever query you need: <description>MediaBrowser.Query.TEST.RecentlyAdded.Movie.5</description> You can also use multiple facades, just repeat the code and change the "TEST" to the name you want (also use unique control ID). Here is what I pulled from Armands source. You can follow the type of query you want to put together from this: [SPOILER="MB source query part"] [code] while (index < tokens.Length) { // MediaBrowser.Query.CustomIdentifier.Parameter1.Parameter2.Etc (.Limit as int) // Skin properties published are prefixed with: #MediaBrowser.Query.CustomIdentifier (.Loading, .Selected) // // examples: // MediaBrowser.Query.MyDashboardQuery.RecentlyAdded.Movie.3 (shows 3 movies that were recently added) // MediaBrowser.Query.MyDashboardQuery.Random.Movie.5 (shows 5 random movies) // MediaBrowser.Query.MyDashboardQuery.RecentlyAdded.Episode.Unwatched.8 (shows 8 episodes that were recently added and unwatched) switch (tokens[index]) { // Item Types case MediaBrowserType.MusicAlbum: query = query.MusicAlbum(); break; case MediaBrowserType.Audio: query = query.Audio(); break; case MediaBrowserType.Series: query = query.Series(); break; case MediaBrowserType.Season: query = query.Season(); break; case MediaBrowserType.Episode: query = query.Episode(); break; case MediaBrowserType.Movie: query = query.Movies(); break; // Item Filters case "Dislikes": query = query.Filters(ItemFilter.Dislikes); break; case "Likes": query = query.Filters(ItemFilter.Likes); break; case "Favorite": query = query.Filters(ItemFilter.IsFavorite); break; case "Resumable": query = query.Filters(ItemFilter.IsResumable); break; case "Watched": query = query.Filters(ItemFilter.IsPlayed); break; case "Unwatched": query = query.Filters(ItemFilter.IsUnplayed); break; // Presets and sorting case "RecentlyPlayed": query = query.SortBy(ItemSortBy.DatePlayed, ItemSortBy.SortName).Descending(); break; case "RecentlyAdded": query = query.SortBy(ItemSortBy.DateCreated, ItemSortBy.SortName).Descending(); break; case "Random": query = query.SortBy(ItemSortBy.Random); break; case "SortName": query = query.SortBy(ItemSortBy.SortName); break; case "DatePlayed": query = query.SortBy(ItemSortBy.DatePlayed); break; case "Ascending": query = query.Ascending(); break; case "Descending": query = query.Descending(); break; default: Int32.TryParse(tokens[index], out limit); break;[/code] [/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
[Plugin] MediaBrowser for MediaPortal (v0.30-beta) [2014/08/20]
Contact us
RSS
Top
Bottom