Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: maintenance update, basic object storage support, minor cleanup #262

Merged
merged 4 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to this project will be documented in this file.

## [0.4.0 - 2024-10-21]

Maintenance update. Update NC versions to support NC30+ only.

### Added

- Added basic ObjectStorage support (/tmp folder used to execute binary scripts)
- Added automatic scroll to the next duplicate group opened

### Changed

- Update UI packages to be compatible with NC30+

## [0.3.9 - 2024-06-23]

Maintenance update.
Expand Down
4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This app allows to find duplicate or similar 📸📹 photos and videos
Quick start guide and further information in our [Wiki](https://github.com/cloud-py-api/mediadc/wiki).
]]>
</description>
<version>0.3.9</version>
<version>0.4.0</version>
<licence>agpl</licence>
<author mail="[email protected]" homepage="https://github.com/andrey18106">Andrey Borysenko</author>
<author mail="[email protected]" homepage="https://github.com/bigcat88">Alexander Piskun</author>
Expand All @@ -44,7 +44,7 @@ Quick start guide and further information in our [Wiki](https://github.com/cloud
<screenshot>https://raw.githubusercontent.com/cloud-py-api/mediadc/main/screenshots/mediadc_filesplugin.png</screenshot>
<dependencies>
<php min-version="7.4" min-int-size="64" />
<nextcloud min-version="28" max-version="29" />
<nextcloud min-version="30" max-version="31" />
</dependencies>
<background-jobs>
<job>OCA\MediaDC\BackgroundJob\CollectorCleanupJob</job>
Expand Down
28 changes: 0 additions & 28 deletions css/filesplugin.css

This file was deleted.

32 changes: 19 additions & 13 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,27 @@ html {
margin: 0 auto;
}

.mediadc-button-vue {
min-height: 36px !important;
.mediadc-row h1, h2, h3, h4, h5, h6 {
margin: 5px 0;
font-size: 1.4em;
}

.mediadc-button-vue .button-vue__icon {
width: 36px !important;
height: 36px !important;
min-width: 36px !important;
min-height: 36px !important;
}
/*.mediadc-button-vue {*/
/* min-height: 36px !important;*/
/*}*/

.mediadc-button-vue .icon-loading:after {
height: 20px !important;
width: 20px !important;
margin: -12px 0 0 -12px !important;
}
/*.mediadc-button-vue .button-vue__icon {*/
/* width: 36px !important;*/
/* height: 36px !important;*/
/* min-width: 36px !important;*/
/* min-height: 36px !important;*/
/*}*/

/*.mediadc-button-vue .icon-loading:after {*/
/* height: 20px !important;*/
/* width: 20px !important;*/
/* margin: -12px 0 0 -12px !important;*/
/*}*/

.mediadc-checkbox-only .checkbox-radio-switch__icon {
margin: 0 !important;
Expand Down Expand Up @@ -154,6 +159,7 @@ html {

.block h3 {
font-weight: bold;
font-size: 1.2em;
}

.block input, .block select {
Expand Down
3 changes: 2 additions & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
namespace OCA\MediaDC\AppInfo;

use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\MediaDC\Notification\Notifier;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
Expand All @@ -46,7 +47,7 @@ public function __construct() {

public function register(IRegistrationContext $context): void {
$context->registerDashboardWidget(RecentTasksWidget::class);
$context->registerNotifierService(\OCA\MediaDC\Notification\Notifier::class);
$context->registerNotifierService(Notifier::class);
$context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadFilesPluginListener::class);
}

Expand Down
10 changes: 4 additions & 6 deletions lib/BackgroundJob/CollectorCleanupJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,20 @@

use OCA\MediaDC\Service\CleanupService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;

class CollectorCleanupJob extends TimedJob {
/** @var CleanupService */
private $cleanupService;

private const collectorEveryWeekInterval = 24 * 60 * 60 * 7;

public function __construct(
ITimeFactory $time,
CleanupService $cleanupService
private readonly CleanupService $cleanupService
) {
parent::__construct($time);
$this->cleanupService = $cleanupService;

$this->setInterval(self::collectorEveryWeekInterval);
$this->setTimeSensitivity(\OCP\BackgroundJob\IJob::TIME_INSENSITIVE);
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}

/**
Expand Down
6 changes: 1 addition & 5 deletions lib/BackgroundJob/QueuedTaskJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,11 @@
use OCP\BackgroundJob\QueuedJob;

class QueuedTaskJob extends QueuedJob {
/** @var CollectorService */
private $collectorService;

public function __construct(
ITimeFactory $time,
CollectorService $collectorService
private readonly CollectorService $collectorService
) {
parent::__construct($time);
$this->collectorService = $collectorService;
}

/**
Expand Down
10 changes: 3 additions & 7 deletions lib/Command/CollectorCleanupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@
use Symfony\Component\Console\Output\OutputInterface;

class CollectorCleanupCommand extends Command {
/** @var CleanupService */
private $cleanupService;

public function __construct(CleanupService $cleanupService) {
public function __construct(
private readonly CleanupService $cleanupService,
) {
parent::__construct();

$this->cleanupService = $cleanupService;
}

protected function configure(): void {
Expand All @@ -62,6 +59,5 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln($e->getTraceAsString());
return 1;
}
return 1;
}
}
19 changes: 3 additions & 16 deletions lib/Command/CollectorTaskNotificationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,12 @@ class CollectorTaskNotificationCommand extends Command {
public const ARGUMENT_TASK_ID = 'task_id';
public const ARGUMENT_TASK_STATUS = 'status';

/** @var CollectorTaskMapper */
private $tasksMapper;

/** @var CollectorTaskDetailMapper */
private $tasksDetailsMapper;

/** @var IManager */
private $notificationManager;

public function __construct(
CollectorTaskMapper $tasksMapper,
CollectorTaskDetailMapper $tasksDetailsMapper,
IManager $notificationManager
private readonly CollectorTaskMapper $tasksMapper,
private readonly CollectorTaskDetailMapper $tasksDetailsMapper,
private readonly IManager $notificationManager,
) {
parent::__construct();

$this->tasksMapper = $tasksMapper;
$this->tasksDetailsMapper = $tasksDetailsMapper;
$this->notificationManager = $notificationManager;
}

protected function configure(): void {
Expand Down
Loading
Loading