Skip to content

Commit

Permalink
Add form fields for --def movieDB and --def seriesDB and --def animeDB
Browse files Browse the repository at this point in the history
  • Loading branch information
rednoah committed Feb 21, 2022
1 parent 9ea9a5a commit bc0fc7c
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 2 deletions.
15 changes: 15 additions & 0 deletions client-extjs/app/store/MovieDatabases.js
@@ -0,0 +1,15 @@
Ext.define('FileBot.store.MovieDatabases', {
extend: 'Ext.data.ArrayStore',
alias: 'store.movie-databases',
storeId: 'movie-databases',

fields: [
'id', 'value', 'label'
],

data: [
[1, '', 'default'],
[2, 'TheMovieDB', 'TheMovieDB'],
[3, 'OMDb', 'OMDb']
]
});
17 changes: 17 additions & 0 deletions client-extjs/app/store/SeriesDatabases.js
@@ -0,0 +1,17 @@
Ext.define('FileBot.store.SeriesDatabases', {
extend: 'Ext.data.ArrayStore',
alias: 'store.series-databases',
storeId: 'series-databases',

fields: [
'id', 'value', 'label'
],

data: [
[1, '', 'default'],
[2, 'TheMovieDB::TV', 'TheMovieDB'],
[3, 'AniDB', 'AniDB'],
[4, 'TheTVDB', 'TheTVDB'],
[5, 'TVmaze', 'TVmaze']
]
});
53 changes: 51 additions & 2 deletions client-extjs/app/view/task/Task.js
Expand Up @@ -23,7 +23,9 @@ Ext.define('FileBot.view.task.Task', {
'FileBot.store.FileAgeFilters',
'FileBot.store.Languages',
'FileBot.store.ConflictActions',
'FileBot.store.ScriptSources'
'FileBot.store.ScriptSources',
'FileBot.store.MovieDatabases',
'FileBot.store.SeriesDatabases'
],

xtype: 'section-task',
Expand Down Expand Up @@ -368,7 +370,7 @@ Ext.define('FileBot.view.task.Task', {
emptyText: 'Unsorted/{f.structurePathTail}'
}]
}, {
title: 'Media Center Options',
title: 'Post Processing Options',
defaults: {
allowBlank: true,
xtype: 'textfield',
Expand Down Expand Up @@ -417,6 +419,53 @@ Ext.define('FileBot.view.task.Task', {
editable: true,
anchor: '100%'
}]
}, {
title: 'Database Options',
defaults: {
allowBlank: true,
forceSelection: true,
queryMode: 'local'
},
items: [{
xtype: 'combobox',
name: 'movieDB',
fieldLabel: 'Movie Database',
labelStyle: 'white-space: nowrap; width: 120px;',
displayField: 'label',
valueField: 'value',
value: '',
store: {
type: 'movie-databases'
},
editable: false,
minWidth: 320
}, {
xtype: 'combobox',
name: 'seriesDB',
fieldLabel: 'Series Database',
labelStyle: 'white-space: nowrap; width: 120px;',
displayField: 'label',
valueField: 'value',
value: '',
store: {
type: 'series-databases'
},
editable: false,
minWidth: 320
}, {
xtype: 'combobox',
name: 'animeDB',
fieldLabel: 'Anime Database',
labelStyle: 'white-space: nowrap; width: 120px;',
displayField: 'label',
valueField: 'value',
value: '',
store: {
type: 'series-databases'
},
editable: false,
minWidth: 320
}]
}, {
title: 'Developer Options',
defaults: {
Expand Down
3 changes: 3 additions & 0 deletions server-nodejs/app.js
Expand Up @@ -154,6 +154,9 @@ function getCommandArguments(options) {
if (options.animeFormat) args.push('animeFormat=' + options.animeFormat)
if (options.movieFormat) args.push('movieFormat=' + options.movieFormat)
if (options.musicFormat) args.push('musicFormat=' + options.musicFormat)
if (options.movieDB) args.push('movieDB=' + options.movieDB)
if (options.seriesDB) args.push('seriesDB=' + options.seriesDB)
if (options.animeDB) args.push('animeDB=' + options.animeDB)
if (options.unsortedFormat) args.push('unsortedFormat=' + options.unsortedFormat)
if (options.excludeList) args.push('excludeList=' + options.excludeList)
args.push('--apply')
Expand Down

0 comments on commit bc0fc7c

Please sign in to comment.