---
search:
boost: 4
---
# Library Operations
There are a variety of Library Operations that can be utilized in a library.
Within each library, operations can be defined by using the `operations` attribute, as demonstrated below.
When not using a list under `operations` the whole operations value is one block.
???+ example
```yaml
libraries:
Movies:
collection_files:
- default: imdb
operations:
mass_critic_rating_update: tmdb
split_duplicates: true
```
## Operation Blocks
You can create individual blocks of operations by using a list under `operations` with each item in the list being a
"block" that can be individually scheduled.
???+ example
```yaml
libraries:
Movies:
collection_files:
- default: imdb
operations:
- schedule: weekly(friday)
mass_critic_rating_update: tmdb
- schedule: weekly(saturday)
split_duplicates: true
```
## Operation Attributes
###### Assets For All
??? blank "`assets_for_all` - Used to search the asset directories for images for all items in the library."
`managed: true` | Collection must be Managed to be deleted (collection has the `Kometa` label) |
`managed: false` | Collection must be Unmanaged to be deleted (collection does not have the `Kometa` label) |
`configured: true` | Collection must be Configured to be deleted (collection is in the config file of the specific Kometa run) |
`configured: false` | Collection must be Unconfigured to be deleted (collection is not in the config file of the specific Kometa run) |
`less: ###` | Collection must contain less than the given number of items to be deleted. ### is a Number greater than 0 Optional value which if undefined means collections will be deleted regardless of how many items they have |
`ignore_empty_smart_collections: false` | Do not apply less check to empty smart collections This allows retaining things like smart collections that show movies without subtitles or the like. |
**The collection does not need to be scheduled to be considered configured and only needs to be in the config file.**
???+ example "Example"
Removes all Managed Collections (Collections with the `Kometa` Label) that are not configured in the Current Run.
```yaml
libraries:
Movies:
operations:
delete_collections:
configured: false
managed: true
```
###### Mass Genre Update
??? blank "`mass_genre_update` - Updates the genres of every item in the library."
`tmdb` | Use TMDb for Genres |
`tvdb` | Use TVDb for Genres |
`imdb` | Use IMDb for Genres |
`omdb` | Use IMDb through OMDb for Genres |
`anidb` | Use AniDB Main Tags for Genres |
`anidb_3_0` | Use AniDB Main Tags and All 3 Star Tags and above for Genres |
`anidb_2_5` | Use AniDB Main Tags and All 2.5 Star Tags and above for Genres |
`anidb_2_0` | Use AniDB Main Tags and All 2 Star Tags and above for Genres |
`anidb_1_5` | Use AniDB Main Tags and All 1.5 Star Tags and above for Genres |
`anidb_1_0` | Use AniDB Main Tags and All 1 Star Tags and above for Genres |
`anidb_0_5` | Use AniDB Main Tags and All 0.5 Star Tags and above for Genres |
`mal` | Use MyAnimeList for Genres |
`lock` | Lock all Genre Field |
`unlock` | Unlock all Genre Field |
`remove` | Remove all Genres and Lock all Field |
`reset` | Remove all Genres and Unlock all Field |
List of Strings for Genres (["String 1", "String 2"] ) |
???+ example "Example"
```yaml
libraries:
Movies:
operations:
mass_genre_update:
- imdb
- tmdb
- ["Unknown"]
```
###### Mass Content Rating Update
??? blank "`mass_content_rating_update` - Updates the content rating of every item in the library."
`mdb` | Use MDBList for Content Ratings |
`mdb_commonsense` | Use Common Sense Rating through MDBList for Content Ratings |
`mdb_commonsense0` | Use Common Sense Rating with Zero Padding through MDBList for Content Ratings |
`mdb_age_rating` | Use MDBList Age Rating for Content Ratings |
`mdb_age_rating0` | Use MDBList Age Rating with Zero Padding for Content Ratings |
`omdb` | Use IMDb through OMDb for Content Ratings |
`mal` | Use MyAnimeList for Content Ratings |
`lock` | Lock Content Rating Field |
`unlock` | Unlock Content Rating Field |
`remove` | Remove Content Rating and Lock Field |
`reset` | Remove Content Rating and Unlock Field |
Any String for Content Ratings |
???+ example "Example"
```yaml
libraries:
Movies:
operations:
mass_content_rating_update:
- mdb_commonsense
- mdb_age_rating
- NR
```
###### Mass Original Title Update
??? blank "`mass_original_title_update` - Updates the original title of every item in the library."
`anidb` | Use AniDB Main Title for Original Titles |
`anidb_official` | Use AniDB Official Title based on the language attribute in the config file for Original Titles |
`mal` | Use MyAnimeList Main Title for Original Titles |
`mal_english` | Use MyAnimeList English Title for Original Titles |
`mal_japanese` | Use MyAnimeList Japanese Title for Original Titles |
`lock` | Lock Original Title Field |
`unlock` | Unlock Original Title Field |
`remove` | Remove Original Title and Lock Field |
`reset` | Remove Original Title and Unlock Field |
Any String for Original Titles |
???+ example "Example"
```yaml
libraries:
Anime:
operations:
mass_original_title_update:
- anidb_official
- anidb
- Unknown
```
###### Mass Studio Update
??? blank "`mass_studio_update` - Updates the studio of every item in the library."
`tmdb` | Use TMDb Rating |
`imdb` | Use IMDb Rating |
`trakt_user` | Use Trakt User's Personal Rating |
`omdb` | Use IMDbRating through OMDb |
`mdb` | Use MDBList Score |
`mdb_average` | Use MDBList Average Score |
`mdb_imdb` | Use IMDb Rating through MDBList |
`mdb_metacritic` | Use Metacritic Rating through MDBList |
`mdb_metacriticuser` | Use Metacritic User Rating through MDBList |
`mdb_trakt` | Use Trakt Rating through MDBList |
`mdb_tomatoes` | Use Rotten Tomatoes Rating through MDBList |
`mdb_tomatoesaudience` | Use Rotten Tomatoes Audience Rating through MDBList |
`mdb_tmdb` | Use TMDb Rating through MDBList |
`mdb_letterboxd` | Use Letterboxd Rating through MDBList |
`mdb_myanimelist` | Use MyAnimeList Rating through MDBList |
`anidb_rating` | Use AniDB Rating |
`anidb_average` | Use AniDB Average |
`anidb_score` | Use AniDB Review Score |
`mal` | Use MyAnimeList Score |
`lock` | Lock Rating Field |
`unlock` | Unlock Rating Field |
`remove` | Remove Rating and Lock Field |
`reset` | Remove Rating and Unlock Field |
Any Number between 0.0-10.0 for Ratings |
???+ example "Example"
```yaml
libraries:
Movies:
operations:
mass_audience_rating_update:
- mdb
- mdb_average
- 2.0
mass_critic_rating_update:
- imdb
- omdb
- 2.0
mass_user_rating_update:
- trakt_user
- 2.0
```
###### Mass Episode Rating Update
??? blank "`mass_episode_***_rating_update` - Updates the audience/critic/user rating of every episode in the library."