Giter Club home page Giter Club logo

mediadc's Introduction

Nextcloud MediaDC

build Publish to Nextcloud app store Test Binaries Github All Releases

📸📹 Collect photo and video duplicates to save your cloud storage space

cloud_py_api required to be installed and enabled first.

| Not working on FreeBSD systems for now

Home page Task page Nextcloud Media Duplicate Collector application

Why is this so awesome?

  • ♻ Detects similar and duplicate photos/videos with different resolutions, sizes and formats
  • 💡 Easily saves your cloud storage space and time for sorting
  • ⚙ Flexible configuration

🚀 Installation

First of all, in you Nextcloud install and enable cloud_py_api through the Apps management, then install MediaDC app. Starting from 0.2.0 version MediaDC is only included in Nextcloud v25 and higher.

Read more on Wiki page

Maintainers

State of the Maintenance

As Andrey and I(Alexander) are fully committed to the NextCloud App Ecosystem project, we will be working tirelessly around the clock for the next two months. Due to our intense dedication to that project, our availability will be limited during this period. However, we encourage and welcome any contributions from the community in the form of pull requests.

After Nextcloud App Ecosystem V2 finished we'll rewrite MediaDC to use the new system, and write many other amazing applications.

For All Coders who want to write New Amazing Applications for Nextcloud with New App Ecosystem - we are avalaible to discuss its API, prototypes, etc. in their repositories.

mediadc's People

Contributors

andrey18106 avatar bigcat88 avatar boyddensmore avatar dependabot[bot] avatar kovge avatar nextcloud-bot avatar ondrejlohnisky avatar rakekniven avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mediadc's Issues

Add simple mode "find duplicate filenames"

Description
The easiest duplicates are those that have the same filename and filesize. However currently there is no way to restrict the search to only find these kind of duplicates.

Example
Due to several backups and copies, duplicate files/pictures and videos are scattered all over the system. In order to find those duplicates it would be helpful to restrict the search to identical files.

Cant run pip after local install.

Describe the bug
Cant run pip after local install.

To Reproduce
Steps to reproduce the behavior:

  1. Install App through Nextcloud
  2. Navigate to app
  3. Click on install for the configuration
  4. See error

Expected behavior
Install pillow and numpy successfully

Screenshots
image

Desktop (please complete the following information):

  • OS Ubuntu
  • CPU x86
  • Browser Chrome
  • Nextcloud version 23
  • Database configuration mariadb
  • Python version 3.6
  • MediaDC version latest

Additional context
I have manually installed pillow and numpy but it has not changed the result:

image

MediaDC fails to install numpy, pywavelets (Python 3.7)

Describe the bug
MediaDC fails to install hexhamming with the error log below.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
All needed packages should be installed.

Screenshots
grafik

Configuration errors

Error during install pywt(pywavelets).
Error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /data/nextcloud/apps/mediadc/lib/Service/python/local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp90q2_j1x
cwd: /tmp/pip-install-z_jkk0cw/pywavelets_e13042a492914fa19b93df90616ba1b1
Complete output (22 lines):
setup.py:366: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command, proceeding with "
Traceback (most recent call last):
File "/data/nextcloud/apps/mediadc/lib/Service/python/local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in
main()
File "/data/nextcloud/apps/mediadc/lib/Service/python/local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/data/nextcloud/apps/mediadc/lib/Service/python/local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 140, in prepare_metadata_for_build_wheel
self.run_setup()
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 211, in run_setup
self).run_setup(setup_script=setup_script)
File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 126, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 478, in
setup_package()
File "setup.py", line 468, in setup_package
ext_modules = get_ext_modules(USE_CYTHON)
File "setup.py", line 182, in get_ext_modules
from numpy import get_include as get_numpy_include
ModuleNotFoundError: No module named 'numpy'

WARNING: Discarding https://files.pythonhosted.org/packages/35/e9/decd467448cde227aad94ff2976046afd3a51ad461ba9a325840687e8836/PyWavelets-1.2.0.tar.gz#sha256=6cbd69b047bb4e00873097472133425f5f08a4e6bc8b3f0ae709274d4d5e9a8d (from https://pypi.org/simple/pywavelets/) (requires-python:>=3.7). Command errored out with exit status 1: /usr/bin/python3 /data/nextcloud/apps/mediadc/lib/Service/python/local/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp90q2_j1x Check the logs for full command output.

Configuration errors

