Skip to content

Commit

Permalink
Store thumbnails in user data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Jan 25, 2020
1 parent b2dff07 commit 6482810
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -1064,4 +1064,4 @@



generated the 25/1/2020
generated the 26/1/2020
4 changes: 0 additions & 4 deletions packages/app/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import App from './App';
import configureStore from './store/configureStore';
import { getOption, setOption } from './persistence/store';

logger.hookConsole({
renderer: true
});

setConfig({
showReactDomPatchNotification: false
});
Expand Down
7 changes: 2 additions & 5 deletions packages/main/src/services/local-library/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import uuid from 'uuid/v4';
import url, { URL } from 'url';
import fs from 'fs';
import crypto from 'crypto';
import { app } from 'electron';

import LocalLibraryDb, { LocalMeta } from './db';
import AcousticId from '../acoustic-id';
Expand All @@ -19,8 +20,6 @@ import Window from '../window';

export type ProgressHandler = (progress: number, total: number) => void

const THUMBNAILS_DIR = 'thumbnails';

/**
* Manage local files, extract metadata directly from files, or get it from acousticId api
* format all these metadata the nuclear way and store it in a db
Expand All @@ -36,9 +35,7 @@ class LocalLibrary {
@inject($mainLogger) private logger: Logger,
@inject(Window) private window: Window
) {
this.mediaDir = this.config.isProd()
? path.resolve(__dirname, '../../', 'media', THUMBNAILS_DIR)
: path.resolve(__dirname, THUMBNAILS_DIR);
this.mediaDir = path.join(app.getPath('userData'), 'thumbnails');
this.createThumbnailsDirectory();
}

Expand Down

0 comments on commit 6482810

Please sign in to comment.