-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Series.to_json()
and ShowHeader
#6901
Conversation
…, get_scene_numbering_for_show, get_xem_absolute_numbering_for_show and get_xem_numbering_for_show to Series.to_json(). * Separated getting all episodes from detailed into the episodes param. * Added seasonCount to general section.
* show.vue now will get the episodes using the episodes param, in stead of using the detailed flag.
show.seasons is still used for the status buttons.
As it's still required for the show-header (xemNumbering).
Reminder to update api-spec with series in: query params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you're not done, but still...
After reading my review, if choose to not change the structure of show.seasonCount
to a list / an array,
then I suggest creating a computed property for Object.keys(show.seasonCount)
.
Though And if you want to ensure the season order on jumpToSeason
, you should just use show.seasons
.
Co-Authored-By: sharkykh <[email protected]>
Co-Authored-By: sharkykh <[email protected]>
…pymedusa/Medusa into feature/update-tv-series-tojson
Update api-description for new show.seasons structure.
…of dicts. Now also used for seasonCount. And other Series.to_json properties, that need to be converted.
* Updated show-header. * Updated test\__fixtures * Updated api-description Rebuild bundles.
@@ -2060,7 +2083,7 @@ def __unicode__(self): | |||
to_return += u'anime: {0}\n'.format(self.is_anime) | |||
return to_return | |||
|
|||
def to_json(self, detailed=True): | |||
def to_json(self, detailed=False, episodes=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reasoning to have this False by default. Is that I want to have a minimal call to the series object by default. If you need more detailed info you have to opt-in.
I'm leaving this to you shark. feel free to merge |
Series.to_json()
Series.to_json()
and ShowHeader
e839da4
to
babf421
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaving this to you shark. feel free to merge
@p0psicles
I don't have write access, so you feel free to merge, if you're okay with my latest changes. 😉
* @param {...any} values - Values to check. | ||
* @returns {any} - The first item that fits the criteria, `undefined` otherwise. | ||
*/ | ||
const resolveToValue = (...values) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that this can be in ./src/utils/core.js
, but for now I don't think we'll need to use it in a lot of places... it's only temporary anyway, as we probably won't be using query params to pass data into this component.
I have a branch that adds that to utils
, with tests as well, in case we need it.
To remove weight from #6709
Series.to_json()
:show.seasons
(closes API: Changeshow.seasons
structure #5121)/api/v2/series
route:episodes
param to/api/v2/series
.detailed
query param toFalse
.show.seasonCount
to render theseasonJump
.show.seasons
is still used for the status buttons.jumpToSeason
&season=0&episode=(any)
, or a season search)jumpToSeason
scrolling. It's still not perfect but it's better than it was(<@sharkykh> wasn't scrolling smoothly for me)
<font>
)