Skip to content
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 config-postprocessing #4259

Merged
merged 99 commits into from
Aug 1, 2018
Merged
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
730e36f
Moved over files from search templates pr.
p0psicles May 27, 2018
caa609e
Renamed some of the postProcessing naming variabls in api/v2/config.py
p0psicles May 30, 2018
60075c2
Added full name-pattern support to postProcessing.
p0psicles May 30, 2018
bde8190
Merge remote-tracking branch 'remotes/origin/develop' into feature/vu…
p0psicles May 30, 2018
3bcf911
Add covert to namespace main.mako.
p0psicles May 30, 2018
68b041c
Update examples when switching multi ep style.
p0psicles May 30, 2018
ea75a25
make the 'enabled' property for name-pattern default true.
p0psicles Jun 18, 2018
31221ad
Remove the saved-message component. As that's not used anymore.
p0psicles Jun 18, 2018
45b9823
Merge remote-tracking branch 'remotes/origin/develop' into feature/vu…
p0psicles Jun 18, 2018
383a57a
Moved convert method to inc_defs.mako
p0psicles Jun 18, 2018
6edf0cc
Moved all checkboxes for the post processing tab to the toggle-button…
p0psicles Jun 18, 2018
d7e0460
Migrated the rest of the post-processing tab.
p0psicles Jun 18, 2018
f575f92
Move config items to DataGenerator class.
p0psicles Jun 25, 2018
9ec87d7
Sync light theme
p0psicles Jun 25, 2018
45a126f
Move convert method from main.mako to inc_defs.mako.
p0psicles Jun 25, 2018
eba9e60
Update name-pattern. Need to overwrite from develop.
p0psicles Jun 25, 2018
a0d291c
Further implement/vueify the first tab 'post processing'.
p0psicles Jun 25, 2018
0386be4
Merge remote-tracking branch 'remotes/origin/develop' into feature/vu…
p0psicles Jun 25, 2018
0edbc0d
Merge remote-tracking branch 'remotes/origin/develop' into feature/vu…
p0psicles Jun 25, 2018
9efa455
Gulp sync
p0psicles Jun 25, 2018
074204e
Update package.json
p0psicles Jun 25, 2018
5dbd680
cleanup the responsiveness of the name-pattern, episode naming tab.
p0psicles Jun 25, 2018
5ded906
Update store.js for postProcessing.
p0psicles Jul 10, 2018
cb9433a
Add postProcessing fields to config patching.
p0psicles Jul 10, 2018
fefb78d
Fix mako convert method, after rebasing.
p0psicles Jul 10, 2018
484e000
Update config_postProcessing.mako, use store values.
p0psicles Jul 10, 2018
5709c1e
Add csv-enabled flag
p0psicles Jul 10, 2018
79eb41b
Add watch instead of the created method.
p0psicles Jul 10, 2018
c4fbf86
Merge remote-tracking branch 'remotes/origin/feature/vueify-postproce…
p0psicles Jul 10, 2018
544b9a7
Add csv-enabled flag, to start with the csv list.
p0psicles Jul 11, 2018
3016368
Fix updating select-list list-items.
p0psicles Jul 11, 2018
982077e
Added apiv2 route /api/v2/config/metadata
p0psicles Jul 11, 2018
3cab017
Fix a number of postProcessing apiv2 fields.
p0psicles Jul 12, 2018
70d0aaf
Fix store.js, add support for metadata section.
p0psicles Jul 12, 2018
6cdd5e6
Remove watch on local fields.
p0psicles Jul 12, 2018
e812259
Fix updating and storing of the naming tab.
p0psicles Jul 12, 2018
7533627
iteritems is not used anymore.
p0psicles Jul 12, 2018
f3db0b9
Patch metadata using the class MetadataStructureField.
p0psicles Jul 15, 2018
2a56271
Remove watches from name-pattern.mako
p0psicles Jul 15, 2018
22ade75
Fixed metadata tab.
p0psicles Jul 15, 2018
23aeae5
Merge remote-tracking branch 'remotes/origin/develop' into feature/vu…
p0psicles Jul 15, 2018
a70baf0
Removed newline.
p0psicles Jul 15, 2018
3b790e1
Remove stray print.
p0psicles Jul 19, 2018
d112f15
Remove duplicate keys.
p0psicles Jul 19, 2018
2173b17
Move name-pattern.mako to VueLoader.
p0psicles Jul 19, 2018
86f0ecd
Add name-pattern.vue.
p0psicles Jul 19, 2018
1168d07
Merge remote-tracking branch 'origin/develop' into feature/vueify-pos…
p0psicles Jul 21, 2018
25a6e36
Sync changes after resolving merge conflicts, from up-merging develop.
p0psicles Jul 21, 2018
7d4148a
Fix some more rebase conflicts.
p0psicles Jul 21, 2018
2820bc4
Removed duplicate key logDir.
p0psicles Jul 21, 2018
0c5d95f
Fix name-pattern.vue component.
p0psicles Jul 21, 2018
e6d5a19
fix issue
OmgImAlexis Jul 21, 2018
abf3e90
Added initial (not-working) ava snapshot test.
p0psicles Jul 21, 2018
6d25eeb
Fixed duplicate key in config.py.
p0psicles Jul 21, 2018
e10b446
Replace double quotes.
p0psicles Jul 24, 2018
cf55529
Merge remote-tracking branch 'remotes/origin/develop' into feature/vu…
p0psicles Jul 24, 2018
22eb092
Fix name-pattern.spec.js snapshot test.
p0psicles Jul 24, 2018
cc06ed5
Merge remote-tracking branch 'remotes/origin/develop' into feature/vu…
p0psicles Jul 27, 2018
3beb164
sync themes
OmgImAlexis Jul 27, 2018
4943bdc
Use multiEpStrings from state instead of mako templating.
p0psicles Jul 27, 2018
8e7c073
Update api description for postProcessing and config sections.
p0psicles Jul 27, 2018
2e1be0b
Replaced multiEpStrings mako with apiv2 values.
p0psicles Jul 27, 2018
28470ef
Fix flake warnings.
p0psicles Jul 27, 2018
814732d
Remove name-pattern.vue from the xo linting exclude list.
p0psicles Jul 27, 2018
93ecb13
Fix xo vue linting for name-pattern.vue
p0psicles Jul 28, 2018
d632d98
Add default values for multiEp and multiEpStrings to store.js
p0psicles Jul 28, 2018
e259669
Fix showing the preset examples instead of the preset patterns.
p0psicles Jul 28, 2018
ab7ca50
Merge remote-tracking branch 'remotes/origin/develop' into feature/vu…
p0psicles Jul 28, 2018
aaa8b45
Updated CHANGELOG.md.
p0psicles Jul 28, 2018
a81ac90
Fixed ava snaptest test for name-pattern.vue
p0psicles Jul 28, 2018
5dbe23a
Fixed indentation on some jsDocs.
p0psicles Jul 28, 2018
ce4978e
Fixed travis import order.
p0psicles Jul 28, 2018
4e763ba
Fix duplicate key in dredd test.
p0psicles Jul 28, 2018
b0b4a69
Remove old `.js.map` files
sharkykh Jul 28, 2018
39e14b4
Remove unused `anidb-release-group-ui` import
sharkykh Jul 28, 2018
fd57485
editShow: Remove unused imports
sharkykh Jul 28, 2018
b06e62d
Merge branch 'feature/vueify-postprocessing' of https://github.com/py…
sharkykh Jul 28, 2018
cc1f43d
Fix xo linting.
p0psicles Jul 28, 2018
1cd49bd
Remove `convert(obj)` from `inc_defs.mako`
sharkykh Jul 28, 2018
3c8f5be
Merge branch 'develop' into feature/vueify-postprocessing
sharkykh Jul 28, 2018
8c67fc9
Revert change to `DataGenerator.sections`
sharkykh Jul 28, 2018
4fb1f5b
Revert unrelated change the recommended shows
sharkykh Jul 28, 2018
65b4698
Revert unnecessary changes
sharkykh Jul 28, 2018
f154df2
Lint
sharkykh Jul 28, 2018
a0348dc
Fix missing data dir
sharkykh Jul 28, 2018
a0e8060
Trim "savePostProcessing", add "to do"
sharkykh Jul 28, 2018
83701af
Correct JSDoc closing
sharkykh Jul 28, 2018
66f99f4
NamePattern: Increase timeout
sharkykh Jul 28, 2018
33b576c
Fix absolute number types descriptions
sharkykh Jul 29, 2018
988901a
* move .then to end of line.
p0psicles Jul 29, 2018
c2791b0
Sync themes.
p0psicles Jul 29, 2018
4ff4306
Use computed for isMulti, as per review.
p0psicles Jul 29, 2018
8256a96
Wait for all the properties (data send from parent) before starting t…
p0psicles Jul 29, 2018
c6b8e44
Remove unused method.
p0psicles Jul 29, 2018
3717fde
Fix lint warning.
p0psicles Jul 29, 2018
3271788
Add component-group-desc-legacy to keep the min width of 200px. For p…
p0psicles Jul 31, 2018
4a3b684
Separated first tab of config_postProcessing into scheduled and gener…
p0psicles Jul 31, 2018
ae98773
Fixed type (while / will).
p0psicles Jul 31, 2018
469ea8f
Fix pytest to 3.6.4.
p0psicles Jul 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Unreleased

