-
Notifications
You must be signed in to change notification settings - Fork 277
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
Vueify add show options #4848
Vueify add show options #4848
Conversation
@@ -563,5 +570,5 @@ Vue.use(VueNativeSock, websocketUrl, { | |||
reconnectionAttempts: 2, // (Number) number of reconnection attempts before giving up (Infinity), | |||
reconnectionDelay: 1000 // (Number) how long to initially wait before attempting a new (1000) | |||
}); | |||
|
|||
debugger; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -0,0 +1,258 @@ | |||
<template> |
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.
Notice you added that SFC to light and dark themes, it is no longer needed, so just remove the files and be sure to merge develop.
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 noticed your pr
|
||
const { providedInfo } = this; | ||
const { use, showId, showDir } = providedInfo; | ||
if (use && showId !== 0 && showDir) { |
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.
Don't remove this part please, it is used to automatically go to the options section when you are adding a show from a folder, with provided metadata from tvshow.nfo
Also use the normal loadsection as I did below and not the new method, because you do want it to go to the last section.
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 on mobile so not the best review, sorry in advance
medusa/server/api/v2/config.py
Outdated
section_data['default']['statusAfter'] = common.statusStrings[app.STATUS_DEFAULT_AFTER] | ||
section_data['default']['seasonFolders'] = app.SEASON_FOLDERS_DEFAULT | ||
section_data['default']['anime'] = app.ANIME_DEFAULT | ||
section_data['default']['scene'] = app.SCENE_DEFAULT |
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.
Not sure if default is the most descriptive name. Maybe showDefaults? Open to discussion of course...
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 think showDefaults is also fine.
@@ -37,7 +37,7 @@ module.exports = { | |||
}, | |||
data() { | |||
return { | |||
localChecked: null | |||
localChecked: null, |
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.
You could just revert this change
formData.append('subtitles', subtitles ? '1' : '0'); | ||
formData.append('anime', anime ? '1' : '0'); | ||
formData.append('scene', scene ? '1' : '0'); | ||
formData.append('season_folders', seasonFolder ? '1' : '0'); |
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.
All of these can use Number(value)
instead of the conditionals, however it should (need to check add_shows.py code) also be working with any truthy value, and I think supplying booleans is the best option in the long term.
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.
Yeah I'd also rather pass booleans. And have the backend translate (as late as possible). Which in the long term should be done by the ORM, when there is no other way supported by db engine.
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.
Changed them to Number(subtitles).. etc.
formData.append('blacklist', name); | ||
} | ||
|
||
const statusToDesc = { 'Wanted': 3, 'Skipped': 5, 'Ignored': 7 } |
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.
There's a module in the store dedicated specifically for those, statuses
, please use it instead of hardcoded values in javascript. We should only hardcode in Python.
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.
No idea how to use that, sorry.
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.
this.$store.state.statuses
I think?
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.
Look good overall. 👍
import ConfigToggleSlider from './config-toggle-slider.vue'; | ||
import AnidbReleaseGroupUi from './anidb-release-group-ui.vue'; | ||
|
||
module.exports = { |
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.
Should be export default {
.
AnidbReleaseGroupUi, | ||
ConfigToggleSlider | ||
}, | ||
props: ['selectedShow'], |
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.
Needs type and possibly default.
}, | ||
selectedSceneEnabled() { | ||
this.update(); | ||
}, |
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.
These should be moved to mounted
with something like this.
this.$watch(vm => [
vm.selectedAnimeEnabled,
vm.selectedStatus,
vm.selectedStatusAfter,
vm.selectedSeasonFolderEnabled,
vm.selectedSceneEnabled
].join(), () => {
this.update()
});
@@ -212,13 +226,33 @@ window.app = new Vue({ | |||
} | |||
|
|||
// Converts select boxes to command separated values [js/blackwhite.js] | |||
generateBlackWhiteList(); // eslint-disable-line no-undef | |||
//generateBlackWhiteList(); // eslint-disable-line no-undef |
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.
Remember to add/remove this before merge.
|
||
formData = new FormData(this.$refs.addShowForm); | ||
} | ||
|
||
this.otherShows.forEach(nextShow => formData.append('other_shows', nextShow)); | ||
|
||
// Because we're using te toggle-button.vue component, we don't have valid form input's for these. |
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.
Missing "h" in "the".
This comment has been minimized.
This comment has been minimized.
54b5c7c
to
d2770ae
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d2770ae
to
2633509
Compare
This comment has been minimized.
This comment has been minimized.
@sharkykh pretty sure there's still the issue of hitting "search" while a search is going just cancels instead of starting the new one. |
@OmgImAlexis That's the first time I'm reading about it... On |
@sharkykh it's been there for a while now. If you click the "search" again it works. Pretty sure master has the same issue. |
* Make addShows_newShow.mako use the component to configure the new shows options and send the options when adding a new show. * Fix anidb-release-group-ui.vue, update the data when property get's updated after mount. * Fix config-textbox, config-textbox-number.vue, config-toggle-slider.vue. * Update config.py, make sure the status and statusAfter are send as Strings not the numbers.
* Clicking enter triggered saving add show defaults * Clicking enter triggered native form submission
bcc9f6a
to
d2fd220
Compare
This comment has been minimized.
This comment has been minimized.
The original `addShowOptions` had that, this should too. + Add comment that the `QualityChooser` component should be imported
@p0psicles About that last "to-do", is it just you want to handle errors when calling |
More like what i recently implemented. Its not relevant anymore |
- Add notification about error getting release groups - Remove commented out notification
Lets merge? |
Sure, hopefully I didn't miss anything big. |
Faster we merge faster we notice. |
Tnx for your help @sharkykh |
Fixes #4838
Fixes #4525
TODO:
add-show-options.vue
componentaddShows_newShow.mako
to use the new componentTo properly use black/white lists from anidb, we need merge another PR, where I implemented dogpile caching for the anidb udp api.A followup (new PR) will be to change all other pages, that use inc_addShowOptions.mako.