Permalink
Browse files

Update size encoding slug after merging new and loaded backgrounds

  • Loading branch information...
dconnolly committed Jul 29, 2014
1 parent fe1c267 commit 6f0df61c8452d74d09ff1727ee382bef7f7af3c1
Showing with 10 additions and 11 deletions.
  1. +10 −11 cli.js
21 cli.js
@@ -112,17 +112,6 @@ if (options.help) {
console.log(chalk.underline('Parsing Chromecast Home...\n'));

getChromecastBackgrounds().then(function(backgrounds) {
if (options.size || options.width || options.height) {
console.log(
chalk.underline('Updating dimensions (size:%d, width:%d, height:%d)'),
options.size, options.width, options.height);
updateDimensions(backgrounds,
options.size,
options.width,
options.height,
options.crop);
}

if (options.load) {
console.log(chalk.underline('Loading previous backgrounds from', options.load));
var backgroundsFromJSON = JSON.parse(read(options.load, 'utf8'));
@@ -134,6 +123,16 @@ getChromecastBackgrounds().then(function(backgrounds) {
console.log(chalk.green(String(newCount) + ' new backgrounds!'));
}
}
if (options.size || options.width || options.height) {
console.log(
chalk.underline('Updating dimensions (size:%d, width:%d, height:%d)'),
options.size, options.width, options.height);
updateDimensions(backgrounds,
options.size,
options.width,
options.height,
options.crop);
}
if (options.save) {
console.log(chalk.underline('Writing backgrounds JSON to', options.save));
saveObjectToFile(options.save, backgrounds);

0 comments on commit 6f0df61

Please sign in to comment.