Skip to content

Local Walkthrough

This article will walk you through getting Kometa set up and running locally. It will cover:

  1. Retrieving the Kometa code
  2. Installing requirements

  3. Setting up the initial config file

  4. Creating some sample collections using the defaults
  5. Setting up a Collection File and creating a sample collection.
  6. Adding some default overlays.

The specific steps you will be taking:

  1. Verify that the version of Python installed is between 3.9 and 3.13.

  2. Verify that Git is installed and install it if not

  3. Use git to retrieve the code

  4. Install requirements [extra bits of code required for Kometa]

  5. Gather two things that Kometa requires:

    • TMDb API Key
    • Plex URL and Token
  6. Then, iteratively:
    • use python to run the image
    • use a text editor to modify a couple of text files until you have a working config file and a single working Collection File.

Note that running a Python script is inherently a pretty technical process. If you are unable or unwilling to learn the rudiments of using tools like python and git, you should probably strongly consider running Kometa in Docker. That will eliminate the Python and git installs from this process and make it as simple as it can be.

If the idea of editing YAML files by hand is daunting, this may not be the tool for you. All the configuration of Kometa is done via YAML text files, so if you are unable or unwilling to learn how those work, you should stop here.

Finally, this walkthrough is intended to give you a basic grounding in how to get Kometa running. It doesn't cover how to create your own collections, or how to add overlays, or any of the myriad other things Kometa is capable of. It provides a simple "Getting Started" guide for those for whom the standard install instructions make no sense; presumably because you've never run a Python script before.

Prerequisites

Tip

Nearly anywhere you see

something like this

That’s a command you’re going to type or paste into your terminal (OSX or Linux) or Powershell (Windows). In some cases it's displaying output from a command you've typed, but the difference should be apparent in context.

Additionally, anywhere you see this icon:

That's a tooltip, you can press them to get more information.

Important

This walkthrough is going to be pretty pedantic. I’m assuming you’re reading it because you have no idea how to get a Docker container going, so I’m proceeding from the assumption that you want to be walked through every little detail. You’re going to deliberately cause errors and then fix them as you go through it. This is to help you understand what exactly is going on behind the scenes so that when you see these sorts of problems in the wild you will have some background to understand what’s happening. If I only give you the happy path walkthrough, then when you make a typo later on you’ll have no idea where that typo might be or why it’s breaking things.

I am assuming you do not have any of these tools already installed. When writing this up I started with a brand new Windows 10 install.

This walkthrough involves typing commands into a command window. On Mac OS X or Linux, you can use your standard terminal window, whether that's the builtin Terminal app or something like iTerm. On Windows, you should use PowerShell. There are other options for command windows in Windows, but if you want this to work as written, which I assume is the case since you've read this far, you should use Powershell.

Important

This walkthrough is assuming you are doing the entire process on the same platform; i.e. you're installing Kometa and editing its config files on a single Linux, Windows, or OS X machine. It doesn't account for situations like running Kometa on a Linux machine while editing the config files on your Windows box.

Prepare a small test library [optional]

While going through this process, Kometa is going to load the movies in your library, create some collections, and apply some overlays. If you have a large library, this will be very time-consuming.

For best results with this walkthrough, your test library will contain:

For learning and testing, we will be taking advantage of the plex-test-libraries repository which contains pre-made videos to use when following this guide.

Using the plex-test-libraries repository will ensure we have enough variety in media to populate the example collections that will be created. Running some of these default collections against a library of a few thousand movies can take hours, and for iterative testing it's useful to have something that will run in a few minutes or seconds.

Navigate to wherever you want to store these pre-made videos and then type:

git clone https://github.com/chazlarson/plex-test-libraries
cd plex-test-libraries

You should now see 2 folders, test_tv_lib and test_movie_lib. You will want to mount each of these to a library within Plex, as showcased here:

Test Plex Libraries (Click to Expand)

Library Name: test_movie_lib

test_movie_lib

Library Name: test_tv_lib

test_movie_lib

Installing Python