Error during install hexhamming(hexhamming).
Error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xpuw_csw/hexhamming_8fddfc5d1a6c4aacb6e5706a64c64092/setup.py'"'"'; file='"'"'/tmp/pip-install-xpuw_csw/hexhamming_8fddfc5d1a6c4aacb6e5706a64c64092/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-m21avhyg
cwd: /tmp/pip-install-xpuw_csw/hexhamming_8fddfc5d1a6c4aacb6e5706a64c64092/
Complete output (10 lines):
running bdist_wheel
running build
running build_ext
building 'hexhamming' extension
creating build
creating build/temp.linux-aarch64-3.7
creating build/temp.linux-aarch64-3.7/hexhamming
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c hexhamming/python_hexhamming.cc -o build/temp.linux-aarch64-3.7/hexhamming/python_hexhamming.o -march=native
unable to execute 'aarch64-linux-gnu-gcc': No such file or directory
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for hexhamming
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xpuw_csw/hexhamming_8fddfc5d1a6c4aacb6e5706a64c64092/setup.py'"'"'; file='"'"'/tmp/pip-install-xpuw_csw/hexhamming_8fddfc5d1a6c4aacb6e5706a64c64092/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-5j1548i_/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /data/nextcloud/apps/mediadc/lib/Service/python/local/include/python3.7m/hexhamming
cwd: /tmp/pip-install-xpuw_csw/hexhamming_8fddfc5d1a6c4aacb6e5706a64c64092/
Complete output (10 lines):
running install
running build
running build_ext
building 'hexhamming' extension
creating build
creating build/temp.linux-aarch64-3.7
creating build/temp.linux-aarch64-3.7/hexhamming
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c hexhamming/python_hexhamming.cc -o build/temp.linux-aarch64-3.7/hexhamming/python_hexhamming.o -march=native
unable to execute 'aarch64-linux-gnu-gcc': No such file or directory
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xpuw_csw/hexhamming_8fddfc5d1a6c4aacb6e5706a64c64092/setup.py'"'"'; file='"'"'/tmp/pip-install-xpuw_csw/hexhamming_8fddfc5d1a6c4aacb6e5706a64c64092/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-5j1548i_/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /data/nextcloud/apps/mediadc/lib/Service/python/local/include/python3.7m/hexhamming Check the logs for full command output.

Desktop (please complete the following information):

  • OS raspberry pi os buster image (docker image on raspberry pi os bullseye)
  • CPU (architecture) ARM raspberry pi 4
  • Browser [e.g. chrome, safari] Firefox
  • Nextcloud version [e.g. 22] 22
  • Database configuration (without sensitive information)
  • Python version [e.g. 3.9.1]: 3.7
  • MediaDC version [e.g. 0.1.0] 0.18

Auto open next group not working in Firefox 95.0.2 (64-bit)

First of, great that you implemented this so fast. It will save me so many clicks, thank you.

Auto open next group not working in Firefox 95.0.2 (64-bit)
When using MediaDC in Firefox 95.0.2 (64-bit) the resolved duplicate group is closed but the next one is not opened automatically despite it being set in the settings. In Chrome this functionality works just fine.
I noticed this on my win10 PC

To Reproduce
Steps to reproduce the behavior:

  1. have a duplicate job run resulting in duplicates
  2. open the job page using Firefox 95.0.2 (64-bit)
  3. make sure "auto open next group" option is enabled
  4. ether delete or remove files to resolve the duplicate group

Expected behavior
I expect the duplicate group to be closed and the next duplicate group in line to be opened.

Once more in Chrome this works just fine and this is a great feature.

ffmpeg ffprobe built from source not found

FFMPEG built from source
ubuntu$ whereis ffmpeg
ffmpeg: /usr/bin/ffmpeg /usr/local/bin/ffmpeg /home/ubuntu/bin/ffmpeg /usr/src/ffmpeginstaller.9.1/ffmpeg.sh

Still complaining
Video processing won't work, video_required packages not installed.
Not installed video_required packages: [ "ffmpeg", "ffprobe" ]
video_required packages can't be installed automatically, this should be done by administrator manually and then recheck installation on this page.

Batch delete

Description
A batch option to delete all files on left / right.

Configuration errors: db_exception_handler:

Describe the bug
Installed the first time using v0.1.1, recieved a "Configuration error". Tried re-installing and wouldn't go away. Saw v0.1.2 was released so I updated to that the next day. When I reinstalled after the update it still gave me the same errors. I've pasted the output below.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.3 LTS
  • Browser: Firefox
  • Nextcloud version: 22.1.1
  • MediaDC version: v0.1.2

Additional context
image

db_exception_handler:

Traceback (most recent call last):

File "/var/www/nextcloud/apps/mediadc/lib/Service/python/db/pymysql/connections.py", line 613, in connect

