I have 3 Playlists with hundreds of movies i am trying to get Kometa to label/tag so they show up in Collections tab on Plex. In the container log i'm getting this error, "| Collection Error: plex_playlist attribute not supported |" so i'm not sure if Kometa can access my Playlists, add relevant tags so they auto populate in their respective Collection?
#Plex Playlist Help
1 messages · Page 1 of 1 (latest)
Welcome @novel narwhal!
It looks like you have not yet completed the id:customize section of our Discord server, this will allow us to help you quicker.
Someone from <@&938443185347244033> will assist when they're available.
Including meta.log from the beginning is a huge help. Type !logs for more information.
After attaching your log, do not forget to hit the green check boxes when prompted by our bot.
You can press the "Close Post" button above or type /close at any time to close this post.
📝 If you want to review this again, th3gaynerd:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> 📝
**User Info**
Author of Linked Message: Michael
Person who Invoked the Command: Antwan
File Name: meta-7.log
Table of Contents:
Page 01: User Info
Page 02: Kometa Info
Page 03: Kometa Summary Info
Page 04: Kometa Config.yml YAML Validation ✅
Page 05: Plex Configuration - Section 1
Page 06: Rec 01 - 💥 [CRITICAL]
Page 07: Rec 02 - ❌ [ERROR]
Page 08: Rec 03 - ⚠️ [WARNING]
Page 09: Rec 04 - 💬💡️ PLEX DB CACHE ADVICE
Page 1/9
and what is in your collections.yml
none of what is in there is valid
where did you get either of those lines? you are also not using any builder
Chat gpt. what's a builder?
Do Not Use AI with Kometa
🚫 Please don’t use ChatGPT, Gemini, or any other AI tool to generate YAML for Kometa
This includes Configuration Files, Collections, Overlays, Metadata etc.
These models often produce YAML that looks right at first glance but is actually broken, unsupported, or just plain nonsensical — and it won't work with Kometa.
💡 If you need help building YAML or setting up configs, feel free to ask in #general-chat, or you can open a support ticket in #1006644783743258635.
Our community and team are always happy to assist.
This is the log error i saw in the container: | Collection Error: plex_playlist attribute not supported |
I just assumed it didn't work with playlists or am i wrong?
Is what i'm seeking possible tho??
https://kometa.wiki/en/latest/files/collections/#overview
Builders are listed on this page and required for any collection or overlay
Can you rephrase what you are seeking to do? I can't parse what it is you want to do.
still not sure what exactly you are trying to do? are you trying to build a collection based on whether or not it's in a playlist?
What is an overlay? I don't want it to do anything but scan my Playlist libraries, like, "Thriller" then add a tag to all 100+ movies in that playlist, so that it populates in the Collection tab "Thriller" automatically.
What is a "playlist library"?
A movie Playlist?
Right now it has over 100 films in it and i'd prefer not to tag films manually if i kometa can help do it for me
Can you provide a screenshot? You're using a lot of words in unusual ways, so I am not sure what you mean.
some people use "playlist" and "collection" and "library" to mean different things than what we would expect.
What is an overlay?
An image overlaid onto a movie poster, to indicate the resolution or something. Not anythign to do with what you want here.
OK, Kometa can build those collections. In a variety of ways.
Plex has the ability for you to create a Playlist. So, I have 3 Playlists already. All i want Kometa to do, is to scan my Playlists, then add corresponding tags to them, so they populate in the Collections tab.
Does that make sense?
So, Thriller, LGBT+, and Holiday are my 3 Playlists. I would want those tags added to movies in those Playlists, so Plex auto populates those films, in those Collections respectively.
I've spent hourssss trying to do this mess and then I was told it can't do that so IDK what to do. I'm new to this :/
for the love of god tell me how plz lmao i can't figure it out. is my collections.xml not right?
That's invalid.
These:
plex_playlist: Thriller
playlist_only: true
Are just things someone made up.
They aren't valid Kometa syntax at all.
🤦♂️ oh wow. so what would i do?
Kometa can't create a collection [or otherwise act on a list of items] based on "these movies are in this playlist".
It can create them based on genre, or some other criteria
So it can't go off my playlists at all?
No, there is no available builder [at this time] that is able to read playlists.
I would use labels but the UI doesn't work when trying to edit my Playlists in bulk.
So there's literally no way for Kometa to do this?
I wish I knew coding cause I could SSH into my Plex and have it do it itself.
I'm kinda shocked, are Playlists not popular at all?
The very specific question you are asking, no.
The actual problem you are trying to solve, probably.
Not really.
I imagine that most if not all of the movies in that thriller playlist have that genre. You could base your collection on the thriller genre as a starting point.
A script to tell Plex to tag all the movies in a playlist would probably be pretty trivial, then Kometa could act on those tags.
Is there anyone here that could make such a script?
There's an MDBList maintained by Kometa that contains LGBT+ movies; perhaps that could be a starting point.
There is the same for holiday movies.
There are built-in seasonal collections for Christmas and LGBT+ that you could use.
I could do it later tonight or tomorrow.
Any AI could probably produce it as well.
I have to step out to go to the next Christmas thing.
I would be happy to compensate you for your time too if it works. You could remote into my computer if you needed but I should be able to just SSH into my NAS and paste whatever code you make?
Ok! Ty! And Merry Xmas! ❤️
Put this in a file in your kometa dir, maybe playlist-tagger.py:
import yaml
import argparse
from plexapi.server import PlexServer
from plexapi.exceptions import NotFound
# Constants
CONFIG_PATH = 'config/config.yml'
def load_config(path):
with open(path, 'r') as file:
return yaml.safe_load(file)
def tag_playlist_items(playlist_name, tag_name):
try:
# 1. Load configuration from YAML
config = load_config(CONFIG_PATH)
plex_url = config['plex']['url']
plex_token = config['plex']['token']
# 2. Connect to the server
plex = PlexServer(plex_url, plex_token)
# 3. Try to get the playlist
try:
playlist = plex.playlist(playlist_name)
except NotFound:
# If playlist is not found, list all available ones
print(f"Error: Playlist '{playlist_name}' not found.")
all_playlists = plex.playlists()
if all_playlists:
print("\nAvailable playlists on this server:")
for p in all_playlists:
print(f" - {p.title}")
else:
print("\nNo playlists were found on this server.")
return
items = playlist.items()
print(f"Connected to: {plex.friendlyName}")
print(f"Found {len(items)} items in playlist '{playlist_name}'.\n")
# 4. Iterate and apply tag with duplicate check
for item in items:
# Check existing labels (Plex labels are case-sensitive, but we check case-insensitive)
existing_labels = [l.tag.lower() for l in item.labels]
if tag_name.lower() in existing_labels:
print(f"Skipping: '{item.title}' (Already tagged)")
else:
item.addLabel(tag_name)
print(f"Tagged: '{item.title}'")
print("\nProcess complete.")
except FileNotFoundError:
print(f"Error: Config file not found at {CONFIG_PATH}")
except KeyError as e:
print(f"Error: Missing key {e} in config.yml.")
except Exception as e:
print(f"An unexpected error occurred: {e}")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Tag all items in a Plex playlist.")
parser.add_argument("-p", "--playlist", required=True, help="The name of the Plex playlist.")
parser.add_argument("-t", "--tag", required=True, help="The label/tag to apply to the items.")
args = parser.parse_args()
tag_playlist_items(args.playlist, args.tag)
It will read the plex details from your Kometa config.
Run it as:
python playlist-tagger.py -p "Marvel Cinematic Universe (Timeline Order)" -t "mcu-test"
I do not understand what you mean, I'm new to all of this and I don't see any of the names for the tags in the script or where I would place them all. Can i call you from here?
python playlist-tagger.py -p "Marvel Cinematic Universe (Timeline Order)" -t "mcu-test"
The playlist you want to target is Marvel Cinematic Universe (Timeline Order)
The tag you want to apply to the items in that playlist is mcu-test
Where are you getting Marvel from? Does the file have to be saved as .yml? Run it where, how?
Put this in a file in your kometa dir, maybe playlist-tagger.py:
Marvel is an example.
You haven't shown what the names of your playlists are.
More generally:
python playlist-tagger.py -p "NAME OF YOUR PLAYLIST" -t "YOUR-TAG"
Yes, I have. They are here.
I have no way of knowing that that imaginary syntax represents.
Thriller, Holiday, LGBT+. Sorry but I'm not going to be able to understand this unless we can chat over audio. I don't learn by just reading things on my screen.
And there seems to be a disconnect between us.
OK, so:
python playlist-tagger.py -p "Thriller" -t "THE-TAG-YOU-WANT-TO-SET"
python playlist-tagger.py -p "Holiday" -t "THE-TAG-YOU-WANT-TO-SET"
python playlist-tagger.py -p "LGBT+" -t "THE-TAG-YOU-WANT-TO-SET"
Change THE-TAG-YOU-WANT-TO-SET for each playlist to whatever you want that tag to be.
Copy the text from this message using the little copy button in the corner:
<#1453839396653764731 message>
Create a file in your kometa directory, call that file playlist-tagger.py. You can do that with the text editor of your choice.
Paste that text you copied into that file. Save the file.
Now, in the terminal, cd into the Kometa directory, just as you would if you were going to run python kometa.py.
Run these three commands, one after the other:
python playlist-tagger.py -p "Thriller" -t "THE-TAG-YOU-WANT-TO-SET"
python playlist-tagger.py -p "Holiday" -t "THE-TAG-YOU-WANT-TO-SET"
python playlist-tagger.py -p "LGBT+" -t "THE-TAG-YOU-WANT-TO-SET"
WHEN YOU RUN THESE COMMANDS, change "THE-TAG-YOU-WANT-TO-SET" as appropriate.
After you have run those commands, all the items in those playlists will have a new label.
You can then use that label to build collections.
-
So I don't have to edit the py other than the tag i want to set, nothing else needs to be changed, not even adding in the name of the playlist to the .py file?
-
Now, in the terminal, cd into the Kometa directory, just as you would if you were going to run python kometa.py. What terminal? Where is this located? On my mac? Is there one in my NAS from Synology? What does "cd" mean?
I don't know how to make #1 any more clear. I have not told you to edit that py file anywhere.
I have told you to specify the collection name and tag when you run the script.
I specifically did that to make it simpler for you to run the script without having to edit it.
Oh, I see now that you are running this on a NAS. That makes this all a bunch more complicated.
There is a probably a far simpler way to solve the actual problem.
I hope so.
First, you have a playlist that you want to convert to a collection, right?
Why? What problem is that solving?
That's why I didn't know where I was running all of this code. Synology has their own terminal stuff.
Because I want it in a collection really. Playlists are private until you share with everyone, one by one, your friends.
OK, so you have a bunch of movies in a "Thriller" collection. Do they have anything in common besides "Michael put them in this playlist"?
Nope! They're just my curated Playlists that I want to be tagged properly so they populate in their respective Collection.
This is true of all three of those playlists?
Yup!
OK, so since Plex does not allow mass-editing of items in playlists, you have a few choices:
All of these are independent.
- tag these movies individually in the UI so that Kometa can use the tag to create collections.
- run a script like this one to do that automatically; with a NAS this is a bit more complicated.
- add the movies to lists on IMDB or some other site, then use those lists to drive the collections.
- create a Kometa collection file that calls out the movies individually.
There is no built-in way for Kometa to source a collection from a playlist.
Plex already creates collections automatically based on tags. I just want it to be tagged.
I wouldn't mind an IMDB list if Kometa can pull from that and make the collection in Plex?
Is that straight forward to do?
Yes, I realize you want them to be tagged. That is what I am discussing.
Plex already creates collections automatically based on tags
This is not altogether true. Plex can create "categories" automatically based on genres, and can automatically create collections based on TMDB franchises, but doesn't automatically create collections based on labels.
Plex does keep track of what's in a collection using collection tags, but Kometa does not have the ability to set those specific tags outside of creating a collection. In order to create a collection, Kometa needs to know what items to put in that collection. To so this, it needs a search or an external list or some other builder to gather that list. Unfortunately, a Plex playlist cannot be used as the source for that.
If Kometa couldn't create a collection from an IMDB list I wouldn't have suggested that as an option.
Creating a list on IMDB is straightforward, then you would create a collection file like this:
collections:
Thriller:
imdb_list:
list_id: ls123456789 # < YOU GET THIS ID FROM THE LIST YOU CREATE
limit: 200
sort_by: rating.asc
Holiday:
imdb_list:
list_id: ls987654321 # < YOU GET THIS ID FROM THE LIST YOU CREATE
limit: 200
sort_by: rating.asc
"LGBT+":
imdb_list:
list_id: ls789123456 # < YOU GET THIS ID FROM THE LIST YOU CREATE
limit: 200
sort_by: rating.asc
And add that to your config:
libraries:
Movies:
collection_files:
- file: config/playlist_collections.yml # < this is a name you came up with
That's the starting point.
The list_id of this list is ls4152978461 as shown in the URL at the top of the screen.
That's not a log.
📝 If you want to review this again, th3gaynerd:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> 📝
IMDb Error: List ls4152954922 is private and cannot be accessed
You didn't change the list to public.
This comment has nothing to do with what that setting does:
# IMPORTANT: avoids Plex cloud account calls that your local token can't do
playlist_report: false
There's no setting in Kometa that does what that comment claims.
Are you by any chance using AI to set this up?
I have about 400 films to add to IMDB lists so it's gonna take me hours, was hoping for a faster way to do this. Yes, gpt was helping me but clearly it didn't help at all. Thanks for trying to assist, I'll have to find another way that's faster because I could just tag them all in the same amount of time sadly. sigh Thought Kometa would def help.
It can but the very specific thing you want to do is not something it can do.
There are a bunch of ways to possibly solve this problem.
You could create a collection of Thrillers based on genre, or on an IMDB search.
You could base your holiday and LGBT collections on existing lists that Kometa maintains for those things.
IMDB is not the only source of lists.
You could copy and paste the list of movies into MDBlist and create an MDBList which you could then use to drive a collection. That might be simplest BUT will require you to create an account over there. I do that regularly for things like "looper's best horror of 2024".
There may be some other search or filter criteria that you could use to get the list you want.
You could find an existing Thriller/Holiday/LGBT IMDB list, copy it, and add/remove to make it match your specific list.
The only thing Kometa can't do is grab those three specific lists from those three playlists.
That's why I was asking questions about the actual problem to try to tease out details.
All time consuming, that's the problem. I do not want to sift through other lists, I just want mine, in a collection. It's such a simple ask, too, not sure why something so powerful is limited with this one thing. Someone mentioned they could turn a Collection into a Playlist, easily. Thanks again, but this issue will continue to exist for me it looks like. I'll try to find assistance with someone who can help with a script for my NAS. I really don't understand why this is so difficult for Kometa to do. 😭
How comfortable are you with running a python script on your computer?
I'm really doing my best to try to help you solve this very specific problem.
You are honestly the first person who has asked for this in all the years I have been working with Kometa.
Can you use Teamviewer or something similar so I can share my screen with you so you can see/controlas needed? I've only used it briefly. I know, it's why I want to get away from Playlists, had no idea they weren't really supported.
If you are going to continue using Kometa you will need to learn how to do these things yourself.
It is, for good or ill, a very technical tool.
So you have a choice.
- run a python script on your computer [mac or whatever].
I can provide you that script and help you learn how to run it, which will take a few minutes.
- use mdblist as a bridge.
I can help you through that, BUT you will need to do some text editing.
either one takes time.
Oh, Plex even makes the MDBlist option more difficult than it has to be.
Not to sound disrespectful, but, you're coming across a little condescending in your replies on here and maybe it's because i'm on the spectrum but I have asked you several times to please call me here or screen share or anything other than continuing to type replies here because it's been hours already, and you do not seem to want to do that to get this resolved as quickly as possible. I cannot keep replying every few minutes asking questions when calling or screensharing would be the fastest, easiest way to communicate between us. We have amassed over 115 chat replies, more than any that I've found in this whole group thus far. It is far easier to speak audibly.
I am happy to compensate you for your assistance, but your tone is coming across in a negative way for me.
I am generally not willing to get on screenshares to help individuals in that way since by doing that what usually happens is that is construed as an open invitation and commitment to support that installation personally for the rest of time.
I don't want assistance for this insalltion for the rest of time, once it's ran, that's it. I'm out, I'm over Kometa, I literally never want to hear of it again after it does the simple task I want it to do. I don't care if I use it ever again. I have no need for it other than this one thing.
Here's a script that will create collections for each playlist on the server. Download this to your Mac.
Open that file with a text editor. It will be in your Downloads directory.
Change these two lines to suit your Plex server:
# --- CONSTANTS ---
PLEX_URL = "http://YOUR_PLEX_IP:32400"
PLEX_TOKEN = "YOUR_PLEX_TOKEN"
Then save the file.
Now open a terminal on your Mac.
Type cd ~/Downloads and hit return
Type python3 -m pip install plexapi
Once that has finished, type python3 create_collections.py and hit return.
Have you downloaded that file to that directory?
It's in my Downloads folder on my mac.
at that prompt, type ls *.py
Looks like the wrong name.
create_colleections.py vs create_collections.py
The script should produce something like this:
> python3 create_collections.py
Connected to: Home-test
Found 3 playlists. starting sync...
Processing 'One' (18 items)...
Done: Added 18 new items to Collection 'One'.
------------------------------
Processing 'Three' (95 items)...
Done: Added 95 new items to Collection 'Three'.
------------------------------
Processing 'Two' (17 items)...
Done: Added 17 new items to Collection 'Two'.
------------------------------
All playlists processed successfully.
You have moved to a new directory.
I'm so confused right now.
Is that terminal still open?
OK, at this prompt, type ls *.py
Should I be accessing my NAS, i mean... how is it going to create playlists on my macbook?
no matches found
The script talks to your plex server on your NAS.
Then you apparently downloaded it somewhere else.
Try ls create*
no matches found
Then the Downloads folder in the screenshot is not the same Downloads folder as in the terminal.
I don't even know what in the world that means. So are you unable to screenshare?
We have been at this for 5 hours or so now to no avail. Something's not right and it would go faster if you just saw what I saw in real time.
I've told you I'm reluctant to do that for a variety of reasons.
Ok, and as I said, I really do not want anymore to do with Kometa after this is ran successfully. Why would a complete stranger ask you to conitnuiously help with Kometa after the inital problem is fixed? You sound incredibly arrogant and condescending.
Thanks for trying. I'm leaving this conversation out of enormrous frustration and lack of actual support. Good luck.
Because that has happened in the past.
You appear to have a very narrow view of what constitutes "actual support".
@novel narwhal none of us here get paid for this, we all do it to help and do it just for fun. We’ve all been through various stages of learning in this process.
You have been provided various options to get your playlists to a collection in Kometa. Using Kometa, is a technical tool and requires a little bit of technical know how.
I’ve followed this thread since it started and nowhere in here was Mr Carrot rude or condescending. He wrote too difference scripts for you and was just trying to help you with commands. Because the screenshot you shared of the file being saved and the terminal were not the same spot; and was just trying to help resolve that
antwanchild used !afnh
@novel narwhal, anything further needed here? If not, please type /close and hit enter. Please respond within 24 hours of this message or it will be archived.