Merge branch 'master' into stable24
commit
96ec372189
|
@ -2,7 +2,7 @@
|
|||
|
||||
This file is manually updated. Please file an issue if something is missing.
|
||||
|
||||
## v4.10.0, v3.10.0 (unreleased)
|
||||
## v4.10.0, v3.10.0 (2023-01-17)
|
||||
|
||||
- **Feature**: Allow sharing albums using public links ([#274](https://github.com/pulsejet/memories/issues/274))
|
||||
- **Feature**: Allow sharing albums with groups ([#329](https://github.com/pulsejet/memories/issues/329))
|
||||
|
|
|
@ -139,21 +139,21 @@ class VideoSetup extends Command
|
|||
$output->writeln('You should restart the server for changes to take effect');
|
||||
|
||||
// Check for VAAPI
|
||||
$output->writeln("\nChecking for QSV (/dev/dri/renderD128)");
|
||||
$output->writeln("\nChecking for VAAPI (/dev/dri/renderD128)");
|
||||
if (file_exists('/dev/dri/renderD128')) {
|
||||
$output->writeln('QSV is available. Do you want to enable it? [Y/n]');
|
||||
$output->writeln('VAAPI is available. Do you want to enable it? [Y/n]');
|
||||
|
||||
if ('n' === trim(fgets(fopen('php://stdin', 'r')))) {
|
||||
$this->config->setSystemValue('memories.qsv', false);
|
||||
$output->writeln('QSV is now disabled');
|
||||
$output->writeln('VAAPI is now disabled');
|
||||
} else {
|
||||
$output->writeln("\nQSV is now enabled. You may still need to install the Intel Media Driver");
|
||||
$output->writeln("\nVAAPI is now enabled. You may still need to install the Intel Media Driver");
|
||||
$output->writeln('and ensure proper permissions for /dev/dri/renderD128.');
|
||||
$output->writeln('See the documentation for more details.');
|
||||
$this->config->setSystemValue('memories.qsv', true);
|
||||
}
|
||||
} else {
|
||||
$output->writeln('QSV is not available');
|
||||
$output->writeln('VAAPI is not available');
|
||||
$this->config->setSystemValue('memories.qsv', false);
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ class ApiBase extends Controller
|
|||
return null;
|
||||
}
|
||||
|
||||
$owner = $this->timelineQuery->albumHasFile($album['album_id'], $id);
|
||||
$owner = $this->timelineQuery->albumHasFile((int) $album['album_id'], $id);
|
||||
if (!$owner) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||
namespace OCA\Memories\Controller;
|
||||
|
||||
use OCA\Memories\AppInfo\Application;
|
||||
use OCA\Memories\Db\TimelineWrite;
|
||||
use OCA\Memories\Exif;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\FileDisplayResponse;
|
||||
|
@ -240,9 +239,8 @@ class ImageController extends ApiBase
|
|||
$file->putContent(fopen($path, 'r')); // closes the handler
|
||||
}
|
||||
|
||||
// Reprocess the file
|
||||
$timelineWrite = new TimelineWrite($this->connection);
|
||||
$timelineWrite->processFile($file, true);
|
||||
// Touch the file, triggering a reprocess through the hook
|
||||
$file->touch();
|
||||
|
||||
return new JSONResponse([], Http::STATUS_OK);
|
||||
}
|
||||
|
|
|
@ -390,9 +390,12 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
setTicksTop(total: number) {
|
||||
const isMobile = globalThis.windowInnerWidth <= 768;
|
||||
const padding = isMobile ? 20 : 0;
|
||||
|
||||
for (const tick of this.ticks) {
|
||||
tick.topF = this.height * (tick.count / total);
|
||||
tick.top = utils.roundHalf(tick.topF);
|
||||
tick.top = utils.roundHalf(tick.topF) + padding;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -230,15 +230,20 @@ export async function* deletePhotos(photos: IPhoto[]) {
|
|||
return;
|
||||
}
|
||||
|
||||
const photosWithLive = await extendWithLivePhotos(photos);
|
||||
const fileIdsSet = new Set(photosWithLive.map((p) => p.fileid));
|
||||
// Extend with live photos unless this is an album
|
||||
if (window.vueroute().name !== "albums") {
|
||||
photos = await extendWithLivePhotos(photos);
|
||||
}
|
||||
|
||||
// Get set of unique file ids
|
||||
const fileIdsSet = new Set(photos.map((p) => p.fileid));
|
||||
|
||||
// Get files data
|
||||
let fileInfos: IFileInfo[] = [];
|
||||
try {
|
||||
fileInfos = await getFiles(photosWithLive);
|
||||
fileInfos = await getFiles(photos);
|
||||
} catch (e) {
|
||||
console.error("Failed to get file info for files to delete", photosWithLive, e);
|
||||
console.error("Failed to get file info for files to delete", photos, e);
|
||||
showError(t("memories", "Failed to delete files."));
|
||||
return;
|
||||
}
|
||||
|
@ -271,7 +276,11 @@ export async function* deletePhotos(photos: IPhoto[]) {
|
|||
* @param overwrite behaviour if the target exists. `true` overwrites, `false` fails.
|
||||
* @returns list of file ids that were moved
|
||||
*/
|
||||
export async function* movePhotos(photos: IPhoto[], destination: string, overwrite: boolean) {
|
||||
export async function* movePhotos(
|
||||
photos: IPhoto[],
|
||||
destination: string,
|
||||
overwrite: boolean
|
||||
) {
|
||||
if (photos.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -279,19 +288,20 @@ export async function* movePhotos(photos: IPhoto[], destination: string, overwri
|
|||
// Set absolute target path
|
||||
const prefixPath = `files/${getCurrentUser()?.uid}`;
|
||||
let targetPath = prefixPath + destination;
|
||||
if (!targetPath.endsWith('/')) {
|
||||
targetPath += '/';
|
||||
if (!targetPath.endsWith("/")) {
|
||||
targetPath += "/";
|
||||
}
|
||||
|
||||
const photosWithLive = await extendWithLivePhotos(photos);
|
||||
const fileIdsSet = new Set(photosWithLive.map((p) => p.fileid));
|
||||
// Also move the live photo videos
|
||||
photos = await extendWithLivePhotos(photos);
|
||||
const fileIdsSet = new Set(photos.map((p) => p.fileid));
|
||||
|
||||
// Get files data
|
||||
let fileInfos: IFileInfo[] = [];
|
||||
try {
|
||||
fileInfos = await getFiles(photosWithLive);
|
||||
fileInfos = await getFiles(photos);
|
||||
} catch (e) {
|
||||
console.error("Failed to get file info for files to move", photosWithLive, e);
|
||||
console.error("Failed to get file info for files to move", photos, e);
|
||||
showError(t("memories", "Failed to move files."));
|
||||
return;
|
||||
}
|
||||
|
@ -304,7 +314,8 @@ export async function* movePhotos(photos: IPhoto[], destination: string, overwri
|
|||
fileInfo.originalFilename,
|
||||
targetPath + fileInfo.basename,
|
||||
// @ts-ignore - https://github.com/perry-mitchell/webdav-client/issues/329
|
||||
{ headers: { 'Overwrite' : overwrite ? 'T' : 'F' }});
|
||||
{ headers: { Overwrite: overwrite ? "T" : "F" } }
|
||||
);
|
||||
return fileInfo.fileid;
|
||||
} catch (error) {
|
||||
console.error("Failed to move", fileInfo, error);
|
||||
|
|
Loading…
Reference in New Issue