Merge pull request #724 from Tensre/master

Auto-Organize Copy/Move Option, Fix for Overwrite Existing File
This commit is contained in:
Luke 2014-03-06 00:06:06 -05:00
commit 8e0352c4b1
2 changed files with 13 additions and 0 deletions

View File

@ -143,6 +143,14 @@
</div>
<br />
<ul data-role="listview" class="ulForm">
<li>
<label for="txtDeleteLeftOverFiles">Episode Copy/Move </label>
<select name="copyOrMoveFile" id="copyOrMoveFile" data-mini="true">
<option value="true">Copy</option>
<option value="false">Move</option>
</select>
<div class="fieldDescription">Copy or move files from the "Watch Folder"</div>
</li>
<li>
<input type="checkbox" id="chkOverwriteExistingEpisodes" name="chkOverwriteExistingEpisodes" />
<label for="chkOverwriteExistingEpisodes">Overwrite existing episodes</label>

View File

@ -71,6 +71,9 @@
$('#txtMultiEpisodePattern', page).val(tvOptions.MultiEpisodeNamePattern).trigger('change');
$('#txtDeleteLeftOverFiles', page).val(tvOptions.LeftOverFileExtensionsToDelete.join(';'));
$('#copyOrMoveFile', page).val(tvOptions.CopyOriginalFile.toString()).selectmenu('refresh');
}
$(document).on('pageinit', "#libraryFileOrganizerPage", function () {
@ -150,6 +153,8 @@
var watchLocation = $('#txtWatchFolder', form).val();
tvOptions.WatchLocations = watchLocation ? [watchLocation] : [];
tvOptions.CopyOriginalFile = $('#copyOrMoveFile', form).val();
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
});