sock = socket.create_connection(

File "/usr/lib/python3.8/socket.py", line 787, in create_connection

for res in getaddrinfo(host, port, 0, SOCK_STREAM):

File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo

for res in _socket.getaddrinfo(host, port, family, type, proto, flags):

socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/var/www/nextcloud/apps/mediadc/lib/Service/python/db/connectors.py", line 44, in create_connection

connection = pymysql.connect(host=config['dbhost'],

File "/var/www/nextcloud/apps/mediadc/lib/Service/python/db/pymysql/connections.py", line 352, in init

self.connect()

File "/var/www/nextcloud/apps/mediadc/lib/Service/python/db/pymysql/connections.py", line 664, in connect

raise exc

db.pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '10.10.10.33:3306' ([Errno -2] Name or service not known)")

Cant connect to database.`

Error installing Python packages

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Click Install on the /apps/mediadc/configuration after enabling

Expected behavior
To install the packages.

Desktop (please complete the following information):

  • OS [e.g. iOS] - Windows
  • CPU (architecture) - N/A
  • Browser [e.g. chrome, safari] - Firefox
  • Nextcloud version [e.g. 22] - 22.2.3 in a Docker on Linux 5.10.28-Unraid x86_64
  • Database configuration (without sensitive information) - MariaDB Docker
  • Python version [e.g. 3.9.1] - Not sure
  • MediaDC version [e.g. 0.1.0] - 0.1.8

Additional context
Add any other context about the problem here.

Logging:

[mediadc] Error: [OCA\MediaDC\Service\PythonService] Command executed with error result_code: 127

GET /apps/mediadc/api/v1/python/check
from 192.168.1.1 by hammyhavoc at 2022-02-13T04:52:53+00:00

[mediadc] Error: [OCA\MediaDC\Service\PythonService] Command executed with error result_code: 127

GET /apps/mediadc/api/v1/python/install
from 192.168.1.1 by hammyhavoc at 2022-02-13T04:52:56+00:00

[mediadc] Error: [OCA\MediaDC\Service\PythonService] Command executed with error result_code: 127

GET /apps/mediadc/api/v1/python/check
from 192.168.1.1 by hammyhavoc at 2022-02-13T04:53:02+00:00

Can't connect to Database (MariaDB, Docker)

I've got an error during the installation / installation check.

I'm using:

  • Docker
  • Nextcloud 23.0.0
  • MariaDB 10.5
  • Media DC 0.1.8

That all runs on a Raspberry Pi 4B 8GB with a Ubuntu Server environment.

I've already looked through some issues here, but can't find a "simple" solution. So I think(hope that this issue can help others too.

That is the error log in the UI of Media DC:
Screenshot 2022-01-12 at 14 01 22

 Configuration errors

db_exception_handler:

Traceback (most recent call last):

  File "/var/www/html/custom_apps/mediadc/lib/Service/python/db/pymysql/connections.py", line 602, in connect

    sock.connect(self.unix_socket)

ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/var/www/html/custom_apps/mediadc/lib/Service/python/db/connectors.py", line 37, in create_connection

    connection = pymysql.connect(unix_socket=config['usock'],

  File "/var/www/html/custom_apps/mediadc/lib/Service/python/db/pymysql/connections.py", line 352, in __init__

    self.connect()

  File "/var/www/html/custom_apps/mediadc/lib/Service/python/db/pymysql/connections.py", line 664, in connect

    raise exc

db.pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)")

Cant connect to database.

The database container looks like the following:

19b785dc4569    |     mariadb:10.5    |    "docker-entrypoint.s…"    |    4 days ago    |    Up 4 days    |    3306/tcp    |    db_1

My dbport in my nextcloud config.php is empty (#11):

'dbport' => '',

How to install the required dependencies and algorithms on a NextCloud Snap ?

Describe the bug
First install of the MediaDC requires Python dependecies that are not installed:
I am running on a Snap version of NextCloud. When I run MediaDC it premotes me to Configure application dependencies on Configuration page. however, on the Configuration page, MediaDC is inable of installing the required dependencies.
Nextcloud Log:
Error | mediadc | [AppUpdateStep] Python dependencies updating error: {"success":false,"installed":false,"required":null,"video_required":null,"optional":null,"boost":null,"available_algorithms":null,"installed_list":null,"errors":["Cant run pip after local install."],"warnings":null}

To Reproduce
Steps to reproduce the behavior:

  1. get and run NextCloud from Snap
  2. install and run MediaDC
  3. try to add the required dependencies.

Expected behavior
dependencies are installed when clicking Install.

Screenshots
https://imgur.com/a/oVLVb8K
https://imgur.com/a/HwcIJ2L
https://imgur.com/a/WkLEVSE

Desktop (please complete the following information):

System info
{
  "nextcloud-version": "22.2.3.0",
  "webserver": "Apache",
  "database": {
    "type": "mysql",
    "version": "8.0.28",
    "size": "63447040"
  },
  "php-version": "8.0.15",
  "php-interpreter": "php",
  "python-version": "3.6.9",
  "python-interpretter-setting": "/usr/bin/python3",
  "os": "Linux",
  "os-release": "5.13.0-28-generic",
  "machine-type": "x86_64",
  "mediadc-version": "0.1.9",
  "mediadc-settings": {
    "remote_filesize_limit": "536870912",
    "installed": {
      "status": false,
      "installed_list": {
        "boost": {
          "hexhamming": {
            "package": "hexhamming",
            "version": "none",
            "location": "none"
          }
        },
        "optional": {
          "pywt": {
            "package": "pywavelets",
            "version": "none",
            "location": "none"
          },
          "scipy": {
            "package": "scipy",
            "version": "none",
            "location": "none"
          },
          "pillow_heif": {
            "package": "pillow_heif",
            "version": "none",
            "location": "none"
          }
        },
        "required": {
          "PIL": {
            "package": "pillow",
            "version": "none",
            "location": "none"
          },
          "numpy": {
            "package": "numpy",
            "version": "none",
            "location": "none"
          }
        }
      },
      "video_required": [
        "ffmpeg",
        "ffprobe"
      ],
      "not_installed_list": {
        "boost": {
          "hexhamming": "hexhamming"
        },
        "optional": {
          "pywt": "pywavelets",
          "scipy": "scipy",
          "pillow_heif": "pillow_heif"
        },
        "required": {
          "PIL": "pillow",
          "numpy": "numpy"
        }
      },
      "available_algorithms": []
    }
  }
}

Cant find value in cloud config

Screenshot
image

Describe the bug
After installing application getting this kind of errors.

Looks like app try to find config in some kind default location

Desktop (please complete the following information):

  • OS Description: Ubuntu 20.04.3 LTS
  • CPU: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (2 cores)
  • Browser: any
  • Nextcloud version: 22.2.3
  • Database configuration: mysql 10.3.32 206,2 MB
  • Python version: 3.8.10 (default, Nov 26 2021)
  • MediaDC version: 0.1.8

Additional context
Could You add textbox in configuration section to point to config file manually, in case if app cannot find it by itself?

Where can i write correct path (file/variable)? to make tests.

Got Task error if examining files with non ascii names in path

Describe the bug
I have files and folders named with non ascii characters in my nextcloud instance.
I created a job to examine some of my folders. I got really soon an error message with the following text:
"Exception(UnicodeEncodeError): `'ascii' codec can't encode character '\xe1' in position".
I retried to examine a folder with pure ASCII characters, than i had no issue.

To Reproduce
Steps to reproduce the behavior:

  1. Create a folder in your nextcloud instance with a non ascii character in it's name.
  2. Put there some image files
  3. Go to MediaDC app
  4. Create a Job to examine the newly created folder

Expected behavior
It examines the folder without issues.

Screenshots
image

Server (background task):

  • OS: ubuntu 18.04
  • PHP version: 7.4.24
  • Nextcloud version 21
  • Database configuration mysql-8
  • Python version 3.6.9
  • MediaDC version 0.1.3

Request for auto-delete smaller files

I have recently ran into a problem, where I had about 4000 groups of identical images. This was caused due to one of my applications on PC creating a smaller preview file for every picture. Obviously, grinding through several thousand groups is not an option, so a there could be a feature 'delete the smallest file in every group', which would delete any file in the group, if its, say less than 50% of the largest file. I would love to see this feature, and it loos as if it isn't to hard to create.

Settings list is empty & Internal Server Error

Nextcloud 22.2.3
Python 3.8.10
Ubuntu 20.14
MySQL 8.0.28
PHP 7.43

An unhandled exception has been thrown:
OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT * FROM *PREFIX*mediadc_settings WHERE name = :dcValue1"; in /var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php:283

Request for 'export results'

It would be nice if I could export the results of a task.
My first task finished with over 11k groups. It would help, if I could simply export those results, for example into a xml file, with the groups and filename (full name) as elements, or in a plain textfile.

Use Transifex for continuous translation please

Hello,
would it be possible to follow instructions on:
https://docs.nextcloud.com/server/latest/developer_manual/basics/front-end/l10n.html#adding-translations
...and gain benefits from work of whole Nextcloud translators community for users of your app please?

For instance:

  • much more translators will get involved, because without it, they will newer even know about possibility to translate this app - example of benefits for project known in this manner for community of Nextcloud translators (app with recently added to this workflow, based on same request as this one): H2CK/oidc@937fc37 (se this and ongoing Nextcloud bot commits - translation of app is getting completed/improved in no time)
  • also, as app is evolving, when some string(s) in app is/are changed/added, in case of continuous translation workflow translators are noticed intermediately and strings are translated before new version is released. In contrast with situation, that this change (in source strings) is only silently published in git repo and no one will (get) notice(d) till never version with untranslated strings get released (proactive vs retroactive).
  • when one (of translators) will during using this app notice possibility to translate something in better manner, it is much efficient (especially for minor changes) to do this in translation tool than edit file directly in git. For example in case of one letter changes (misspelled words, etc.) has change directly in git such overhead (many steps to change just one letter), that these type of tweaks are rare due this (loss of quality for users)

To conclude: with continuous translation workflow, result is, that users of your app are getting more complete and more polished localization, so their user experience is much more pleasant.

Thanks :-)

Global duplicate file search

If legal (opt-in by jurisdiction),
add capability for admin to duplicate search across all "opt-in" accounts files and automatically send users duplicates file mediadc task details.

Batch working on results of tasks

image

Description
As You can see on screenshot I've got a plenty of groups in this task.
It would be nice to add checkbox "Select ALL"

Also pay attention that on screen we have 4 marks, but in Batch menu (right corner) 8 selections
It happens when I searched groups with "20" first and select first 4 groups, than switched to "100" and selected other 4
Good idea to show all selected numbers at once

And once more
is it possible to add in filter ranges.... like in printers wen you select what to print...
42-500; 3; 7; 1024-

syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')' in /var/www/nextcloud/apps/mediadc/lib/Service/CollectorService.php:177

Describe the bug
Yesterday I've installed the mediadc-app in my Nextcloud installation just after i'd upgraded to v21.0.5.
When i browse to my Nextcloud-web i receive an generic error screen.
To fix the error i tried to run: sudo -u www-data php occ upgrade

To Reproduce
Steps to reproduce the behavior:

  1. Install mediadc app in Nextcloud v21.0.5
  2. Run: sudo -u www-data php occ upgrade
  3. See error in console

Expected behavior
I didn't expect to see an error about the Mediadc-app
I was able to revive my nextcloud instance by mv apps/mediadc apps/mediadc.old

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Proxmox VE 7, Turnkey LXC container
  • Nextcloud version: v21.0.5
  • MediaDC version: v0.1.2

Additional context

root@nextcloud .../www/nextcloud# sudo -u www-data php occ upgrade
An unhandled exception has been thrown:
ParseError: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')' in /var/www/nextcloud/apps/mediadc/lib/Service/CollectorService.php:177
Stack trace:
#0 /var/www/nextcloud/lib/composer/composer/ClassLoader.php(346): Composer\Autoload\includeFile('/var/www/nextcl...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('OCA\\MediaDC\\Ser...')
#2 [internal function]: spl_autoload_call('OCA\\MediaDC\\Ser...')
#3 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(107): ReflectionClass->__construct('OCA\\MediaDC\\Ser...')
#4 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\MediaDC\\Ser...')
#5 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\MediaDC\\Ser...')
#6 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(431): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\MediaDC\\Ser...')
#7 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query('OCA\\MediaDC\\Ser...', true)
#8 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(ReflectionParameter))
#9 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map(Object(Closure), Array)
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#11 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\MediaDC\\Com...')
#12 /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\MediaDC\\Com...')
#13 /var/www/nextcloud/lib/private/ServerContainer.php(146): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\MediaDC\\Com...')
#14 /var/www/nextcloud/lib/private/Console/Application.php(221): OC\ServerContainer->query('OCA\\MediaDC\\Com...')
#15 /var/www/nextcloud/lib/private/Console/Application.php(136): OC\Console\Application->loadCommandsFromInfoXml(Array)
#16 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#18 {main}root@nextcloud .../www/nextcloud# php -v
PHP 7.3.29-1~deb10u1 (cli) (built: Jul  2 2021 04:04:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.29, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.29-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies

`'ascii' codec can't encode characters in position 49-50: ordinal not in range(128)`

Describe the bug
Exception(UnicodeEncodeError): 'ascii' codec can't encode characters in position 49-50: ordinal not in range(128)

To Reproduce
When I use a folder contain Chinese characters.

Screenshots

Desktop (please complete the following information):

{
  "nextcloud-version": "23.0.4.1",
  "webserver": "nginx/1.21.4",
  "database": {
    "type": "mysql",
    "version": "8.0.20",
    "size": "121700352"
  },
  "php-version": "8.0.7",
  "php-interpreter": "php",
  "python-version": "3.6.8",
  "python-interpretter-setting": "/usr/bin/python3",
  "os": "Linux",
  "os-release": "5.17.4-1.el7.elrepo.x86_64",
  "machine-type": "x86_64",
  "mediadc-version": "0.1.9",
  "mediadc-settings": {
    "remote_filesize_limit": "536870912",
    "installed": {
      "status": true,
      "installed_list": {
        "boost": {
          "hexhamming": {
            "package": "hexhamming",
            "version": "2.2.3",
            "location": "global"
          }
        },
        "optional": {
          "nacl": {
            "package": "pynacl",
            "version": "1.5.0",
            "location": "global"
          },
          "pywt": {
            "package": "pywavelets",
            "version": "1.1.1",
            "location": "global"
          },
          "scipy": {
            "package": "scipy",
            "version": "1.5.4",
            "location": "global"
          },
          "pillow_heif": {
            "package": "pillow_heif",
            "version": "0.2.2",
            "location": "global"
          },
          "cryptography": {
            "package": "cryptography",
            "version": "37.0.0",
            "location": "global"
          }
        },
        "required": {
          "PIL": {
            "package": "pillow",
            "version": "8.4.0",
            "location": "global"
          },
          "numpy": {
            "package": "numpy",
            "version": "1.19.5",
            "location": "global"
          }
        }
      },
      "video_required": [],
      "not_installed_list": {
        "boost": [],
        "optional": [],
        "required": []
      },
      "available_algorithms": [
        "average",
        "dhash",
        "phash",
        "whash"
      ]
    }
  }
}

Additional context
locate on my system

[root@xf ~]# locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

I also tried export LC_ALL="en_US.utf8" , but not work.

Could not resolve ...

Hello,

Describe the bug
Following the installation of the app (manually or through the nextcloud apps) i'm not able to configure / use the application.
MediaDC settings are not showing up and call to apps/mediadc/api/v1/settings return 500

To Reproduce
Steps to reproduce the behavior:

  1. Install the apps
  2. Go to Media DC settings

Environment:

  • OS: Docker (nextcloud:apache + needed package)
  • CPU: x86
  • Nextcloud version: 24.0.3
  • Database configuration: Postgres / Mysql (tried both)
  • Python version: 3.9.2
  • MediaDC version [0.1.9

Additional context
Logs:

Error: Exception: Repair step 'OCA\MediaDC\Migration\AppUpdateStep' can't be instantiated: Could not resolve pythonService! Class "pythonService" does not exist at <<closure>>

0. /var/www/html/lib/private/legacy/OC_App.php line 1075
   OC\Repair->addStep("OCA\\MediaDC\\Migration\\AppUpdateStep")
1. /var/www/html/lib/private/Installer.php line 149
   OC_App::executeRepairSteps("mediadc", ["OCA\\MediaDC\\ ... "])
2. /var/www/html/apps/settings/lib/Controller/AppSettingsController.php line 451
   OC\Installer->installApp("mediadc")
3. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 225
   OCA\Settings\Controller\AppSettingsController->enableApps(["mediadc"], [])
4. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 133
   OC\AppFramework\Http\Dispatcher->executeController(OCA\Settings\Con ... {}, "enableApps")
5. /var/www/html/lib/private/AppFramework/App.php line 172
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings\Con ... {}, "enableApps")
6. /var/www/html/lib/private/Route/Router.php line 298
   OC\AppFramework\App::main("OCA\\Settings\\ ... r", "enableApps", OC\AppFramework\ ... {}, ["settings.AppSettings.enableApps"])
7. /var/www/html/lib/base.php line 1023
   OC\Route\Router->match("/settings/apps/enable")
8. /var/www/html/index.php line 36
   OC::handleRequest()

POST /settings/apps/enable

I'm also having the "Could not resolve" issue for:

  • OCA\ServerInfo\DatabaseStatistics
  • databaseStatistics
  • utils

Any idea how to resolve that ?

Thank you !

Error: Out of range value for column duration

After running some bigger task MediaDC returned error:

Task errors
Exception(DataError): (1264, "Out of range value for column 'duration' at row 1")

Task info:
Photos&Videos 59318/60177 files (229.14 GB) (precision: 90%)

Task errors

there is a task error when I run task for vidéos

Capture d’écran 2021-12-29 164430

I just choose a folder with default setting and video type. For photos, there is no problem, that's works fine.
Do you know what is the bug?

Thanks ;-)

"Not enough permitions to delete file"

Describe the bug
I keep getting the error message "Not enough permitions to delete file". But i don't know how to resolve the issue.

Which user is being used for deletion?

Request for .nomedia/.noimage for exclusion

Description
In Nextcloud it is possible to put a specific named file (.nomedia or .noimage) in a folder to exclude it from the photos-app. It would be nice to align mediadc with this functionality and thus exclude these folders.

Additional UI buttons

Recent Tasks
img_1
image
img_2
image
img_3
image

  1. Could you add quick buttons from img_2, directly on tasks on img_1?
    (some time it is no need to go inside the task, just restart it again)

And trash bin on img_3, leads to misunderstanding:
if it about deletion task, why it is here inside the task?
if it about deleting all duplicates found, it is not obviously? (previous icons are about task not duplicants)

Tasks Creation

image

  1. And if possible additional button on creation, which just creates task, but not start it immediately?

Tasks scheduling

  1. What about scheduling and notification? as an administrator of the server I would like to run tasks periodically and get some kind of notification.

A more general integration with the Photos app

Description
I know this is kinda out of scope of the goal of this app, but I had this idea I wanted to share.
It could be pretty cool (& useful I think) to be able to have a sub-menu when opening a media, in the sidebar or something, to show a list of other "quite similar" media.

Example
I set a new MediaDC task with a threshold of 75%, and set it as "default for Photos app sidebar".
After it's done I can directly find media 75% similar to a specific one.
For example I can search for an auto-tagged photo with a recognition app, open it, and look in the sidebar if there are some similar ones that weren't tagged properly.

Bonus
Some side effects of this feature could be fun, like to be able to search for similar pictures like Yandex Images / TinEye / etc. We could even imagine a special upload feature that only checks for similar pictures without keeping the image, so that we have our own self hosted TinEye (with a veryyy tinier database though 😄)

Any file comparison

Dear friends.
Is it possible to use your hash comparison mechanism to find duplicates of other type files?

For instance add MimeType "other files"
if selected other , hide field with "Similarity threshold" and set 100%

Option to set PHP path to avoid open_basedir errors

Description
If PHP is hardened by open_basedir you get a lot of "open_basedir restriction in effect." errors in the nextcloud.log

It looks like the MediaDC App is searching for the follolowing forbidden paths for php:
/usr/local/sbin/php7.4.30
/usr/local/bin/php7.4.30
/usr/sbin/php7.4.30
/usr/bin/php7.4.30
/sbin/php7.4.30
/bin/php7.4.30
/usr/local/sbin/php7.4
/usr/local/bin/php7.4
/usr/sbin/php7.4
/usr/bin/php7.4
/sbin/php7.4
/bin/php7.4
/usr/local/sbin/php7
/usr/local/bin/php7
/usr/sbin/php7
/usr/bin/php7
/sbin/php7
/bin/php7

In my case the correct PHP binary would be in /usr/bin/php

This could be fixed by an configuration option to set the correct PHP binary.

Jump to page

Description
When working with big number of duplicate groups it will be useful to jump to specified page.

Example
Screenshot_20220604_120224
In this case, when want to start from page 423, must first click 422 times next '>' button

Can't connect to postgresql socket

Describe the bug
Try to install MediaDC first time, all python libraries installed correctly with autoinstall, nextcloud db config for postgres like this:
"dbtype" => "pgsql",
"dbname" => "nextcloud",
"dbuser" => "username",
"dbhost" => "/var/run/postgresql",
"dbport" => "",
"dbtableprefix" => "oc_",
"dbpassword" => "password",

Desktop (please complete the following information):

  • OS Debian 11
  • CPU x86_64
  • Browser Firefox
  • Nextcloud version 23
  • Database configuration Postgresql with local md5 connection
  • Python version 3.9.2
  • MediaDC version 0.1.8

Additional context
db_exception_handler:

Traceback (most recent call last):

File "/opt/nextcloud/apps/mediadc/lib/Service/python/db/pg8000/core.py", line 225, in init

self._usock.connect(unix_sock)

FileNotFoundError: [Errno 2] No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/opt/nextcloud/apps/mediadc/lib/Service/python/db/connectors.py", line 54, in create_connection

connection = dbapi.connect(unix_sock=config['usock'],

File "/opt/nextcloud/apps/mediadc/lib/Service/python/db/pg8000/dbapi.py", line 201, in connect

return Connection(

File "/opt/nextcloud/apps/mediadc/lib/Service/python/db/pg8000/core.py", line 229, in init

raise InterfaceError("communication error") from e

db.pg8000.exceptions.InterfaceError: communication error

Cant connect to database.

Group number in results

first run
image

next run
image

I'm not sure, if it is a bug, but
If You restart task, resulting groups numbers not starting from beginning, but increments from previous task start.

Cant find `dbtableprefix` value in cloud config

Describe the bug
After performing the automated installation of deps I got the error:

Cant find `dbtableprefix` value in cloud config

To Reproduce
Steps to reproduce the behavior:

  1. Install plugin
  2. Go to MediaDC preferences
  3. Click on "Check installation"
  4. See error

Expected behavior
If the dbtableprefix is not defined get this value from default settings. In this case this value is oc_

Desktop (please complete the following information):

  • Nextcloud 22.2.3
  • Database configuration. using MariaDB with default dbtableprefix (oc_)
  • Python 3.8.10
  • MediaDC 0.1.7

Enabling MediaDC fails

Describe the bug
Enabling MediaDC fails.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Apps
  2. Install MediaDC
  3. MediaDC is listed under Disabled Apps
  4. Clicking Enable does nothing. Multiple clicking brings the error: An error occured during the request. Unable to proceed
  5. See Nextcloud Log:

Expected behavior
MediaDC is successfully enabled.

Screenshots
grafik

Setup:

Add pagination

Description
I ran a task and have a lot of files that matched: Photos 153957 files (350.47 GB) (precision: 100%)
When opening the task, I see a bunch of web requests to https://my.nextcloud.com/index.php/apps/mediadc/api/v1/tasks/3, and they all time out (> 30 seconds) or do return but the response is huge: content-length: 338923 gzipped.
Everything is pretty slow on this page.

I propose to solve this issue by implementing pagination. So the web requests could only load a few items. This would drastically shorten the time the web requests take.

Thank you for this great app!

In addition to delete have an ignore option

When reviewing duplicate groups I come across images that are indeed rather similar but I still want to keep both images .

What I am missing is the option to ignore these duplicate groups as false-positive/ignored images and have the duplicate group drop from the list as resolved.
Preferably also have those false-positive/ignored images no longer show up in future jobs unless a new (not jet ignored) image is found that matches a previously ignored image.

Automatically open next duplicate group after closing the last one

As a user having to review hundresds suggested deletions I find the tool great but the interface somewhat clunky to use.
When finished with one duplicate group it removes it from the list and you have to open the next one.
Depending on when you click the next duplicate group the list will jump on you as one duplicate group opens and the last one gets removed from the list.

The request is to

  • have the option for it to automatically open the next duplicate group in line once you have resolved one duplicate group.
  • Alternatively have the option to open all duplicate groups as they are loaded but then set the number of duplicate groups per page to one.

"Update" error

Describe the bug

Error when clicking the "update button for any of the plugins. Happens with all of the plugins. Then I have to do a "Check Installation" again to show the list of plugins, and it'll also show Installed = True.

To Reproduce
Just click the Update button

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Desktop (please complete the following information):
Latest version as of today, installed via the built in NC apps installer.

scan task returns error state

Dear all,
thanks for your efforts on duplicate identification!
I have installed the software seemingly without any problems, but when a regular user runs a scan across her photo library, the task returns with an error. It would be great if the end user would be able to see some more info on the error that occured.
Now it is always up to the admin to go bug hunting. In small installations that's OK, but with 3000+ users will not scale.
Thanks,
Peter.

MediaDC fails to install

Describe the bug
MediaDC fails to install and throws the error down below.

To Reproduce
Steps to reproduce the behavior:

  1. Run the install command / install through the store. (occ app:install mediadc)
  2. Get an error:
Illegal instruction (core dumped)
An unhandled exception has been thrown:
TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/html/custom_apps/mediadc/lib/Service/PythonService.php:357
Stack trace:
#0 /var/www/html/custom_apps/mediadc/lib/Service/PythonService.php(357): count(NULL)
#1 /var/www/html/custom_apps/mediadc/lib/Service/PythonService.php(153): OCA\MediaDC\Service\PythonService->parsePythonOutput(Array)
#2 /var/www/html/custom_apps/mediadc/lib/Migration/AppUpdateStep.php(72): OCA\MediaDC\Service\PythonService->installDependencies('required option...')
#3 /var/www/html/lib/private/Repair.php(123): OCA\MediaDC\Migration\AppUpdateStep->run(Object(OC\Repair))
#4 /var/www/html/lib/private/legacy/OC_App.php(1059): OC\Repair->run()
#5 /var/www/html/lib/private/Installer.php(149): OC_App::executeRepairSteps('mediadc', Array)
#6 /var/www/html/core/Command/App/Install.php(75): OC\Installer->installApp('mediadc', false)
#7 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\App\Install->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\App\Install), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/lib/private/Console/Application.php(209): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/console.php(99): OC\Console\Application->run()
#13 /var/www/html/occ(11): require_once('/var/www/html/c...')
#14 {main}

Expected behavior
I expect the app to install without problems.

Server:

  • Docker: nextcloud:22.2.0
  • CPU x64
  • Nextcloud version: 22.2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.