mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
tweeking thumbnail generation sizes
fixing thumbnail selection algorithm
This commit is contained in:
parent
2663ed49e7
commit
6c458e2dbb
@ -77,7 +77,7 @@ To configure it, run `PiGallery2` first to create `config.json` file, then edit
|
||||
The app has a nice UI for settings, you may use that too.
|
||||
Default user: `admin` pass: `admin`
|
||||
|
||||
**Note**: First run, you might have file access issues and port 80 issue.
|
||||
**Note**: First run, you might have file access issues and port 80 issue, see [#115](https://github.com/bpatrik/pigallery2/issues/115).
|
||||
Running `npm start -- --Server-port=8080` will start the app on port 8080 that does not require `root`
|
||||
Adding read/write permissions to all files can solve the file access issue `chmod -R o-w .`, see [#98](https://github.com/bpatrik/pigallery2/issues/98).
|
||||
|
||||
|
@ -81,7 +81,7 @@ export class PrivateConfigDefaultsClass extends PublicConfigClass implements IPr
|
||||
{
|
||||
name: DefaultsJobs[DefaultsJobs['Thumbnail Generation']],
|
||||
jobName: DefaultsJobs[DefaultsJobs['Thumbnail Generation']],
|
||||
config: {sizes: [160]},
|
||||
config: {sizes: [240]},
|
||||
trigger: {
|
||||
type: JobTriggerType.after,
|
||||
afterScheduleName: DefaultsJobs[DefaultsJobs.Indexing]
|
||||
|
@ -135,7 +135,7 @@ export class PublicConfigClass {
|
||||
},
|
||||
Thumbnail: {
|
||||
concurrentThumbnailGenerations: 1,
|
||||
thumbnailSizes: [160, 240, 480],
|
||||
thumbnailSizes: [240, 480],
|
||||
iconSize: 45,
|
||||
personThumbnailSize: 200
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ export class Media extends MediaIcon {
|
||||
}
|
||||
|
||||
getThumbnailSize() {
|
||||
const longerEdge = Math.max(this.renderWidth * this.renderHeight);
|
||||
const longerEdge = Math.max(this.renderWidth, this.renderHeight);
|
||||
return Utils.findClosestinSorted(longerEdge, Media.sortedThumbnailSizes);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user