Skip to main content

Mendia File Scraper

About

This is a client for mendia. It indexes local media (currently limited to movies), stores the findings in a local database and publishes new additions to the server running mendia.

Installation:

sudo apt update
sudo apt install libmediainfo0v5
pip install mendiafilescraper

Note: This package needs the mediainfo library.

Ubuntu/Debian: 'libmediainfo0v5'

Arch: 'libmediainfo'

Usage:

--setup:

Asks for

  • Username
  • Password
  • Media folders
  • Server address (e.g wss://hostname/ws/, depending on the mendia server)

and stores everything in a config file in the home directory

~/.mendiafilescraper/config.txt

--scan:

Searches all given media folders for new additions and adds them to the database.

--publish:

Sends new additions to the configured mendia server. Use only with --scan

Example:

Settings

mendia-scraper --setup

Add media paths, specify the server address and put in your username and password.

Note: Ask the admin of your target mendia server to create a username/password for you.

First scan

The initial scan populates the local database. --publish should not be used for the first scan, otherwise this might flood the server.

mendia-scraper --scan

Warning: Make sure that the initial scan worked before proceeding.

Real scan

After the first scan we can add --publish, from now on new movies will be sent to mendia.

mendia-scraper --scan --publish

Cronjob

It makes sense to add the scan command to your crontab for automatic scans.

crontab -e

For a daily scan add

@daily mendia-scraper --scan --publish

Problems:

I have a new movie but mendia did not inform about it

It is possible to delete movies from the local database and to retry scanning the movie.

Note: It is easier to use a gui application with sqlite support, but on typical NAS systems there is no gui.

sudo apt install sqlite3
cd ~/.MendiaFileScraper
sqlite3 database.db

Let's say we want to remove the movie "Captive State".

In the sqlite3 shell:

SELECT title, hash FROM movies WHERE instr(title, 'Captive') > 0;

If you do not see any result, play with the search parameters until you found it.

Let's say our result is:

Captive State|a67edf9ee879a7562c17092b97dfe672

The second value is the hash value that was computed based on the movie file. To delete the entry with the has "a67edf9ee879a7562c17092b97dfe672" we do:

DELETE FROM movies WHERE hash="a67edf9ee879a7562c17092b97dfe672";

CTRL+D to exit from the sqlite3 shell.

Voila, the movie was removed and you can retry scanning with

mendia-scraper --scan --publish

Metadata

Release files for mendiafilescraper 3.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mendiafilescraper 3.1.1
File Size Uploaded Provenance Actions
mendiafilescraper-3.1.1.tar.gz 12.3 kB Without provenance Details for mendiafilescraper-3.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mendiafilescraper 3.1.1
File Interpreter ABI Platform Actions
mendiafilescraper-3.1.1-py3-none-any.whl Python 3 none any Details for mendiafilescraper-3.1.1-py3-none-any.whl

Total release size: 25.5 kB

Release files / mendiafilescraper-3.1.1.tar.gz

Download URL mendiafilescraper-3.1.1.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
be8f7fb3f2eec3fdaf6e71cfb6d5c14e70636c246bf2b30b8efd43cb2d0dea1f
BLAKE2b-256 checksum
How to use checksums
942e2f4a25533e5aa8367a826df97893bad2461efb646dbe80c3bfedb3801522
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.11.1 Linux/5.4.109+

Release files / mendiafilescraper-3.1.1-py3-none-any.whl

Download URL mendiafilescraper-3.1.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09aab1ecc8983e5ab283ae8e8a809d431ba05c204c1d4f4ee374fd9f95b5afa7
BLAKE2b-256 checksum
How to use checksums
26ad500cd0d77a48fea2011fd11cd463035a1098b2eb8e2d6cea658051108c04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.11.1 Linux/5.4.109+

Security for mendiafilescraper 3.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page