In order to run a Python script. the first thing you'll need is a Python interpreter. This is typically already present on Linux and Mac, but will probably have to be installed on Windows.

Let's check if Python is already installed [type this into your terminal]

python3 --version

If this doesn't return a version between 3.9 and 3.13, you'll need to installed a supported version of Python.

Describing a python install for any arbitrary linux is out of scope here, but if you're using Ubuntu, this might be useful.

Follow the instructions here: Installing Python 3 on Mac OS X

Before installing Python, try again without the 3 [type this into your terminal]

python --version

Depending on the version of Python, you may need to use one or the other. If this works, you're ready to go, just substitute python for python3 in the couple places it appears below.

Go to http://www.python.org/download and download Python 3.13. Kometa has not been tested and may be non-functional on any version of Python beyond 3.13

Once downloaded, run the installer. Tick “Add to path” checkbox at the bottom and click “Install Now”.

For Windows 10, you will need to enable scripts in PowerShell.Follow the instructions here to do so. If you skip this step you're going to hit a hard stop in a moment.


Installing git

To copy the Kometa code to your machine, we'll be using git. This may be installed on Mac or Linux, and probably isn't in Windows.

Let's check if Git is already installed [type this into your terminal]

git --version

If this doesn't return a version number, you'll need to get git installed.

The git install is discussed here: Download for Linux and Unix

The git install is discussed here: Git - Downloading Package

Download the installer from here

Run the install; you can probably just accept the defaults and click through except for the step that asks you to choose an editor; you probably want to choose something other than the default there:

git-install

This install comes with its own command line interface. Do not use this interface in this walkthrough. Continue to do everything here in Powershell.


Retrieving the Kometa code

Now we're going to use git to make a copy of the code on your local computer in the home directory [type this into your terminal]

cd ~
git clone https://github.com/Kometa-Team/Kometa
cd Kometa

Now git checkout to the branch reflecting the version of the wiki you are reading, as some functionality may be dependent on this. If you are reading the latest version of the wiki, no git checkout is required.

If you are reading the latest version of the wiki, no git checkout is required.

git checkout develop
git checkout nightly
Important Information

The rest of this walkthrough assumes you are staying in this directory in this terminal/Powershell window.

In the future, when you want to run Kometa at the command line, you have to be in this directory.

When you open a command window to run Kometa, the first step will always be:

cd ~
cd Kometa

There are parts of the code that are assuming and expecting that you will be in this directory when you run Kometa [the fonts used in overlays are one example]. Be sure that you are always in this directory when you run Kometa.

What did that do?
cd ~

This changes to your home directory, which will be something like /home/yourname or /Users/yourname or C:\Users\YourName depending on the platform.

git clone https://github.com/Kometa-Team/Kometa

This uses git to make a copy of (clone) the Kometa code from where it is stored on github.

cd Kometa

This moves into the directory that was created by the clone command.

Later on you can move it elsewhere if you want, but for now put it there. This will ensure that everything to follow works just like it says here. Presumably you’re reading this because the other docs are unclear to you. Don’t make unilateral changes to my assumptions while doing this.

Why use git instead of downloading the release ZIP?

Retrieving the code with git makes updating simpler. When you want to update to the newest version, you can go into this directory and type:

git pull

No need to download a new ZIP, decompress it, etc.

Also, if you are asked to [or want to] switch to the latest develop or nightly code, you can do so with:

git checkout develop
git checkout nightly

Setting up a virtual environment

This walkthrough is going to use a "virtual environment", since that provides a simple way to keep the requirements for a given thing self-contained; think of it as a "sandbox" for this script. It also provides a clean way to recover from mistakes, and keeps the host system clean.

[type this into your terminal]

python3 -m venv kometa-venv

If you see an error like:

Error: Command '['/home/mroche/Kometa/kometa-venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

You probably need to make sure the Python 3.9-specific virtualenv support library is installed:

[type this into your terminal]

sudo apt-get install python3.9-venv

Then try the original venv command above again.

[type this into your terminal]

python3 -m venv kometa-venv