#### Fixes

#### New Features

#### Improvements
- Converted /config/postProcessing to a Vue component ([#4259](https://github.com/pymedusa/Medusa/pull/4259))

-----

## 0.2.8 (2018-07-28)
1 change: 1 addition & 0 deletions medusa/server/api/v2/config.py
Original file line number Diff line number Diff line change
@@ -278,6 +278,7 @@ def data_main():
section_data['locale'] = '.'.join([text_type(loc or 'Unknown') for loc in app.LOCALE])
section_data['localUser'] = app.OS_USER or 'Unknown'
section_data['programDir'] = app.PROG_DIR
section_data['dataDir'] = app.DATA_DIR
section_data['configFile'] = app.CONFIG_FILE
section_data['dbPath'] = db.DBConnection().path
section_data['cacheDir'] = app.CACHE_DIR
63 changes: 9 additions & 54 deletions medusa/server/web/config/post_processing.py
Original file line number Diff line number Diff line change
@@ -39,24 +39,13 @@ def index(self):
return t.render(submenu=self.ConfigMenu(),
controller='config', action='postProcessing')

def savePostProcessing(self, kodi_data=None, kodi_12plus_data=None,
mediabrowser_data=None, sony_ps3_data=None,
wdtv_data=None, tivo_data=None, mede8er_data=None,
keep_processed_dir=None, process_method=None,
del_rar_contents=None, process_automatically=None,
no_delete=None, rename_episodes=None, airdate_episodes=None,
file_timestamp_timezone=None, unpack=None,
move_associated_files=None, sync_files=None,
postpone_if_sync_files=None, postpone_if_no_subs=None,
allowed_extensions=None, tv_download_dir=None,
create_missing_show_dirs=None, add_shows_wo_dir=None,
extra_scripts=None, nfo_rename=None,
naming_pattern=None, naming_multi_ep=None,
naming_custom_abd=None, naming_anime=None,
naming_abd_pattern=None, naming_strip_year=None,
naming_custom_sports=None, naming_sports_pattern=None,
naming_custom_anime=None, naming_anime_pattern=None,
naming_anime_multi_ep=None, autopostprocessor_frequency=None):
def savePostProcessing(self, process_automatically=None, unpack=None, allowed_extensions=None,
tv_download_dir=None, naming_pattern=None, naming_multi_ep=None,
naming_anime=None, naming_abd_pattern=None, naming_sports_pattern=None,
naming_anime_pattern=None, naming_anime_multi_ep=None,
autopostprocessor_frequency=None):

# @TODO: The following validations need to be incorporated into API v2 (PATCH /api/v2/config/main)

results = []

@@ -75,47 +64,13 @@ def savePostProcessing(self, kodi_data=None, kodi_12plus_data=None,
results.append('Unpacking Not Supported, disabling unpack setting')
else:
app.UNPACK = config.checkbox_to_value(unpack)
app.NO_DELETE = config.checkbox_to_value(no_delete)
app.KEEP_PROCESSED_DIR = config.checkbox_to_value(keep_processed_dir)
app.CREATE_MISSING_SHOW_DIRS = config.checkbox_to_value(create_missing_show_dirs)
app.ADD_SHOWS_WO_DIR = config.checkbox_to_value(add_shows_wo_dir)
app.PROCESS_METHOD = process_method
app.DELRARCONTENTS = config.checkbox_to_value(del_rar_contents)
app.EXTRA_SCRIPTS = [_.strip() for _ in extra_scripts.split('|') if _.strip()]
app.RENAME_EPISODES = config.checkbox_to_value(rename_episodes)
app.AIRDATE_EPISODES = config.checkbox_to_value(airdate_episodes)
app.FILE_TIMESTAMP_TIMEZONE = file_timestamp_timezone
app.MOVE_ASSOCIATED_FILES = config.checkbox_to_value(move_associated_files)
app.SYNC_FILES = [_.strip() for _ in sync_files.split(',') if _.strip()]
app.POSTPONE_IF_SYNC_FILES = config.checkbox_to_value(postpone_if_sync_files)
app.POSTPONE_IF_NO_SUBS = config.checkbox_to_value(postpone_if_no_subs)

# @TODO: postprocessor for `POSTPONE_IF_NO_SUBS` and `ALLOWED_EXTENSIONS` ?
# If 'postpone if no subs' is enabled, we must have SRT in allowed extensions list
if app.POSTPONE_IF_NO_SUBS:
allowed_extensions += ',srt'
# # Auto PP must be disabled because FINDSUBTITLE thread that calls manual PP (like nzbtomedia)
# app.PROCESS_AUTOMATICALLY = 0
app.ALLOWED_EXTENSIONS = {_.strip() for _ in allowed_extensions.split(',') if _.strip()}
app.NAMING_CUSTOM_ABD = config.checkbox_to_value(naming_custom_abd)
app.NAMING_CUSTOM_SPORTS = config.checkbox_to_value(naming_custom_sports)
app.NAMING_CUSTOM_ANIME = config.checkbox_to_value(naming_custom_anime)
app.NAMING_STRIP_YEAR = config.checkbox_to_value(naming_strip_year)
app.NFO_RENAME = config.checkbox_to_value(nfo_rename)

app.METADATA_KODI = kodi_data.split('|')
app.METADATA_KODI_12PLUS = kodi_12plus_data.split('|')
app.METADATA_MEDIABROWSER = mediabrowser_data.split('|')
app.METADATA_PS3 = sony_ps3_data.split('|')
app.METADATA_WDTV = wdtv_data.split('|')
app.METADATA_TIVO = tivo_data.split('|')
app.METADATA_MEDE8ER = mede8er_data.split('|')

app.metadata_provider_dict['KODI'].set_config(app.METADATA_KODI)
app.metadata_provider_dict['KODI 12+'].set_config(app.METADATA_KODI_12PLUS)
app.metadata_provider_dict['MediaBrowser'].set_config(app.METADATA_MEDIABROWSER)
app.metadata_provider_dict['Sony PS3'].set_config(app.METADATA_PS3)
app.metadata_provider_dict['WDTV'].set_config(app.METADATA_WDTV)
app.metadata_provider_dict['TIVO'].set_config(app.METADATA_TIVO)
app.metadata_provider_dict['Mede8er'].set_config(app.METADATA_MEDE8ER)

if self.isNamingValid(naming_pattern, naming_multi_ep, anime_type=naming_anime) != 'invalid':
app.NAMING_PATTERN = naming_pattern
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ def run_tests(self):
'flake8-quotes',
'pep8-naming',
'pycodestyle==2.3.1',
'pytest',
'pytest==3.6.4',
'pytest-cov',
'pytest-flake8',
'pytest-tornado5',
1 change: 1 addition & 0 deletions tests/apiv2/test_config.py
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@ def config_main(monkeypatch, app_config):
config_data['locale'] = app_locale
config_data['localUser'] = os_user
config_data['programDir'] = app.PROG_DIR
config_data['dataDir'] = app.DATA_DIR
config_data['configFile'] = app.CONFIG_FILE
config_data['dbPath'] = db.DBConnection().path
config_data['cacheDir'] = app.CACHE_DIR
6 changes: 3 additions & 3 deletions themes-default/slim/package.json
Original file line number Diff line number Diff line change
@@ -119,15 +119,15 @@
"webRoot",
"apiRoot",
"apiKey",
"Vuex"
"Vuex",
"dateFns"
],
"ignores": [
"static/js/lib/**",
"static/js/*.min.js",
"static/js/vender.js",
"build/**",
"gulpfile.js",
"static/js/templates/name-pattern.vue"
"gulpfile.js"
],
"esnext": true
},
1 change: 0 additions & 1 deletion themes-default/slim/static/css/dark.css
Original file line number Diff line number Diff line change
@@ -464,7 +464,6 @@ config*.mako
.component-group {
padding: 15px 15px 25px;
border-bottom: 1px dotted rgb(85, 85, 85);
min-height: 200px;
}

.component-group-desc p {
58 changes: 52 additions & 6 deletions themes-default/slim/static/css/style.css
Original file line number Diff line number Diff line change
@@ -1972,20 +1972,24 @@ config*.mako
.component-group {
padding: 15px 15px 25px;
border-bottom: 1px dotted rgb(204, 204, 204);
min-height: 200px;
min-height: 100px;
}

.component-item {
border-bottom: 1px dotted rgb(102, 102, 102);
min-height: 200px;
}

.component-group-desc {
.component-group-desc-legacy {
margin-top: 5px;
float: left;
width: 250px;
}

.component-group-desc {
margin-top: 5px;
}

.component-group-desc h3 {
margin-top: 5px;
}
@@ -2035,10 +2039,6 @@ config*.mako
margin-right: 10px;
}

#config .metadataDiv {
display: none;
}

.component-group-save {
float: right;
padding-top: 10px;
@@ -2961,6 +2961,11 @@ fieldset[disabled] .navbar-default .btn-link:focus {
width: auto;
}

.form-control-inline-max {
display: inline;
width: 100%;
}

.input-sm-smallfont {
font-size: 11px;
}
@@ -3384,6 +3389,42 @@ input sizing (for config pages)
margin-top: -4px;
}

/* Added max-width, as setting width is really not optimal on smaller viewports */
.max-input75 {
max-width: 75px;
margin-top: -4px;
}

.max-input100 {
max-width: 100px;
margin-top: -4px;
}

.max-input150 {
max-width: 150px;
margin-top: -4px;
}

.max-input200 {
max-width: 200px;
margin-top: -4px;
}

.max-input250 {
max-width: 250px;
margin-top: -4px;
}

.max-input300 {
max-width: 300px;
margin-top: -4px;
}

.max-input350 {
max-width: 350px;
margin-top: -4px;
}

select.input-sm {
font-size: 0.9em;
}
@@ -4333,3 +4374,8 @@ CSS helper classes
display: block;
}
*/

/* These classes should be natively available in bootstrap 4 */
.d-block {
display: block;
}
1 change: 1 addition & 0 deletions themes-default/slim/static/js/store.js
Original file line number Diff line number Diff line change
@@ -93,6 +93,7 @@ const store = new Store({
minor: null
},
programDir: null,
dataDir: null,
animeSplitHomeInTabs: null,
torrents: {
authType: null,
Loading