MBFilmDB - User's Guide

Complete application guide for film collection management

Version 0.2.2.30

Navigation

Requirements

Installation procedure (source code)

1

Klonak Repository

git clone https://github.com/dedababimiskolezy-hub/MFilmDB.git

2

Create virtual environment

python -m venv venv or conda create -n mfdb python=3.10

3

Install Addiction

pip install -r requirements.txt

4

Start the application

python MfilmDB.py

πŸ’‘
Tip: To create a separate .exe file, use the script build_exe_gui.py or build_exe.py.
APP _ DATA TOOLS

The following items are added:

This section describes additional utility and graphic tools in the directory APP_DATA/. They are designed for more advanced modifications, mass processing and creation of support data for application.

APP_DATA/extract_film_metadata.py

Mass extractor of technical metadata from files (length, resolution, codec, bitrate). Uses ffprobe / ffmpeg if available in PATH.

APP_DATA/ISP_Generator_GUI.py

GUI tool for creating thumbnails / sprite- sheets and smaller previews of images used in HTML exports.

APP_DATA/localize_data.py

It contains a list of supported languages and localization chains. For adding or editing a language:

  1. Open up. APP_DATA/localize_data.py and add a new entry in the list LANGUAGES (code + name).
  2. Add translations to the relevant data structure, or to the localization file.
  3. Restart the application to make changes.

APP_DATA/logic.py - parser file names

Includes functions for the extraction of metadata from the filename, primarily parse_filename_metadata(). You can edit or add new patterns (regex) here to better recognize your own names.

An example of Python application:

from APP_DATA.logic import parse_filename_metadata
meta = parse_filename_metadata('Moje.Filmovka.2024.1080p.BluRay.mkv')
print(meta)

APP_DATA/ThemeAdder_GUI.py and APP_DATA/themes.py

Theme editor - created themes are saved into project configuration and are then available in Settings β†’ Select theme.

How to add your own provider (e.g. specialized scraper)

If you want to add a new metadata source, proceed with caution:

  1. Create a new module in APP_DATA, e.g. APP_DATA/enrich_myprovider.py, and implement the type function enrich_film_myprovider(title, year, file_path)which returns a dictionary with fields corresponding to database columns.
  2. Register a new resource in MfilmDB.py in configuration DEFAULT_CONFIG['sources'] (add the default True / False key) and in the list of descriptions in metadata sources dialog.
  3. Add a call to the enrichment orchestrator or adjust the order of providers according to the priority (see Enrichment section).
  4. Test locally on several samples - web scraping can be sensitive to changes in the structure of the target site.

General remarks on instruments

Sample outputs

The following are examples of typical tool outputs - they serve as references for validation of results.

1) Example CSV output from extract_film_metadata.py

file_path,duration,video_codec,width,height,bitrate
/media/Film/Example.Movie.2024.mkv,01:42:15,h264,1920,1080,3500k
/media/Film/Clip.Video.2023.mp4,00:03:45,h264,1280,720,800k

2) Example JSON result from parse_filename_metadata()

{
  "title": "Moje Filmovka",
  "year": 2024,
  "quality": "1080p",
  "source": "BluRay",
  "language": "CZ",
  "extra": {"resolution": "1920x1080"}
}

3) Example CSV for HTML export (sample row)

id;title;original_title;year;duration;rating;cover_path
1;Moje Filmovka;My Movie;2024;102;8.5;covers/moje_filmovka_2024.jpg

Screenshots (placeholders)

You can insert real screenshots into the manual. Below are placeholders that you can replace with real images in the folder navod_cz/images/ (next to file navod_cz.html).

Main window - placeholder
Fig. 1 - Application main window (replace for real image: navod_cz/images/main_window.png).
Output extract _ film _ metadata - placeholder
Fig. 2 - Example CSV output from extract_film_metadata.py (Replace: navod_cz/images/extract_metadata.png).

How to insert real screenshot:

  1. Save image to docs/navod_cz/images/ (create folder if not available).
  2. Rename the file by caption (e.g. main_window.png or main_window.svg).
  3. Open this file docs/navod_cz.html and change src in tag <img> to a new path (e.g. navod_cz/images/main_window.png).

