Skip to content

Commit

Permalink
Update install guides to use plex-test-libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Jan 31, 2025
1 parent 41cf553 commit 4b82be6
Show file tree
Hide file tree
Showing 16 changed files with 88 additions and 69 deletions.
Binary file added docs/kometa/install/images/test_movie_lib.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/kometa/install/images/test_tv_lib.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/kometa/install/images/wt-default-collections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/kometa/install/images/wt-finished.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/kometa/install/images/wt-movie-lib-name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/kometa/install/images/wt-overlays.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 37 additions & 32 deletions docs/kometa/install/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

This article will walk you through getting Kometa set up and running. 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.
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 the Git tools are installed and install them if not
3. Use `git` to retrieve the code
4. Install requirements [extra bits of code required for Kometa]
5. Gather two things that the script requires:
- TMDb API Key
- Plex URL and Token
1. Verify that the version of Python installed is between 3.9 and 3.13.
2. Verify that the Git tools are installed and install them if not
3. Use `git` to retrieve the code
4. Install requirements [extra bits of code required for Kometa]
5. Gather two things that the script requires:
1. TMDb API Key
2. Plex URL and Token

6. Then, iteratively:
- use `python` to run the script
- use a text editor to modify a couple of text files until you have a working config file and a single working Collection File.
1. Use `python` to run the script
2. 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](docker.md). That will eliminate the Python and git installs from this process and make it as simple as it can be.

Expand All @@ -39,7 +39,7 @@ 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.

???+ warning ""
???+ warning

This walkthrough is going to be pretty pedantic. I’m assuming you’re reading it because you have no idea how to get a Python script 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, then when you make a typo later on you’ll have no idea where that typo might be or why it’s breaking things.

Expand Down Expand Up @@ -83,9 +83,9 @@ Since most of this is typing commands into a terminal, you'll need to have a ter

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.

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

``` { .shell }
```shell
python3 --version
```

Expand All @@ -101,10 +101,9 @@ If this doesn't return a version between `3.9` and `3.13`, you'll need to instal

=== ":fontawesome-brands-windows: Windows"

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

Before installing Python, try again without the `3`:

```
```shell
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.
Expand All @@ -122,9 +121,9 @@ If this doesn't return a version between `3.9` and `3.13`, you'll need to instal

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.

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

``` { .shell }
```shell
git --version
```

Expand Down Expand Up @@ -153,17 +152,19 @@ If this doesn't return a version number, you'll need to get git installed.

### Retrieving the Kometa code

Now we're going to use `git` to make a copy of the code on your local computer.

Clone the repo into your home directory and go into that directory [type this into your terminal]:
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]

``` { .shell }
```shell
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.
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.**

=== ":fontawesome-brands-github: latest"

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

=== ":fontawesome-brands-github: develop"

Expand All @@ -173,13 +174,17 @@ Now `git checkout` to the branch reflecting the version of the wiki you are read

git checkout nightly

**NOTE: The rest of this walkthrough assumes you are staying in this directory in this terminal/Powershell window.**
???+ tip "Important Information"

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

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

#### Navigating to the Kometa Code

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

