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 2
Plugin Development
Get every episode from a Season
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="FreakyJ" data-source="post: 1154945" data-attributes="member: 106003"><p>I can agree with this <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p></p><p>If you take a look here: <a href="http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/17_Extensions/Remote_Access/MPExtended/Developers/API_Documentation/MAS" target="_blank">http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/17_Extensions/Remote_Access/MPExtended/Developers/API_Documentation/MAS</a></p><p>The API has a Id's for seasons and Shows. MP2 doesn't really (yet). So if one requests all episodes for a season, I get the id for the Season item in M_MEDIAITEM.</p><p>Now there is no link to the episodes, that's why I have to pars the name and than take the season number to get the episodes.</p><p></p><p>And I think I just found a bug :/ Because it will return all episodes corresponding to a season number and not a special season.</p><p></p><p>So I need to create my own ID:</p><p>1) {seariesName<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite5" alt=":confused:" title="Confused :confused:" loading="lazy" data-shortname=":confused:" />eason} -> base64</p><p>2) {GUID-Seasies:GUID-Season}</p><p></p><p>I think I will go with option two. I meant more DB requests, but I think it will have less errors, because GUIDs don't contain ":", names could.</p><p></p><p></p><p>Actually I use both. I called it MicroModules. and every Api part (e.g. <span style="font-size: 12px"><strong>GetTVEpisodeCountForTVShow </strong>) has it's own micro module. And a lot of these use id's. That's why I put the GUID parsing in it's own function, but sometimes I also get the GUID from MP directly. I hope that makes sense <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></span></p><p></p><p><span style="font-size: 12px">I use your method <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></span></p><p></p><p><span style="font-size: 12px">[CODE=C#]{"GetMediaItem", new GetMediaItem()},</span></p><p><span style="font-size: 12px"> { "TestConnection", new TestConnection()},</span></p><p><span style="font-size: 12px"> // TvShow</span></p><p><span style="font-size: 12px"> { "GetTVEpisodeBasicById", new GetTVEpisodeBasicById()},</span></p><p><span style="font-size: 12px"> { "GetTVEpisodeCountForSeason", new GetTVEpisodeCountForSeason()},</span></p><p><span style="font-size: 12px"> { "GetTVEpisodeCountForTVShow", new GetTVEpisodeCountForTVShow()},</span></p><p><span style="font-size: 12px"> { "GetTVEpisodeDetailedById", new GetTVEpisodeDetailedById()},</span></p><p><span style="font-size: 12px"> { "GetTVEpisodesBasic", new GetTVEpisodesBasic()}[/CODE]</span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px">It is like a Switch: I registered a HTTP module for MPExtened this module routes the request to the submodules: MAS, SAS, ?? depending on the second part of the URL, e.g. "MediaAccessService".</span></p><p><span style="font-size: 12px">This module than sends the request depending on the last part of the url to one of the micromodules, it get's an answer (dynamic), parsis it with json and sends it to the client <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></span></p><p><span style="font-size: 12px"></span></p></blockquote><p></p>
[QUOTE="FreakyJ, post: 1154945, member: 106003"] I can agree with this :) If you take a look here: [URL]http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/17_Extensions/Remote_Access/MPExtended/Developers/API_Documentation/MAS[/URL] The API has a Id's for seasons and Shows. MP2 doesn't really (yet). So if one requests all episodes for a season, I get the id for the Season item in M_MEDIAITEM. Now there is no link to the episodes, that's why I have to pars the name and than take the season number to get the episodes. And I think I just found a bug :/ Because it will return all episodes corresponding to a season number and not a special season. So I need to create my own ID: 1) {seariesName:Season} -> base64 2) {GUID-Seasies:GUID-Season} I think I will go with option two. I meant more DB requests, but I think it will have less errors, because GUIDs don't contain ":", names could. Actually I use both. I called it MicroModules. and every Api part (e.g. [SIZE=3][B]GetTVEpisodeCountForTVShow [/B]) has it's own micro module. And a lot of these use id's. That's why I put the GUID parsing in it's own function, but sometimes I also get the GUID from MP directly. I hope that makes sense :)[/SIZE] [SIZE=3]I use your method :)[/SIZE] [SIZE=3][CODE=C#]{"GetMediaItem", new GetMediaItem()}, { "TestConnection", new TestConnection()}, // TvShow { "GetTVEpisodeBasicById", new GetTVEpisodeBasicById()}, { "GetTVEpisodeCountForSeason", new GetTVEpisodeCountForSeason()}, { "GetTVEpisodeCountForTVShow", new GetTVEpisodeCountForTVShow()}, { "GetTVEpisodeDetailedById", new GetTVEpisodeDetailedById()}, { "GetTVEpisodesBasic", new GetTVEpisodesBasic()}[/CODE] It is like a Switch: I registered a HTTP module for MPExtened this module routes the request to the submodules: MAS, SAS, ?? depending on the second part of the URL, e.g. "MediaAccessService". This module than sends the request depending on the last part of the url to one of the micromodules, it get's an answer (dynamic), parsis it with json and sends it to the client :) [/SIZE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Get every episode from a Season
Contact us
RSS
Top
Bottom