[type this into your terminal]

python -m venv kometa-venv

If you see:

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

You apparently didn't check the “Add to path” checkbox above under installing Python. "Repair" your Python install and check"add python to environment variables".

What did that do?
python3 -m venv kometa-venv

This tells Python3 to use the venv module to create a virtual environment called kometa-venv. The only visible effect will be the creation of a kometa-venv directory.

That command will not produce any output if it works; it will display an error if a problem occurs. If everything is fine, you will be looking at something like this:

> python -m venv kometa-venv
>

If you aren't looking at an error, you're ready to move on.

That will create the virtual environment, and then you need to activate it:

[type this into your terminal]

source kometa-venv/bin/activate

[type this into your terminal]

source kometa-venv/bin/activate

[type this into your terminal]

.\kometa-venv\Scripts\activate

If you see something like this:

.\kometa-venv\Scripts\activate : File C:\Users\mroche\Kometa\kometa-venv\Scripts\Activate.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink LinkID=135170.
At line:1 char:1
+ .\kometa-venv\Scripts\activate
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

You apparently skipped the "enable scripts in Powershell" step above under installing Python for Windows.

You will need to take care of that before moving on. Follow the instructions here.

Once you have done that, try the activation step again.

That command will not produce any output if it works; it will display an error if a problem occurs.

You may see a change in your prompt, something like this:

  Kometa git:(master)  source kometa-venv/bin/activate
(kometa-venv)   Kometa git:(master) 

Note that the prompt now shows the name of the virtual environment. You may not see this; it's dependent on your terminal configuration, not anything to do with Python or Kometa.

What did that do?

This tells Python to make the virtual environment "active", which means to use the copy of python that is available there, install all support libraries there, etc. This keeps the Kometa code and its runtime environment totally separate from your host machine's environment.

An advantage of doing this in a virtual environment is that in the event something goes wrong with this part of the setup, you can delete that kometa-venv directory and do the setup again.

IMPORTANT: In the future, when you want to run the script, you will need to do this "activation" step every time. Not the venv creation, just the activation:

[type this into your terminal]

source kometa-venv/bin/activate

[type this into your terminal]

source kometa-venv/bin/activate

[type this into your terminal]

.\kometa-venv\Scripts\activate

Installing requirements

Kometa, like every other Python script, depends on support libraries that manage things like connections to Plex, or getting things from the internet, or writing files and so on.

These support libraries are called “requirements”, and they are defined in that file called requirements.txt. To install them, type the following command [type this into your terminal]:

python -m pip install -r requirements.txt

You should see something like this [I’ve removed a few lines for space, and the specific versions may have changed since this was captured]:

Collecting PlexAPI==4.7.0
  Downloading PlexAPI-4.7.0-py3-none-any.whl (133 kB)
     |████████████████████████████████| 133 kB 821 kB/s
Collecting tmdbv3api==1.7.6
  Downloading tmdbv3api-1.7.6-py2.py3-none-any.whl (17 kB)
...
Installing collected packages: urllib3, idna, charset-normalizer, certifi, six, ruamel.yaml.clib, requests, tmdbv3api, tenacity, ruamel.yaml, tenacity, PlexAPI, pillow, pathvalidate, lxml, arrapi
    Running setup.py install for tenacity ... done
    Running setup.py install for arrapi ... done
Successfully installed PlexAPI-4.7.0 arrapi-1.1.3 certifi-2021.10.8 charset-normalizer-2.0.7 idna-3.3 lxml-4.6.3 pathvalidate-2.4.1 pillow-8.3.2 requests-2.26.0 tenacity-8.3.0 ruamel.yaml-0.17.10 ruamel.yaml.clib-0.2.6 tenacity-8.3.0 six-1.16.0 tmdbv3api-1.7.6 urllib3-1.26.7
WARNING: You are using pip version 21.1.3; however, version 21.3 is available.
You should consider upgrading via the '/Users/mroche/Kometa/kometa-venv/bin/python -m pip install --upgrade pip' command.