``` { .shell }
```shell
cd ~
cd Kometa
```
Expand All @@ -189,7 +194,7 @@ There are parts of the code that are assuming and expecting that you will be in
<details>
<summary>What did that do?</summary>

``` { .shell }
```shell
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.
Expand Down
21 changes: 15 additions & 6 deletions docs/kometa/install/wt/wt-02-config-bad-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,32 @@ playlist_files:

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, delete the “TV Shows”, “Anime”, and "Music" sections from the config file and change the name of the “Movies” section to “Movies-NOSUCHLIBRARY":
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:

```yaml
libraries:
Movies-NOSUCHLIBRARY: ## <<< CHANGE THIS LINE
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
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
```

???+ 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, with `playlist_files:` all the way over on the left. Indentation is significant in YAML.
**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.**

9 changes: 3 additions & 6 deletions docs/kometa/install/wt/wt-03-lib-err-and-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ You can see there that Kometa found its config file, was able to connect to TMDb

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

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

```yaml
libraries:
All The Movies: ## <<< CHANGE THIS LINE
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
Expand All @@ -46,11 +46,8 @@ libraries:
- 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
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
```

Where `THE_NAME_OF_YOUR_MOVIE_LIBRARY` has been replaced by the name of your movie library as shown in Plex ["All The Movies" here]:
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](../images/wt-movie-lib-name.png)
21 changes: 8 additions & 13 deletions docs/kometa/install/wt/wt-04-default-intro.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
Kometa provides an extensive collection of "default" collection files.
Kometa provides an extensive collection of "default" collection, overlay and playlist files.

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

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

```yaml
libraries:
THE_NAME_OF_YOUR_MOVIE_LIBRARY:
test_movie_lib:
collection_files:
- default: basic # <<< THIS LINE
- default: imdb # <<< THIS LINE
playlist_files:
- default: playlist
- default: basic # <<< DEFAULTS COLLECTION FILE
- default: imdb # <<< DEFAULTS COLLECTION FILE
```
The first will create:
Collections that will be created include:
- Newly Released
- New Episodes [TV libraries only]
The second will create:
- IMDb Popular
- IMDb Top 250
- IMDb Lowest Rated
- IMDb Lowest Rated
2 changes: 1 addition & 1 deletion docs/kometa/install/wt/wt-05-local-file-unraid.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Open the config file again and add the last line shown below:
```yaml
libraries:
All The Movies:
test_movie_lib:
collection_files:
- default: basic
- default: imdb
Expand Down
2 changes: 1 addition & 1 deletion docs/kometa/install/wt/wt-05-local-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Open the config file again and add the last line shown below:
```yaml
libraries:
All The Movies:
test_movie_lib:
collection_files:
- default: basic
- default: imdb
Expand Down
2 changes: 1 addition & 1 deletion docs/kometa/install/wt/wt-07-overlay-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Open the config file again and add the last three lines shown below:

```yaml
libraries:
All The Movies:
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
Expand Down
2 changes: 1 addition & 1 deletion docs/kometa/install/wt/wt-08-overlay-after.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Eventually, you'll see it start applying overlays to all your movies:

```
|=========================================================|
| Applying Overlays for the All The Movies Library |
| Applying Overlays for the test_movie_lib Library |
|=========================================================|
| |
| 10 Cloverfield Lane | Overlays Applied: 4K-HDR |
Expand Down
2 changes: 1 addition & 1 deletion docs/kometa/install/wt/wt-09-next-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you want to remove those collections, open the config file, remove or comment

```yaml
libraries:
All The Movies:
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
Expand Down
27 changes: 20 additions & 7 deletions docs/kometa/install/wt/wt-test-library.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
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 learning and testing, you would be well-advised to create a small test library of a reasonable size, where reasonable it probably below a thousand.

The author has a small library of 10 movies that is used for fast tests.

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

- At least two comedy movies released since 2012.
Expand All @@ -12,8 +8,25 @@ For best results *with this walkthrough*, your test library will contain:
- At least two movies from [IMDb's Lowest Rated](https://www.imdb.com/chart/bottom).
- A couple different resolutions among the movies.

That will ensure there's something to go into each of the example collections that will be created.
For learning and testing, we will be taking advantage of the [`plex-test-libraries` repository](https://github.com/chazlarson/plex-test-libraries) 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:

``` { .shell }
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:

??? success "Test Plex Libraries (Click to Expand)"

Library Name: `test_movie_lib`

![test_movie_lib](../images/test_movie_lib.png){ width="600" }

The advantage of the small test library is that it will reduce the time needed to see results. 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.
Library Name: `test_tv_lib`

You can set up a test library like this using symlinks without copying files.
![test_movie_lib](../images/test_tv_lib.png){ width="600" }

0 comments on commit 4b82be6

Please sign in to comment.