Detailed texts and tips

Practical tips for export work

Screenshots Tips

FIRST SPIRIT

β†’ First start

When the application is first started, it creates:

Main window layout

Zone Location Function
ITEM Upper bar File, Modifications, Tools, Settings
The tool panel Under the menu Search, filters, fast action
The Table of Films Center List of all films in the database
The detailed section Right side Preview of selected film, cover
SECTION II Bottom bar Number of films, status of operations
BASIC PROCEDURE

‑ Basic settings

Access to settings

Menu: Settings β†’ Different items

Selection of the topic of appearance

Settings β†’ Select theme

Language Change

Setting β†’ Localization / Language

Metadata resources

Setting β†’ Metadata Sources...

Here you can turn on / off individual sources:

_

INDIVIDUAL INSTRUMENTS

Method of addition

πŸ“‚

Scanning Folder

Automatic addition of all films from the folder

βž•

Manual addition

Add one film with manual filling

πŸ“

Drag & Drop

Drag files / folders to a window

Manual addition of film

1

Open dialog

Menu: Modifications β†’ Add Film...

2

Fill in the data

Name, year, genre, path to file, path to cover...

3

Save

Click on the button Save

✨
Tip: For faster addition use the automatic folder scanning the enrichment of metadata from the internet.
DISCLOSURE

SECTION 1

Access

Menu: Tools β†’ Scanning Folder...

Scanning modes

Scheme Icon Description Speed
Quick Scan ⚑ Only basic info (path, size, format) Very fast
Deep Scan πŸ” + Metadata extraction from file names and paths Medium
Full Scan 🌐 + online enrichment (TMDb, CSDD, covers...) Slow (depends on the internet)

What is extracted from file name

⚠️
Attention: Full Scan can can take a long time with big collections. For 1000 + movies we recommend Quick Scan first and then gradual enrichment.

SECTION Editing of the alert

Editing methods

Available fields

Field Description
titleFilm title (Czech)
original _ titleOriginal title
yearYear of issue
genreGenre (s)
DirectorDirector
writerScenario
cinematographyCamera
musicMusic
castcast
dubbingDabing
subtitlesSubtitles
durationFilm length
file _ sizeFile size
file _ pathFile Path
cover _ pathPath to cover
fenceDescription of the action
NoteRemarks
ratingEvaluation
qualityQuality (1080p, 4K...)
MAINTENANCE

INCLUDING Film Lubrication

Delete one film

  1. Select the film in the table
  2. Menu: Edit β†’ Delete selected
  3. Confirm dialog
⚠️
Warning: The lubrication is irreversible! The application only erases the log from the database, file on disk remains.
METADATE RESOURCES

β€’ Metadata resources

The application supports downloading metadata from the following sources:

API KEY

ITEM keys

Getting TMDb API key

  1. Register themoviedb.org
  2. Go to Settings β†’ API
  3. Ask for API key (developer)
  4. Copy the key to the application: Setting β†’ Metadata Sources

Getting OMDb API key

  1. Go to dmidbapi.com
  2. Select the Tier (Free = 1000 requirements / day)
  3. Confirm email and copy key
πŸ’‘
Note: API keys are saved in config.json. Do not publish this file (it contains your keys).

ITEM Enrichment

Enrichment is an automatic metadata supplement process from online sources.

Automatic enrichment

It runs at Full Scan or when using Watchdog with auto_import: true.

Manual enrichment

  1. Select the film (s) in the table
  2. Right click β†’ Reset Metadata
  3. The application will download the current data from sources

Priority of resources

The order in which the data are combined (adjustable):

  1. TMDb (preferred source)
  2. OMDb / IMDb
  3. CSDD
  4. β™ͺ FDb.cz β™ͺ
  5. Other

Data import

Import from older versions

Menu: File β†’ Import from older versions...

Supported formats:

Standard import

Menu: File β†’ Import...

Import from current formats (CSV, JSON) exported by this version.

Data Export

Access

Menu: File β†’ Export...

Available formats