Don't worry about the WARNING about pip version thus-and-such if it comes up.

Encountered error while trying to install package.

If you see an error that ends in something like this:

...
building 'lxml.etree' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> lxml

You've hit the error we were referring to above with the Python version being too recent. Probably you are running Python 3.11 in late 2022 or Python 3.12 shortly after its release. Deactivate and delete the virtual environment and create one based on the previous Python release [which may involve removing Python and reinstalling the older version depending on platform], then try this step again.

What did that do?

This told Python to use the pip module to install some libraries that Kometa needs.

Verify install and create config template

Running the script at this point will verify that all is well and will create a template config for you to start with.

Then run Kometa:

[type this into your terminal]

python kometa.py -r

You should see something like this:

Configuration file (config.yml) created at /SOME/PATH/TO/Kometa/config/config.yml. Please open this file and update it with your API keys and other required settings.

If, instead, you see something like:

Traceback (most recent call last):
  File "/some/path/to/Kometa/kometa.py", line 1, in <module>
    import argparse, os, platform, re, sys, time, uuid, requests
ModuleNotFoundError: No module named 'requests'

You either haven't activated the virtual environment OR you haven't installed the requirements [OR you've done both these things but you installed the requirements outside the virtual environment]. Review the previous two steps.

Create a directory to quiet an error later

The default config file contains a reference to a directory that will show an error in the output later. That error can safely be ignored, but it causes some confusion with new users from time to time.

We'll create it here so the error doesn't show up later.

Setting up the initial config file

Next you’ll set up the config file. This tells Kometa how to connect to Plex and a variety of other services.

Before you do this you’ll need:

  1. TMDb API key. They’re free.
  2. Plex URL and Token

There are a bunch of other services you can configure in the config file, but these two are the bare minimum.

Getting a TMDb API Key

Note that if you already have an API key, you can use that one. You don’t need another.

Go to https://www.themoviedb.org/. Log into your account [or create one if you don’t have one already], then go to “Settings” under your account menu.

profile-menu

In the sidebar menu on the left, select “API”.

sidebar

Click to generate a new API key under "Request an API Key". If there is already one there, copy it and go to the next step.

There will be a form to fill out; the answers are arbitrary. The URL can be your personal website, or probably even google.com or the like.

Once you’ve done that there should be an API Key available on this screen. If you see v3 and v4, you want the v3 key.

apikey

Copy that value, you’ll need it for the config file.

Getting a Plex URL and Token

The Plex URL is whatever URL you’d use from this machine to connect directly to your Plex server [i.e. NOT app.plex.tv].

As with the TMDb API Key, if you already have a Plex Token, you can use that one.

This article will describe how to get a token: Finding an authentication token

Editing the config file


Scroll down a bit and update the three things you just collected; Plex URL, Plex Token, and TMDb API Key.

plex:                                           # Can be individually specified per library as well
  url: http://bing.bang.boing                <<< ENTER YOUR PLEX URL HERE
  token: XXXXXXXXXXXXXXXXXXXX                <<< ENTER YOUR PLEX TOKEN HERE
  timeout: 60
  db_cache:
  clean_bundles: false
  empty_trash: false
  optimize: false
tmdb:
  apikey: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   <<< ENTER YOUR TMDb API KEY HERE
  language: en

Now scroll up and look at the top section:

## This file is a template remove the .template to use the file

libraries:                       # This is called out once within the config.yml file
  Movies:                        # Each library must match the Plex library name
    collection_files:
      - default: basic               # This is a file within the defaults folder in the Repository
      - default: imdb                # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git
    remove_overlays: false       # Set this to true to remove all overlays
    overlay_files:
      - default: ribbon              # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git
  TV Shows:
    collection_files:
      - default: basic               # This is a file within the defaults folder in the Repository
      - default: imdb                # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git
    remove_overlays: false       # Set this to true to remove all overlays
    overlay_files:
      - default: ribbon              # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git
  Anime:
    collection_files:
      - default: basic               # This is a file within the defaults folder in the Repository
      - default: anilist             # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git
  Music:
    collection_files:
      - file: config/Music.yml   # This is a local file THAT YOU MIGHT CREATE
playlist_files:
  - default: playlist                # This is a file within Kometa's defaults folder
  # see the wiki for how to use local files, folders, URLs, or files from git

You will ultimately need an entry here for each of the libraries on which you want Kometa to act. Those top-level elements [Movies, TV Shows, Anime, Music] are names of libraries on your Plex server.

For now, follow these steps:

  • Delete the "TV Shows", "Anime" and "Music" sections from the config file
  • Delete the "remove_overlays" line
  • Delete the "overlay_files" section
  • Delete the "playlist_files" section
  • Rename "Movies" to "Movies-NOSUCHLIBRARY"

The top bit of your config file should now look like this:

libraries:
  Movies-NOSUCHLIBRARY:                        # Each library must match the Plex library name
    collection_files:
      - default: basic               # This is a file within the defaults folder in the Repository
      - default: imdb                # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git
Warning

If the top bit of your config file does not look like this, make the necessary adjustments.

You should not have any overlay_files or playlist_files at this stage, if you do then remove them.

This is intended to cause an error for illustration that you will then fix.

Be very careful with the indentation and ensure it looks exactly like the above; each line indented using two spaces, NOT TABS, indentation is significant in YAML.

Testing the config file

Save the file:

Then run Kometa:

[type this into your terminal]

python kometa.py -r

I’ve removed some of the lines for space, but have left the important bits:

...
|                                            Starting Run|
...
| Locating config...
|
| Using /Users/mroche/Kometa/config/config.yml as config
...
| Connecting to TMDb...
| TMDb Connection Successful
...
| Connecting to Plex Libraries...
...
| Connecting to Movies-NOSUCHLIBRARY Library...                                                      |
...
| Plex Error: Plex Library Movies-NOSUCHLIBRARY not found                                            |
| Movies-NOSUCHLIBRARY Library Connection Failed                                                     |
|====================================================================================================|
| Plex Error: No Plex libraries were connected to                                                    |
...

You can see there that Kometa found its config file, was able to connect to TMDb, was able to connect to Plex, and then failed trying to read the “Movies-NOSUCHLIBRARY" library, which of course doesn’t exist.

Open the config file again and change "Movies-NOSUCHLIBRARY" to reflect your own Movie library in Plex.

Since we're using the plex-test-libraries media, our Movie library is called “test_movie_lib", so mine looks like this:

libraries:
  test_movie_lib:                            ## <<< CHANGE THIS LINE
    collection_files:
      - default: basic               # This is a file within the defaults folder in the Repository
      - default: imdb                # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git

At this point, the top bit of your config file should look like this:

libraries:
  THE_NAME_OF_YOUR_MOVIE_LIBRARY:         ## <<< CHANGE THIS LINE
    collection_files:
      - default: basic               # This is a file within the defaults folder in the Repository
      - default: imdb                # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git

Where THE_NAME_OF_YOUR_MOVIE_LIBRARY has been replaced by the name of your movie library as shown in Plex ["test_movie_lib" here]:

movie-lib-name

Creating a few sample collections

Kometa provides an extensive collection of "default" collection, overlay and playlist files.

These files provide a simple way for you to create collections/overlays/playlists based on franchises or awards or actors, etc.

The config we are working on links to two Defaults Collection Files, these lines in your config file:

libraries:
  test_movie_lib:
    collection_files:
      - default: basic               # <<< DEFAULTS COLLECTION FILE
      - default: imdb                # <<< DEFAULTS COLLECTION FILE

Collections that will be created include:

  • Newly Released
  • New Episodes [TV libraries only]
  • IMDb Popular
  • IMDb Top 250
  • IMDb Lowest Rated

Then run Kometa:

[type this into your terminal]

python kometa.py -r

If the default collection files do not allow you to create the collections you want, you can define your own collections in your own collection files to do whatever you like within the capabilities of Kometa. We will create a simple collection that will contain 20 comedy movies released since 2012.

First, open the Collection File [this will create the file if it doesn't already exist]:

[type this into your terminal]

nano "config/Movies.yml"

[type this into your terminal]

nano "config/Movies.yml"

[type this into your terminal]

notepad "config\Movies.yml"

In this file, add the following, exactly as it is shown here; remember that spacing is significant in YAML files:

collections:
  Recent Comedy:
    plex_search:
      all:
        genre: Comedy
        year.gte: 2012
      limit: 20

Save the file:

If you're using nano, type control-x, then y, then the enter key.

If you're using nano, type control-x, then y, then the enter key.

If you're using notepad, type control-s or choose Save from the File menu.

Next, add a reference to this file to your config file.

Open the config file again and add the last line shown below:

libraries:
  test_movie_lib:
    collection_files:
      - default: basic
      - default: imdb
      # see the wiki for how to use local files, folders, URLs, or files from git
      - file: config/Movies.yml     ## <<< ADD THIS LINE

That line needs to match the path you used when you created the file a moment ago. If you are copy-pasting these commands, it does.

Save the file:

If you're using nano, type control-x, then y, then the enter key.

If you're using nano, type control-x, then y, then the enter key.

If you're using notepad, type control-s or choose Save from the File menu.

Then run Kometa:

[type this into your terminal]

python kometa.py -r

You should see that the Collection File gets loaded:

| Loading Collection File: config/Movies.yml
| Collection File Loaded Successfully

As it builds the collection, you should see a fair amount of logging about which movies are being added and which ones aren’t found. Once it completes, go to Plex, go to your Movies library, and click “Collections” at the top.

You should see the new collection:

finished-collections

When you click into each, you’ll see the movies that Kometa added to each collection.

Each time you run the script, new movies that match the collection definitions will be added. For example, if you don’t have “The ShawShank Redemption” now, when you download it and run Kometa again it will be added to the IMDB 250 collection.

Adding Overlays to movies

The default collection files include a set of overlays you can add to your posters.

We'll add resolution overlays to the movies in this library as an example.

Open the config file again and add the last three lines shown below:

libraries:
  test_movie_lib:
    collection_files:
      - default: basic               # This is a file within the defaults folder in the Repository
      - default: imdb                # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git
      - file: config/Movies.yml
    remove_overlays: false            ## <<< ADD THIS LINE
    overlay_files:                         ## <<< ADD THIS LINE
      - default: resolution                   ## <<< ADD THIS LINE

Save the file:

If you're using nano, type control-x, then y, then the enter key.

If you're using nano, type control-x, then y, then the enter key.

If you're using notepad, type control-s or choose Save from the File menu.

Then run Kometa:

[type this into your terminal]

python kometa.py -r

While it runs this time you should see the previous collections go by pretty quickly, since they aren't changing, and then a lot of logging as Kometa decides which overlays apply to which movies.

This may take quite a while depending on the size of this library.

Eventually, you'll see it start applying overlays to all your movies:

|=========================================================|
|    Applying Overlays for the test_movie_lib Library     |
|=========================================================|
|                                                         |
| 10 Cloverfield Lane         | Overlays Applied: 4K-HDR  |
| 10 Minutes Gone             | Overlays Applied: 4K-HDR  |
| 10 Things I Hate About You  | Overlays Applied: 4K-HDR  |
| 12 Mighty Orphans           | Overlays Applied: 4K-HDR  |
| 12 Monkeys                  | Overlays Applied: 4K-DV   |
| 12 Strong                   | Overlays Applied: 4K-HDR  |
...

When it finishes, go to the Library tab in this library in Plex:

overlaid-posters

What comes next:

If you want to remove those overlays, open the config file, change the value of remove_overlays to true, and rerun Kometa.

    remove_overlays: true
    overlay_files:
      - default: resolution

If you want to remove those collections, open the config file, remove or comment out [add # to the beginning] any or all of those lines under collection_files, and delete the collections manually from Plex.

libraries:
  test_movie_lib:
    collection_files:
      # - default: basic               # This is a file within the defaults folder in the Repository
      # - default: imdb                # This is a file within the defaults folder in the Repository
      # see the wiki for how to use local files, folders, URLs, or files from git
      # - file: config/Movies.yml
    remove_overlays: false
    overlay_files:
      - default: resolution

Edit Movies.yml to reflect the actions you want Kometa to perform on your libraries.

TV Shows and other libraries work the same way as you've seen above. Create a section under libraries: in the config.yml, refer to default files or create a Collection File, define collections, run the script.

Investigate the rest of the wiki to learn about everything Kometa can do for you.

Runtime and Environment Flags

The command in this walkthrough will run all collections and libraries immediately. If you want to modify that behavior to run just one or some collections, or just one library, or just overlays or the like, review the Run Commands & Environment Variables.

Creating Collections, Overlays, Playlists, etc.

These things are all generally defined in collection files that are referred to in the config file. The starting point for creating these files is here.

When you are done, deactivate the virtual environment:

[type this into your terminal]

deactivate

Other Topics

Scheduling

The commands you've been using in this walkthrough run Kometa immediately then quit.

Kometa also features multiple layers of scheduling, which you can leverage to control when various activities take place.

  • You can run Kometa in the background, telling it to wake up and process your libraries at fixed times during the day. The default behavior in this regard is to wake up at 5AM and process the config. If you leave the -r off the commands you have been using in this walkthrough, that's what will happen.

You can control when Kometa wakes up with the time-to-run env-var/runtime flag.

  • You can skip using that internal schedule and just do manual runs as you have been doing throughout this walkthrough using standard tools available in your OS.

Details on setting this up are found here.

  • In addition, individual items within the configuration can be scheduled to take place at certain times provided Kometa is running at that time. For example, you can tell Kometa only to apply overlays on Tuesdays or the like. You can then schedule manual runs every day at noon and overlays will only get processed when it runs on Tuesday. This sort of schedule will not make Kometa start up if it is not already running. If you don't arrange for Kometa to be run on Tuesday, your overlays would never be processed in this example.

Details on this level of scheduling are found here

I want to update to the latest version of the current Kometa branch

[type this into your terminal]

cd ~/Kometa
git pull
source kometa-venv/bin/activate
python -m pip install -r requirements.txt

[type this into your terminal]

cd ~/Kometa
git pull
source kometa-venv/bin/activate
python -m pip install -r requirements.txt

[type this into your terminal]

cd ~\Kometa
git pull
.\kometa-venv\Scripts\activate
python -m pip install -r requirements.txt

I want to use the develop branch

[type this into your terminal]

cd ~/Kometa
git checkout develop
git pull
source kometa-venv/bin/activate
python -m pip install -r requirements.txt

[type this into your terminal]

cd ~/Kometa
git checkout develop
git pull
source kometa-venv/bin/activate
python -m pip install -r requirements.txt

[type this into your terminal]

cd ~/Kometa
git checkout develop
git pull
.\kometa-venv\Scripts\activate
python -m pip install -r requirements.txt

I want to use the nightly branch

[type this into your terminal]

cd ~/Kometa
git checkout nightly
git pull
source kometa-venv/bin/activate
python -m pip install -r requirements.txt

[type this into your terminal]

cd ~/Kometa
git checkout nightly
git pull
source kometa-venv/bin/activate
python -m pip install -r requirements.txt

[type this into your terminal]

cd ~/Kometa
git checkout nightly
git pull
.\kometa-venv\Scripts\activate
python -m pip install -r requirements.txt

I want to use the master branch

[type this into your terminal]

cd ~/Kometa
git checkout master
git pull
source kometa-venv/bin/activate
python -m pip install -r requirements.txt

[type this into your terminal]

cd ~/Kometa
git checkout master
git pull
source kometa-venv/bin/activate
python -m pip install -r requirements.txt

[type this into your terminal]

cd ~/Kometa
git checkout master
git pull
.\kometa-venv\Scripts\activate
python -m pip install -r requirements.txt