remove obsolete files

pull/1220/head
Chaz Larson 2 years ago
parent 976fba777c
commit 0eb84fe60f

@ -1,34 +0,0 @@
Next youll set up the config file. This tells PMM how to connect to Plex and a variety of other services.
Before you do this youll need:
1. TMDb API key. Theyre free.
1. 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 dont need another.
Go to https://www.themoviedb.org/. Log into your account [or create one if you dont have one already], then go to “Settings” under your account menu.
In the sidebar menu on the left, select “API”.
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 youve done that there should be an API Key available on this screen.
Copy that value, youll need it for the config file.
#### Getting a Plex URL and Token
The Plex URL is whatever URL youd 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](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/)

@ -1,73 +0,0 @@
---
Scroll down a bit and update the three things you just collected; Plex URL, Plex Token, and TMDb API Key.
```yaml
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
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:
```yaml
## 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
metadata_path:
- file: config/Movies.yml # This is a local file on the system
- folder: config/Movies/ # This is a local directory on the system
- pmm: basic # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
- pmm: imdb # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
overlay_path:
- remove_overlays: false # Set this to true to remove all overlays
- file: config/Overlays.yml # This is a local file on the system
- pmm: ribbon # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
TV Shows:
metadata_path:
- file: config/TVShows.yml
- folder: config/TV Shows/
- pmm: basic # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
- pmm: imdb # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
overlay_path:
- remove_overlays: false # Set this to true to remove all overlays
- file: config/Overlays.yml # This is a local file on the system
- pmm: imdb_top_250 # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
Anime:
metadata_path:
- file: config/Anime.yml
- pmm: basic # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
- pmm: anilist # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
Music:
metadata_path:
- file: config/Music.yml
```
You will ultimately need an entry here for each of the libraries on which you want PMM 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 and change the name of the “Movies” section to “Movies-NOSUCHLIBRARY":
```yaml
libraries:
Movies-NOSUCHLIBRARY: ## <<< CHANGE THIS LINE
metadata_path:
- file: config/Movies.yml # This is a local file on the system
- folder: config/Movies/ # This is a local directory on the system
- pmm: basic # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
- pmm: imdb # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
overlay_path:
- remove_overlays: false # Set this to true to remove all overlays
- file: config/Overlays.yml # This is a local file on the system
- pmm: imdb_top_250 # This is a file within the https://github.com/meisnate12/Plex-Meta-Manager-Configs Repository
```
This is intended to cause an error for illustration that you will then fix.

@ -1,36 +0,0 @@
Ive removed some of the lines for space, but have left the important bits:
```
...
| Starting Run|
...
| Locating config...
|
| Using /Users/mroche/Plex-Meta-Manager/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 PMM 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 doesnt exist.
Open the config file again and change "Movies-NOSUCHLIBRARY" to reflect *your own* Movie library in Plex. Then delete all but the first line under the "metadata_path” heading. A few of them will create sets of collections, and we just want to create a few as examples.
My Movies library is called “Main Movies", so mine looks like this:
```yaml
libraries:
Main Movies: ## <<< CHANGE THIS LINE
metadata_path:
- file: config/Movies.yml
```

@ -1,24 +0,0 @@
Now youll see some more activity in the Plex connection section:
```
$ docker run --rm -it -v "/Users/mroche/plex-meta-manager:/config:rw" meisnate12/plex-meta-manager --run
...
| Connecting to Plex Libraries...
...
| Connecting to Main Movies Library...
...
| Loading Metadata File: config/Movies.yml
|
| YAML Error: File Error: File does not exist config/Movies.yml
...
| Metadata File Error: No valid metadata files found
|
| Main Movies Library Connection Failed
...
```
PMM may start cataloging your movies at this point; you can hit control-C to stop that if it's happening.
We can see there that it connected to the Plex Library but failed to find that `Movies.yml` metadata file.
So far so good.

@ -1,60 +0,0 @@
Now we have to set up that metadata file that PMM just complained about.
This metadata file contains definitions of the actions you want PMM to take; these can be things like creating collections or playlists, adding overlays, changing things like posters, etc. You can find lots of examples [here](https://github.com/meisnate12/Plex-Meta-Manager-Configs) and throughout the wiki.
For now were going to create a few collections so you can watch the process work, then youre on your own to create whatever others you want.
First, open the metadata file [this will create the file if it doesn't already exist]:
````{tab} Linux
[type this into your terminal]
```
nano "config/Movies.yml"
```
````
````{tab} OS X
[type this into your terminal]
```
nano "config/Movies.yml"
```
````
````{tab} Windows
[type this into your terminal]
```
notepad "config\Movies.yml"
```
````
In this file, add the following, exactly as it is shown here:
```yaml
templates:
Actor:
actor: tmdb
tmdb_person: <<person>>
tmdb_actor_details: <<person>>
sort_title: +_<<collection_name>>
sync_mode: sync
collection_order: release
collection_mode: hide
collections:
Bill Murray:
template: {name: Actor, person: 1532}
Best of the 1980s:
tmdb_discover:
primary_release_date.gte: 01/01/1980
primary_release_date.lte: 12/31/1989
with_original_language: en
sort_by: popularity.desc
limit: 100
summary: A collection of the Top Content of the 1980s
Vultures 101 Best Movie Endings:
letterboxd_list: https://letterboxd.com/brianformo/list/vultures-101-best-movie-endings/
```
I chose a letterboxd list for the last one since trakt requires authentication and again, I didnt want to complicate this walkthrough.
This is going to create three collections. One contains movies that feature Bill Murray. One is up to 100 movies that came out in the 1980s sorted by popularity. The last are movies that appear on a list of good endings according to Vulture.
The first one is based on a template to illustrate that concept. If you wanted to create a collection for another actor you just have to copy and edit those two lines [the ID comes from TMDb]. All the other config details come from the template.

@ -1,32 +0,0 @@
This time you should see that the metadata file gets loaded:
```
| Loading Metadata File: config/Movies.yml
| Metadata File Loaded Successfully
```
And this time it will catalog all your movies. This could take a while depending on how many movies are in that library.
Once this mapping is complete it will move on to build those three collections.
As it builds the collections, you should see a fair amount of logging about which movies are being added and which ones arent found. Once it completes, go to Plex, go to your Movies library, and click “Collections” at the top.
You should see the three new collections:
![Finished Collections](finished.png)
When you click into each, youll see the movies that PMM added to each collection.
Each time you run the script, new movies that match the collection definition will be added. For example, if you dont have “The Razors Edge” now, when you download it and run PMM again it will be added to the Bill Murray collection.
If you download any of the missing 22 movies on the Vulture list, running PMM would add them to that collection. And so on.
### What comes next:
Delete these three collections if you want, from both Plex and the metadata file [`config/Movies.yml`].
Edit `Movies.yml` to reflect the actions you want PMM 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, create a metadata file, define collections, run the script.
Investigate the rest of the wiki to learn about everything Plex-Meta-Manager can do for you.
Loading…
Cancel
Save