Format File Application
CSV .csv Table Processors (Excel, LibreOffice)
JSON - Yeah. Programming, advance payment
Excel .xlsx Microsoft Excel with embedded preview
HTML .html Web page for browsing
XML .xml Structured integration data
ZIP .zip HTML + all covers in archive
HTML CHALLONES

HTML Export Templates

When exporting to HTML, you can choose from several templates:

--Watchdog - automatic tracking

What's a Watchdog?

Watchdog is a function that automatically monitors selected folders and when Add a new video file automatically imports it into the database.

Settings

Menu: Tools β†’ Watchdog Settings...

Configuration

πŸ’‘
Tip: Watchdog is ideal for viewing download folder or NAS, where new movies are automatically added.
TEMATIVES

SECTION 4

Change of topic

Menu: Settings β†’ Select theme

ttkbootstrap topics

Dark: Darkly, Superhero, Cyborg, Warp, Solar

Light: flatly, letter, mint, lumen, sandstone, yeti

Other: cosmo, journal, pulse, morph...

Own topics

You can create your own color scheme:

  1. Setting β†’ Select theme β†’ Own themes
  2. β€Ί Create a new theme...
  3. Define colors (bg, fg, accent, header, table...)
  4. Save theme
⚠️
Note: After changing the subject it is recommended to restart the application for full application of changes.
DESIGN

† Search and filter

Quick Search

Field in the toolbar - searches the name, original name, year, director.

Advanced Search

Menu: Tools β†’ Advanced search...

Multi-level sorting

Menu: Tools β†’ Multi-level sorting...

COLLECTION ABBREVIATIONS

SECTION Keyboard abbreviations

Shortcut Event
Ctrl + N New Film
Ctrl + O Import
Ctrl + S Export
Ctrl + F Search
Enter Edit selected
Delete Delete selected
F5 Reset Display

β€’ Frequently Asked Questions (FAQ)

Where's the database stored?

In the same folder as the application, file mfilmdb.db (SQLite).

Can I use the offline app?

Yes, the basic functions are offline. The Internet is needed for the enrichment metadata.

How to back up the database?

Copy Files mfilmdb.db and config.json. If applicable, folder covers/.

Does he support the application of the series?

Partly - you can add episodes as separate entries. Full support of the series is planned.

How to add a new metadata source?

Requires source code modification - addition of function enrich_film_* and registration in configuration.

PROBLEMS 'SOLUTION

* Problem solving

The application will not start

The metadata are not downloading

The Covers are not displayed

β™ͺ Watchdog's not working β™ͺ

πŸ›
Error reporting: Use to report errors GitHub Issues.

β€’ Detailed user manual

Quick start

  1. Start 'python MfilmDB.py' or use the compiled .exe '.
  2. In the menu Setting β†’ Watchdog set the folders to track and press Save.
  3. V Default Check the API keys for TMDb / OMDb / CSDD if you want online enrichment.
  4. Import files: drag them into the application window or use Import β†’ Scanning Folder.

Main Screen

The film table shows basic metadata (subtitle, year, length, source, dubbing). Click on the line to open the detail where you can modify metadata, replace the cover or run enrichment.

Import and export

The application supports: CSV, XLSX (with pictures), JSON, HTML gallery and AIO ZIP exports. In export templates you will find settings of columns and formats in Setting β†’ Export.

Enrichment metadata

Enrichment combines results from multiple providers (TMDb, OMDb, CSDD, FDb). Selection of providers and priorities can be found in Setting β†’ Enrichment. Function Enrich Smart automatically merge the best available data.

Note: For video clips and music videos you can allow a specialized provider IMVDB in source settings (default off). To add your own provider, add implementation to APP_DATA and set it in the configuration file.

Watchdog (automatic folder tracking)

Watchdog monitors added folders for new files. When you detect a new file, it will start parsing the name, create a record and download the cover / thumbnail if enabled.

Covers management

SimpleCoverDownloader downloads images in several sizes. In the details of the film you can copy the cover to the clipboard, download the alternative cover or use offline fallback.

Advanced Settings

Solving frequent problems

If the application does not display covers or metadata, check the API key settings, the availability of 'ffmpeg' / 'ffprobe' in PATH and the folder permissions.