1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00

Add latest added media as Plex library sensor attribute (#56235)

This commit is contained in:
jjlawren 2021-09-29 19:11:53 -05:00 committed by GitHub
parent a967a1d1df
commit 2ff1fc83bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 779 additions and 4 deletions

View File

@ -16,6 +16,7 @@ from .const import (
PLEX_UPDATE_SENSOR_SIGNAL,
SERVERS,
)
from .helpers import pretty_title
LIBRARY_ATTRIBUTE_TYPES = {
"artist": ["artist", "album"],
@ -28,6 +29,11 @@ LIBRARY_PRIMARY_LIBTYPE = {
"artist": "track",
}
LIBRARY_RECENT_LIBTYPE = {
"show": "episode",
"artist": "album",
}
LIBRARY_ICON_LOOKUP = {
"artist": "mdi:music",
"movie": "mdi:movie",
@ -174,6 +180,17 @@ class PlexLibrarySectionSensor(SensorEntity):
libtype=libtype, includeCollections=False
)
recent_libtype = LIBRARY_RECENT_LIBTYPE.get(
self.library_type, self.library_type
)
recently_added = self.library_section.recentlyAdded(
maxresults=1, libtype=recent_libtype
)
if recently_added:
media = recently_added[0]
self._attr_extra_state_attributes["last_added_item"] = pretty_title(media)
self._attr_extra_state_attributes["last_added_timestamp"] = media.addedAt
@property
def device_info(self):
"""Return a device description for device registry."""

View File

@ -78,18 +78,54 @@ def library_movies_all_fixture():
return load_fixture("plex/library_movies_all.xml")
@pytest.fixture(name="library_movies_metadata", scope="session")
def library_movies_metadata_fixture():
"""Load payload for metadata in the movies library and return it."""
return load_fixture("plex/library_movies_metadata.xml")
@pytest.fixture(name="library_movies_collections", scope="session")
def library_movies_collections_fixture():
"""Load payload for collections in the movies library and return it."""
return load_fixture("plex/library_movies_collections.xml")
@pytest.fixture(name="library_tvshows_all", scope="session")
def library_tvshows_all_fixture():
"""Load payload for all items in the tvshows library and return it."""
return load_fixture("plex/library_tvshows_all.xml")
@pytest.fixture(name="library_tvshows_metadata", scope="session")
def library_tvshows_metadata_fixture():
"""Load payload for metadata in the TV shows library and return it."""
return load_fixture("plex/library_tvshows_metadata.xml")
@pytest.fixture(name="library_tvshows_collections", scope="session")
def library_tvshows_collections_fixture():
"""Load payload for collections in the TV shows library and return it."""
return load_fixture("plex/library_tvshows_collections.xml")
@pytest.fixture(name="library_music_all", scope="session")
def library_music_all_fixture():
"""Load payload for all items in the music library and return it."""
return load_fixture("plex/library_music_all.xml")
@pytest.fixture(name="library_music_metadata", scope="session")
def library_music_metadata_fixture():
"""Load payload for metadata in the music library and return it."""
return load_fixture("plex/library_music_metadata.xml")
@pytest.fixture(name="library_music_collections", scope="session")
def library_music_collections_fixture():
"""Load payload for collections in the music library and return it."""
return load_fixture("plex/library_music_collections.xml")
@pytest.fixture(name="library_movies_sort", scope="session")
def library_movies_sort_fixture():
"""Load sorting payload for movie library and return it."""
@ -120,6 +156,18 @@ def library_fixture():
return load_fixture("plex/library.xml")
@pytest.fixture(name="library_movies_size", scope="session")
def library_movies_size_fixture():
"""Load movie library size payload and return it."""
return load_fixture("plex/library_movies_size.xml")
@pytest.fixture(name="library_music_size", scope="session")
def library_music_size_fixture():
"""Load music library size payload and return it."""
return load_fixture("plex/library_music_size.xml")
@pytest.fixture(name="library_tvshows_size", scope="session")
def library_tvshows_size_fixture():
"""Load tvshow library size payload and return it."""
@ -352,10 +400,16 @@ def mock_plex_calls(
library,
library_sections,
library_movies_all,
library_movies_collections,
library_movies_metadata,
library_movies_sort,
library_music_all,
library_music_collections,
library_music_metadata,
library_music_sort,
library_tvshows_all,
library_tvshows_collections,
library_tvshows_metadata,
library_tvshows_sort,
media_1,
media_30,
@ -396,6 +450,32 @@ def mock_plex_calls(
requests_mock.get(f"{url}/library/sections/2/all", text=library_tvshows_all)
requests_mock.get(f"{url}/library/sections/3/all", text=library_music_all)
requests_mock.get(
f"{url}/library/sections/1/all?includeMeta=1&includeAdvanced=1&X-Plex-Container-Start=0&X-Plex-Container-Size=0",
text=library_movies_metadata,
)
requests_mock.get(
f"{url}/library/sections/2/all?includeMeta=1&includeAdvanced=1&X-Plex-Container-Start=0&X-Plex-Container-Size=0",
text=library_tvshows_metadata,
)
requests_mock.get(
f"{url}/library/sections/3/all?includeMeta=1&includeAdvanced=1&X-Plex-Container-Start=0&X-Plex-Container-Size=0",
text=library_music_metadata,
)
requests_mock.get(
f"{url}/library/sections/1/collections?includeMeta=1&includeAdvanced=1&X-Plex-Container-Start=0&X-Plex-Container-Size=0",
text=library_movies_collections,
)
requests_mock.get(
f"{url}/library/sections/2/collections?includeMeta=1&includeAdvanced=1&X-Plex-Container-Start=0&X-Plex-Container-Size=0",
text=library_tvshows_collections,
)
requests_mock.get(
f"{url}/library/sections/3/collections?includeMeta=1&includeAdvanced=1&X-Plex-Container-Start=0&X-Plex-Container-Size=0",
text=library_music_collections,
)
requests_mock.get(f"{url}/library/metadata/200/children", text=children_200)
requests_mock.get(f"{url}/library/metadata/300/children", text=children_300)
requests_mock.get(f"{url}/library/metadata/300/allLeaves", text=grandchildren_300)

View File

@ -1,11 +1,14 @@
"""Tests for Plex sensors."""
from datetime import timedelta
from datetime import datetime, timedelta
from unittest.mock import patch
import requests.exceptions
from homeassistant.components.plex.const import PLEX_UPDATE_LIBRARY_SIGNAL
from homeassistant.config_entries import RELOAD_AFTER_UPDATE_DELAY
from homeassistant.const import STATE_UNAVAILABLE
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.util import dt
from .helpers import trigger_plex_update, wait_for_debouncer
@ -14,6 +17,51 @@ from tests.common import async_fire_time_changed
LIBRARY_UPDATE_PAYLOAD = {"StatusNotification": [{"title": "Library scan complete"}]}
TIMESTAMP = datetime(2021, 9, 1)
class MockPlexMedia:
"""Minimal mock of base plexapi media object."""
key = "key"
addedAt = str(TIMESTAMP)
listType = "video"
year = 2021
class MockPlexClip(MockPlexMedia):
"""Minimal mock of plexapi clip object."""
type = "clip"
title = "Clip 1"
class MockPlexMovie(MockPlexMedia):
"""Minimal mock of plexapi movie object."""
type = "movie"
title = "Movie 1"
class MockPlexMusic(MockPlexMedia):
"""Minimal mock of plexapi album object."""
listType = "audio"
type = "album"
title = "Album"
parentTitle = "Artist"
class MockPlexTVEpisode(MockPlexMedia):
"""Minimal mock of plexapi episode object."""
type = "episode"
title = "Episode 5"
grandparentTitle = "TV Show"
seasonEpisode = "s01e05"
year = None
parentYear = 2021
async def test_library_sensor_values(
hass,
@ -21,11 +69,18 @@ async def test_library_sensor_values(
setup_plex_server,
mock_websocket,
requests_mock,
library_movies_size,
library_music_size,
library_tvshows_size,
library_tvshows_size_episodes,
library_tvshows_size_seasons,
):
"""Test the library sensors."""
requests_mock.get(
"/library/sections/1/all?includeCollections=0",
text=library_movies_size,
)
requests_mock.get(
"/library/sections/2/all?includeCollections=0&type=2",
text=library_tvshows_size,
@ -39,7 +94,12 @@ async def test_library_sensor_values(
text=library_tvshows_size_episodes,
)
await setup_plex_server()
requests_mock.get(
"/library/sections/3/all?includeCollections=0",
text=library_music_size,
)
mock_plex_server = await setup_plex_server()
await wait_for_debouncer(hass)
activity_sensor = hass.states.get("sensor.plex_plex_server_1")
@ -59,12 +119,20 @@ async def test_library_sensor_values(
hass,
dt.utcnow() + timedelta(seconds=RELOAD_AFTER_UPDATE_DELAY + 1),
)
await hass.async_block_till_done()
media = [MockPlexTVEpisode()]
with patch("plexapi.library.LibrarySection.recentlyAdded", return_value=media):
await hass.async_block_till_done()
library_tv_sensor = hass.states.get("sensor.plex_server_1_library_tv_shows")
assert library_tv_sensor.state == "10"
assert library_tv_sensor.attributes["seasons"] == 1
assert library_tv_sensor.attributes["shows"] == 1
assert (
library_tv_sensor.attributes["last_added_item"]
== "TV Show - S01E05 - Episode 5"
)
assert library_tv_sensor.attributes["last_added_timestamp"] == str(TIMESTAMP)
# Handle `requests` exception
requests_mock.get(
@ -89,7 +157,8 @@ async def test_library_sensor_values(
trigger_plex_update(
mock_websocket, msgtype="status", payload=LIBRARY_UPDATE_PAYLOAD
)
await hass.async_block_till_done()
with patch("plexapi.library.LibrarySection.recentlyAdded", return_value=media):
await hass.async_block_till_done()
library_tv_sensor = hass.states.get("sensor.plex_server_1_library_tv_shows")
assert library_tv_sensor.state == "10"
@ -105,3 +174,63 @@ async def test_library_sensor_values(
library_tv_sensor = hass.states.get("sensor.plex_server_1_library_tv_shows")
assert library_tv_sensor.state == STATE_UNAVAILABLE
# Test movie library sensor
entity_registry.async_update_entity(
entity_id="sensor.plex_server_1_library_tv_shows", disabled_by="user"
)
entity_registry.async_update_entity(
entity_id="sensor.plex_server_1_library_movies", disabled_by=None
)
await hass.async_block_till_done()
async_fire_time_changed(
hass,
dt.utcnow() + timedelta(seconds=RELOAD_AFTER_UPDATE_DELAY + 1),
)
media = [MockPlexMovie()]
with patch("plexapi.library.LibrarySection.recentlyAdded", return_value=media):
await hass.async_block_till_done()
library_movies_sensor = hass.states.get("sensor.plex_server_1_library_movies")
assert library_movies_sensor.state == "1"
assert library_movies_sensor.attributes["last_added_item"] == "Movie 1 (2021)"
assert library_movies_sensor.attributes["last_added_timestamp"] == str(TIMESTAMP)
# Test with clip
media = [MockPlexClip()]
with patch("plexapi.library.LibrarySection.recentlyAdded", return_value=media):
async_dispatcher_send(
hass, PLEX_UPDATE_LIBRARY_SIGNAL.format(mock_plex_server.machine_identifier)
)
async_fire_time_changed(hass, dt.utcnow() + timedelta(seconds=3))
await hass.async_block_till_done()
library_movies_sensor = hass.states.get("sensor.plex_server_1_library_movies")
assert library_movies_sensor.attributes["last_added_item"] == "Clip 1"
# Test music library sensor
entity_registry.async_update_entity(
entity_id="sensor.plex_server_1_library_movies", disabled_by="user"
)
entity_registry.async_update_entity(
entity_id="sensor.plex_server_1_library_music", disabled_by=None
)
await hass.async_block_till_done()
async_fire_time_changed(
hass,
dt.utcnow() + timedelta(seconds=RELOAD_AFTER_UPDATE_DELAY + 1),
)
media = [MockPlexMusic()]
with patch("plexapi.library.LibrarySection.recentlyAdded", return_value=media):
await hass.async_block_till_done()
library_music_sensor = hass.states.get("sensor.plex_server_1_library_music")
assert library_music_sensor.state == "1"
assert library_music_sensor.attributes["artists"] == 1
assert library_music_sensor.attributes["albums"] == 1
assert library_music_sensor.attributes["last_added_item"] == "Artist - Album (2021)"
assert library_music_sensor.attributes["last_added_timestamp"] == str(TIMESTAMP)

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1" allowSync="1" art="/:/resources/movie-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Movies" librarySectionUUID="805308ec-5019-43d4-a449-75d2b9e42f93" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1628745015" sortAsc="1" thumb="/:/resources/movie.png" title1="Movies" title2="All Movies" viewGroup="movie" viewMode="131122">
<Meta>
<Type key="/library/sections/1/all?type=18" type="collection" title="Collections" active="1">
<Sort active="1" activeDirection="asc" default="asc" defaultDirection="asc" descKey="titleSort:desc" firstCharacterKey="/library/sections/1/firstCharacter?type=18" key="titleSort" title="Title" />
</Type>
<FieldType type="tag">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="integer">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
<Operator key="&gt;&gt;=" title="is greater than" />
<Operator key="&lt;&lt;=" title="is less than" />
</FieldType>
<FieldType type="string">
<Operator key="=" title="contains" />
<Operator key="!=" title="does not contain" />
<Operator key="==" title="is" />
<Operator key="!==" title="is not" />
<Operator key="&lt;=" title="begins with" />
<Operator key="&gt;=" title="ends with" />
</FieldType>
<FieldType type="boolean">
<Operator key="=" title="is true" />
<Operator key="!=" title="is false" />
</FieldType>
<FieldType type="date">
<Operator key="&lt;&lt;=" title="is before" />
<Operator key="&gt;&gt;=" title="is after" />
</FieldType>
<FieldType type="subtitleLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="audioLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="resolution">
<Operator key="=" title="is" />
</FieldType>
</Meta>
<Directory ratingKey="20000" key="/library/collections/20000/children" guid="collection://b57b4fb7-b1a9-48a1-9122-fda907c422cd" type="collection" title="My Collection" contentRating="G" subtype="movie" summary="" index="70302" ratingCount="1" thumb="/library/collections/20000/composite/1518032983?width=400&amp;height=600" addedAt="1518032895" updatedAt="1518032983" childCount="6" maxYear="2012" minYear="1989">
</Directory>
</MediaContainer>

View File

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="0" totalSize="538" allowSync="1" art="/:/resources/movie-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Movies" librarySectionUUID="ba0c2140-c6ef-448a-9d1b-31020741d014" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1628745015" offset="0" sortAsc="1" thumb="/:/resources/movie.png" title1="Movies" title2="All Movies" viewGroup="movie" viewMode="131122">
<Meta>
<Type key="/library/sections/1/all?type=1" type="movie" title="Movies" active="1">
<Filter filter="genre" filterType="string" key="/library/sections/1/genre" title="Genre" type="filter" />
<Filter filter="year" filterType="integer" key="/library/sections/1/year" title="Year" type="filter" />
<Filter filter="decade" filterType="integer" key="/library/sections/1/decade" title="Decade" type="filter" />
<Filter filter="contentRating" filterType="string" key="/library/sections/1/contentRating" title="Content Rating" type="filter" />
<Filter filter="collection" filterType="string" key="/library/sections/1/collection" title="Collection" type="filter" />
<Filter filter="director" filterType="string" key="/library/sections/1/director" title="Director" type="filter" />
<Filter filter="actor" filterType="string" key="/library/sections/1/actor" title="Actor" type="filter" />
<Filter filter="writer" filterType="string" key="/library/sections/1/writer" title="Writer" type="filter" />
<Filter filter="producer" filterType="string" key="/library/sections/1/producer" title="Producer" type="filter" />
<Filter filter="country" filterType="string" key="/library/sections/1/country" title="Country" type="filter" />
<Filter filter="studio" filterType="string" key="/library/sections/1/studio" title="Studio" type="filter" />
<Filter filter="resolution" filterType="string" key="/library/sections/1/resolution" title="Resolution" type="filter" />
<Filter filter="hdr" filterType="boolean" key="/library/sections/1/hdr" title="HDR" type="filter" />
<Filter filter="unwatched" filterType="boolean" key="/library/sections/1/unwatched" title="Unplayed" type="filter" />
<Filter filter="inProgress" filterType="boolean" key="/library/sections/1/inProgress" title="In Progress" type="filter" />
<Filter filter="unmatched" filterType="boolean" key="/library/sections/1/unmatched" title="Unmatched" type="filter" />
<Filter filter="audioLanguage" filterType="string" key="/library/sections/1/audioLanguage" title="Audio Language" type="filter" />
<Filter filter="subtitleLanguage" filterType="string" key="/library/sections/1/subtitleLanguage" title="Subtitle Language" type="filter" />
<Filter filter="label" filterType="string" key="/library/sections/1/label" title="Labels" type="filter" />
<Filter filter="duplicate" filterType="boolean" key="/library/sections/1/duplicate" title="Duplicates" type="filter" advanced="1" />
<Sort active="1" activeDirection="asc" default="asc" defaultDirection="asc" descKey="titleSort:desc" firstCharacterKey="/library/sections/1/firstCharacter" key="titleSort" title="Title" />
<Sort defaultDirection="desc" descKey="year:desc" key="year" title="Year" />
<Sort defaultDirection="desc" descKey="originallyAvailableAt:desc" key="originallyAvailableAt" title="Release Date" />
<Sort defaultDirection="desc" descKey="rating:desc" key="rating" title="Critic Rating" />
<Sort defaultDirection="desc" descKey="audienceRating:desc" key="audienceRating" title="Audience Rating" />
<Sort defaultDirection="desc" descKey="userRating:desc" key="userRating" title="Rating" />
<Sort defaultDirection="desc" descKey="contentRating:desc" key="contentRating" title="Content Rating" />
<Sort defaultDirection="desc" descKey="duration:desc" key="duration" title="Duration" />
<Sort defaultDirection="desc" descKey="viewOffset:desc" key="viewOffset" title="Progress" />
<Sort defaultDirection="desc" descKey="viewCount:desc" key="viewCount" title="Plays" />
<Sort defaultDirection="desc" descKey="addedAt:desc" key="addedAt" title="Date Added" />
<Sort defaultDirection="desc" descKey="lastViewedAt:desc" key="lastViewedAt" title="Date Viewed" />
<Sort defaultDirection="asc" descKey="mediaHeight:desc" key="mediaHeight" title="Resolution" />
<Sort defaultDirection="desc" descKey="mediaBitrate:desc" key="mediaBitrate" title="Bitrate" />
<Sort defaultDirection="desc" descKey="random:desc" key="random" title="Randomly" />
<Field key="title" title="Title" type="string" />
<Field key="studio" title="Studio" type="string" />
<Field key="userRating" subType="rating" title="Rating" type="integer" />
<Field key="contentRating" title="Content Rating" type="tag" />
<Field key="year" subType="year" title="Year" type="integer" />
<Field key="decade" subType="decade" title="Decade" type="integer" />
<Field key="originallyAvailableAt" title="Release Date" type="date" />
<Field key="duration" subType="duration" title="Duration" type="integer" />
<Field key="unmatched" title="Unmatched" type="boolean" />
<Field key="duplicate" title="Duplicate" type="boolean" />
<Field key="genre" title="Genre" type="tag" />
<Field key="collection" title="Collection" type="tag" />
<Field key="director" title="Director" type="tag" />
<Field key="writer" title="Writer" type="tag" />
<Field key="producer" title="Producer" type="tag" />
<Field key="actor" title="Actor" type="tag" />
<Field key="country" title="Country" type="tag" />
<Field key="addedAt" title="Date Added" type="date" />
<Field key="viewCount" title="Plays" type="integer" />
<Field key="lastViewedAt" title="Last Played" type="date" />
<Field key="unwatched" title="Unplayed" type="boolean" />
<Field key="resolution" title="Resolution" type="resolution" />
<Field key="hdr" subType="hdr" title="HDR" type="boolean" />
<Field key="mediaSize" subType="fileSize" title="File Size" type="integer" />
<Field key="mediaBitrate" subType="bitrate" title="Bitrate" type="integer" />
<Field key="subtitleLanguage" title="Subtitle Language" type="subtitleLanguage" />
<Field key="audioLanguage" title="Audio Language" type="audioLanguage" />
<Field key="inProgress" title="In Progress" type="boolean" />
<Field key="trash" title="Trash" type="boolean" />
<Field key="label" title="Label" type="tag" />
</Type>
<Type key="/library/sections/1/folder" type="folder" title="Folders" active="0">
</Type>
<FieldType type="tag">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="integer">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
<Operator key="&gt;&gt;=" title="is greater than" />
<Operator key="&lt;&lt;=" title="is less than" />
</FieldType>
<FieldType type="string">
<Operator key="=" title="contains" />
<Operator key="!=" title="does not contain" />
<Operator key="==" title="is" />
<Operator key="!==" title="is not" />
<Operator key="&lt;=" title="begins with" />
<Operator key="&gt;=" title="ends with" />
</FieldType>
<FieldType type="boolean">
<Operator key="=" title="is true" />
<Operator key="!=" title="is false" />
</FieldType>
<FieldType type="date">
<Operator key="&lt;&lt;=" title="is before" />
<Operator key="&gt;&gt;=" title="is after" />
</FieldType>
<FieldType type="subtitleLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="audioLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="resolution">
<Operator key="=" title="is" />
</FieldType>
</Meta>
</MediaContainer>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="0" totalSize="1" allowSync="1" art="/:/resources/movie-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Movies" librarySectionUUID="805308ec-5019-43d4-a449-75d2b9e42f93" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1614092584" nocache="1" offset="0" sortAsc="1" thumb="/:/resources/movie.png" title1="All Movies" viewGroup="movie" viewMode="131122">
</MediaContainer>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="0" allowSync="1" art="/:/resources/artist-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="3" librarySectionTitle="Music" librarySectionUUID="ba0c2140-c6ef-448a-9d1b-31020741d014" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1628745015" sortAsc="1" thumb="/:/resources/artist.png" title1="Music" title2="All Artists" viewGroup="artist" viewMode="131124">
<Meta>
<Type key="/library/sections/3/all?type=18" type="collection" title="Collections" active="1">
<Sort active="1" activeDirection="asc" default="asc" defaultDirection="asc" descKey="titleSort:desc" firstCharacterKey="/library/sections/3/firstCharacter?type=18" key="titleSort" title="Title" />
</Type>
<FieldType type="tag">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="integer">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
<Operator key="&gt;&gt;=" title="is greater than" />
<Operator key="&lt;&lt;=" title="is less than" />
</FieldType>
<FieldType type="string">
<Operator key="=" title="contains" />
<Operator key="!=" title="does not contain" />
<Operator key="==" title="is" />
<Operator key="!==" title="is not" />
<Operator key="&lt;=" title="begins with" />
<Operator key="&gt;=" title="ends with" />
</FieldType>
<FieldType type="boolean">
<Operator key="=" title="is true" />
<Operator key="!=" title="is false" />
</FieldType>
<FieldType type="date">
<Operator key="&lt;&lt;=" title="is before" />
<Operator key="&gt;&gt;=" title="is after" />
</FieldType>
<FieldType type="subtitleLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="audioLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="resolution">
<Operator key="=" title="is" />
</FieldType>
</Meta>
</MediaContainer>

View File

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="0" totalSize="10" allowSync="1" art="/:/resources/artist-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="3" librarySectionTitle="Music" librarySectionUUID="ba0c2140-c6ef-448a-9d1b-31020741d014" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1628745015" nocache="1" offset="0" sortAsc="1" thumb="/:/resources/artist.png" title1="Music" title2="All Artists" viewGroup="artist" viewMode="131124">
<Meta>
<Type key="/library/sections/3/all?type=8" type="artist" title="Artists" active="1">
<Filter filter="genre" filterType="string" key="/library/sections/3/genre?type=8" title="Genre" type="filter" />
<Filter filter="mood" filterType="string" key="/library/sections/3/mood?type=8" title="Mood" type="filter" />
<Filter filter="style" filterType="string" key="/library/sections/3/style?type=8" title="Style" type="filter" />
<Filter filter="country" filterType="string" key="/library/sections/3/country?type=8" title="Country" type="filter" />
<Filter filter="collection" filterType="string" key="/library/sections/3/collection?type=8" title="Collection" type="filter" />
<Filter filter="unmatched" filterType="boolean" key="/library/sections/3/unmatched" title="Unmatched" type="filter" />
<Sort active="1" activeDirection="asc" default="asc" defaultDirection="asc" descKey="titleSort:desc" firstCharacterKey="/library/sections/3/firstCharacter" key="titleSort" title="Title" />
<Sort defaultDirection="desc" descKey="userRating:desc" key="userRating" title="Rating" />
<Sort defaultDirection="desc" descKey="addedAt:desc" key="addedAt" title="Date Added" />
<Sort defaultDirection="desc" descKey="lastViewedAt:desc" key="lastViewedAt" title="Date Played" />
<Sort defaultDirection="desc" descKey="viewCount:desc" key="viewCount" title="Plays" />
<Sort defaultDirection="desc" descKey="random:desc" key="random" title="Randomly" />
<Field key="artist.title" title="Artist Title" type="string" />
<Field key="artist.userRating" subType="rating" title="Artist Rating" type="integer" />
<Field key="artist.genre" title="Artist Genre" type="tag" />
<Field key="artist.collection" title="Artist Collection" type="tag" />
<Field key="artist.country" title="Artist Country" type="tag" />
<Field key="artist.mood" title="Artist Mood" type="tag" />
<Field key="artist.style" title="Artist Style" type="tag" />
<Field key="artist.addedAt" title="Date Artist Added" type="date" />
<Field key="artist.lastViewedAt" title="Artist Last Played" type="date" />
<Field key="artist.unmatched" title="Unmatched" type="boolean" />
</Type>
<Type key="/library/sections/3/all?type=9" type="album" title="Albums" active="0">
<Filter filter="genre" filterType="string" key="/library/sections/3/genre?type=9" title="Genre" type="filter" />
<Filter filter="mood" filterType="string" key="/library/sections/3/mood?type=9" title="Mood" type="filter" />
<Filter filter="style" filterType="string" key="/library/sections/3/style?type=9" title="Style" type="filter" />
<Filter filter="year" filterType="integer" key="/library/sections/3/year?type=9" title="Year" type="filter" />
<Filter filter="decade" filterType="integer" key="/library/sections/3/decade?type=9" title="Decade" type="filter" />
<Filter filter="studio" filterType="string" key="/library/sections/3/studio?type=9" title="Record Label" type="filter" />
<Filter filter="format" filterType="string" key="/library/sections/3/format?type=9" title="Format" type="filter" />
<Filter filter="subformat" filterType="string" key="/library/sections/3/subformat?type=9" title="Type" type="filter" />
<Filter filter="collection" filterType="string" key="/library/sections/3/collection?type=9" title="Collection" type="filter" />
<Filter filter="label" filterType="string" key="/library/sections/3/label?type=9" title="Labels" type="filter" />
<Filter filter="source" filterType="string" key="/library/sections/3/source?type=9" title="Source" type="filter" />
<Filter filter="unmatched" filterType="boolean" key="/library/sections/3/unmatched" title="Unmatched" type="filter" />
<Sort defaultDirection="asc" descKey="titleSort:desc" firstCharacterKey="/library/sections/3/firstCharacter?type=9" key="titleSort" title="Title" />
<Sort default="asc" defaultDirection="asc" descKey="artist.titleSort:desc,album.titleSort,album.index,album.id,album.originallyAvailableAt" firstCharacterKey="/library/sections/3/firstCharacter?type=9" key="artist.titleSort,album.titleSort,album.index,album.id,album.originallyAvailableAt" title="Album Artist" />
<Sort defaultDirection="desc" descKey="year:desc" key="year" title="Year" />
<Sort defaultDirection="desc" descKey="originallyAvailableAt:desc" key="originallyAvailableAt" title="Release Date" />
<Sort defaultDirection="desc" descKey="rating:desc" key="rating" title="Critic Rating" />
<Sort defaultDirection="desc" descKey="userRating:desc" key="userRating" title="Rating" />
<Sort defaultDirection="desc" descKey="addedAt:desc" key="addedAt" title="Date Added" />
<Sort defaultDirection="desc" descKey="lastViewedAt:desc" key="lastViewedAt" title="Date Played" />
<Sort defaultDirection="desc" descKey="viewCount:desc" key="viewCount" title="Plays" />
<Sort defaultDirection="desc" descKey="random:desc" key="random" title="Randomly" />
<Field key="album.title" title="Album Title" type="string" />
<Field key="album.year" subType="year" title="Year" type="integer" />
<Field key="album.decade" subType="decade" title="Album Decade" type="integer" />
<Field key="album.genre" title="Album Genre" type="tag" />
<Field key="album.viewCount" title="Album Plays" type="integer" />
<Field key="album.lastViewedAt" title="Album Last Played" type="date" />
<Field key="album.userRating" subType="rating" title="Album Rating" type="integer" />
<Field key="album.rating" subType="rating" title="Album Critic Rating" type="integer" />
<Field key="album.decade" subType="decade" title="Album Decade" type="integer" />
<Field key="album.studio" title="Record Label" type="string" />
<Field key="album.mood" title="Album Mood" type="tag" />
<Field key="album.style" title="Album Style" type="tag" />
<Field key="album.format" title="Album Format" type="tag" />
<Field key="album.subformat" title="Album Type" type="tag" />
<Field key="album.collection" title="Album Collection" type="tag" />
<Field key="album.addedAt" title="Date Album Added" type="date" />
<Field key="album.originallyAvailableAt" title="Date Album Released" type="date" />
<Field key="album.unmatched" title="Unmatched" type="boolean" />
<Field key="album.source" title="Album Source" type="tag" />
<Field key="album.label" title="Label" type="tag" />
</Type>
<Type key="/library/sections/3/all?type=10" type="track" title="Tracks" active="0">
<Filter filter="mood" filterType="string" key="/library/sections/3/mood?type=10" title="Mood" type="filter" />
<Filter filter="userRating" filterType="string" key="/library/sections/3/userRating?type=10" title="Rating" type="filter" />
<Filter filter="source" filterType="string" key="/library/sections/3/source?type=10" title="Source" type="filter" />
<Sort defaultDirection="asc" descKey="titleSort:desc" firstCharacterKey="/library/sections/3/firstCharacter?type=10" key="titleSort" title="Title" />
<Sort default="asc" defaultDirection="asc" descKey="artist.titleSort:desc,album.titleSort,album.year,track.absoluteIndex,track.index,track.titleSort,track.id" firstCharacterKey="/library/sections/3/firstCharacter?type=10" key="artist.titleSort,album.titleSort,album.year,track.absoluteIndex,track.index,track.titleSort,track.id" title="Album Artist" />
<Sort defaultDirection="desc" descKey="originalTitle:desc" key="originalTitle" title="Artist" />
<Sort defaultDirection="asc" descKey="album.titleSort:desc" key="album.titleSort" title="Album" />
<Sort defaultDirection="desc" descKey="userRating:desc" key="userRating" title="Rating" />
<Sort defaultDirection="desc" descKey="duration:desc" key="duration" title="Duration" />
<Sort defaultDirection="desc" descKey="viewCount:desc" key="viewCount" title="Plays" />
<Sort defaultDirection="desc" descKey="addedAt:desc" key="addedAt" title="Date Added" />
<Sort defaultDirection="desc" descKey="lastViewedAt:desc" key="lastViewedAt" title="Date Played" />
<Sort defaultDirection="desc" descKey="lastRatedAt:desc" key="lastRatedAt" title="Date Rated" />
<Sort defaultDirection="desc" descKey="random:desc" key="random" title="Randomly" />
<Sort defaultDirection="desc" descKey="ratingCount:desc" key="ratingCount" title="Popularity" />
<Sort defaultDirection="desc" descKey="mediaBitrate:desc" key="mediaBitrate" title="Bitrate" />
<Field key="track.mood" title="Track Mood" type="tag" />
<Field key="track.title" title="Track Title" type="string" />
<Field key="track.viewCount" title="Track Plays" type="integer" />
<Field key="track.lastViewedAt" title="Track Last Played" type="date" />
<Field key="track.skipCount" title="Track Skips" type="integer" />
<Field key="track.lastSkippedAt" title="Track Last Skipped" type="date" />
<Field key="track.userRating" subType="rating" title="Track Rating" type="integer" />
<Field key="track.lastRatedAt" title="Track Last Rated" type="date" />
<Field key="track.addedAt" title="Track Added At" type="date" />
<Field key="track.mediaSize" subType="fileSize" title="File Size" type="integer" />
<Field key="track.mediaBitrate" subType="bitrate" title="Bitrate" type="integer" />
<Field key="track.trash" title="Trash" type="boolean" />
<Field key="track.source" title="Track Source" type="tag" />
</Type>
<Type key="/library/sections/3/folder" type="folder" title="Folders" active="0">
</Type>
<FieldType type="tag">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="integer">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
<Operator key="&gt;&gt;=" title="is greater than" />
<Operator key="&lt;&lt;=" title="is less than" />
</FieldType>
<FieldType type="string">
<Operator key="=" title="contains" />
<Operator key="!=" title="does not contain" />
<Operator key="==" title="is" />
<Operator key="!==" title="is not" />
<Operator key="&lt;=" title="begins with" />
<Operator key="&gt;=" title="ends with" />
</FieldType>
<FieldType type="boolean">
<Operator key="=" title="is true" />
<Operator key="!=" title="is false" />
</FieldType>
<FieldType type="date">
<Operator key="&lt;&lt;=" title="is before" />
<Operator key="&gt;&gt;=" title="is after" />
</FieldType>
<FieldType type="subtitleLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="audioLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="resolution">
<Operator key="=" title="is" />
</FieldType>
</Meta>
</MediaContainer>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="0" totalSize="1" allowSync="1" art="/:/resources/artist-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="3" librarySectionTitle="Music" librarySectionUUID="ba0c2140-c6ef-448a-9d1b-31020741d014" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1614092584" nocache="1" offset="0" sortAsc="1" thumb="/:/resources/artist.png" title1="All Artists" viewGroup="artist" viewMode="131124">
</MediaContainer>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="0" allowSync="1" art="/:/resources/show-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="2" librarySectionTitle="TV Shows" librarySectionUUID="1d8c8690-2dc5-48e6-9b54-accfacd0067c" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1628745015" sortAsc="1" thumb="/:/resources/show.png" title1="TV Shows" title2="All Shows" viewGroup="show" viewMode="131122">
<Meta>
<Type key="/library/sections/2/all?type=18" type="collection" title="Collections" active="1">
<Sort active="1" activeDirection="asc" default="asc" defaultDirection="asc" descKey="titleSort:desc" firstCharacterKey="/library/sections/2/firstCharacter?type=18" key="titleSort" title="Title" />
</Type>
<FieldType type="tag">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="integer">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
<Operator key="&gt;&gt;=" title="is greater than" />
<Operator key="&lt;&lt;=" title="is less than" />
</FieldType>
<FieldType type="string">
<Operator key="=" title="contains" />
<Operator key="!=" title="does not contain" />
<Operator key="==" title="is" />
<Operator key="!==" title="is not" />
<Operator key="&lt;=" title="begins with" />
<Operator key="&gt;=" title="ends with" />
</FieldType>
<FieldType type="boolean">
<Operator key="=" title="is true" />
<Operator key="!=" title="is false" />
</FieldType>
<FieldType type="date">
<Operator key="&lt;&lt;=" title="is before" />
<Operator key="&gt;&gt;=" title="is after" />
</FieldType>
<FieldType type="subtitleLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="audioLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="resolution">
<Operator key="=" title="is" />
</FieldType>
</Meta>
</MediaContainer>

View File

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="0" totalSize="5" allowSync="1" art="/:/resources/show-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="2" librarySectionTitle="TV Shows" librarySectionUUID="905308ec-5019-43d4-a449-75d2b9e42f93" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1628745015" nocache="1" offset="0" sortAsc="1" thumb="/:/resources/show.png" title1="TV Shows" title2="All Shows" viewGroup="show" viewMode="131122">
<Meta>
<Type key="/library/sections/2/all?type=2" type="show" title="TV Shows" active="1">
<Filter filter="genre" filterType="string" key="/library/sections/2/genre?type=2" title="Genre" type="filter" />
<Filter filter="year" filterType="integer" key="/library/sections/2/year?type=2" title="Year" type="filter" />
<Filter filter="contentRating" filterType="string" key="/library/sections/2/contentRating?type=2" title="Content Rating" type="filter" />
<Filter filter="studio" filterType="string" key="/library/sections/2/studio?type=2" title="Studio" type="filter" />
<Filter filter="network" filterType="string" key="/library/sections/2/network?type=2" title="Network" type="filter" />
<Filter filter="collection" filterType="string" key="/library/sections/2/collection?type=2" title="Collection" type="filter" />
<Filter filter="director" filterType="string" key="/library/sections/2/director?type=2" title="Director" type="filter" />
<Filter filter="actor" filterType="string" key="/library/sections/2/actor?type=2" title="Actor" type="filter" />
<Filter filter="writer" filterType="string" key="/library/sections/2/writer?type=2" title="Writer" type="filter" />
<Filter filter="producer" filterType="string" key="/library/sections/2/producer?type=2" title="Producer" type="filter" />
<Filter filter="unwatchedLeaves" filterType="boolean" key="/library/sections/2/unwatchedLeaves?type=2" title="Unplayed" type="filter" />
<Filter filter="unmatched" filterType="boolean" key="/library/sections/2/unmatched" title="Unmatched" type="filter" />
<Filter filter="label" filterType="string" key="/library/sections/2/label?type=2" title="Labels" type="filter" />
<Sort active="1" activeDirection="asc" default="asc" defaultDirection="asc" descKey="titleSort:desc" firstCharacterKey="/library/sections/2/firstCharacter" key="titleSort" title="Title" />
<Sort defaultDirection="desc" descKey="year:desc" key="year" title="Year" />
<Sort defaultDirection="desc" descKey="originallyAvailableAt:desc" key="originallyAvailableAt" title="Release Date" />
<Sort defaultDirection="desc" descKey="rating:desc" key="rating" title="Critic Rating" />
<Sort defaultDirection="desc" descKey="audienceRating:desc" key="audienceRating" title="Audience Rating" />
<Sort defaultDirection="desc" descKey="userRating:desc" key="userRating" title="Rating" />
<Sort defaultDirection="desc" descKey="contentRating:desc" key="contentRating" title="Content Rating" />
<Sort defaultDirection="desc" descKey="unviewedLeafCount:desc" key="unviewedLeafCount" title="Unplayed" />
<Sort defaultDirection="desc" descKey="episode.addedAt:desc" key="episode.addedAt" title="Last Episode Date Added" />
<Sort defaultDirection="desc" descKey="addedAt:desc" key="addedAt" title="Date Added" />
<Sort defaultDirection="desc" descKey="lastViewedAt:desc" key="lastViewedAt" title="Date Viewed" />
<Sort defaultDirection="desc" descKey="random:desc" key="random" title="Randomly" />
<Field key="show.title" title="Show Title" type="string" />
<Field key="show.studio" title="Studio" type="string" />
<Field key="show.network" title="Network" type="tag" />
<Field key="show.userRating" subType="rating" title="Show Rating" type="integer" />
<Field key="show.contentRating" title="Content Rating" type="tag" />
<Field key="show.year" subType="year" title="Show Year" type="integer" />
<Field key="show.viewCount" title="Show Plays" type="integer" />
<Field key="show.lastViewedAt" title="Show Last Played" type="date" />
<Field key="show.genre" title="Genre" type="tag" />
<Field key="show.collection" title="Show Collection" type="tag" />
<Field key="show.director" title="Show Director" type="tag" />
<Field key="show.writer" title="Show Writer" type="tag" />
<Field key="show.producer" title="Show Producer" type="tag" />
<Field key="show.actor" title="Show Actor" type="tag" />
<Field key="show.addedAt" title="Date Show Added" type="date" />
<Field key="show.unmatched" title="Show Unmatched" type="boolean" />
<Field key="show.unwatchedLeaves" title="Unplayed Episodes" type="boolean" />
<Field key="show.label" title="Label" type="tag" />
</Type>
<Type key="/library/sections/2/all?type=3" type="season" title="Seasons" active="0">
<Sort defaultDirection="asc" descKey="season.index:desc,season.titleSort" key="season.index,season.titleSort" title="Season" />
<Sort default="asc" defaultDirection="asc" descKey="show.titleSort:desc,index" key="show.titleSort,index" title="Show" />
<Sort defaultDirection="desc" descKey="userRating:desc" key="userRating" title="Rating" />
<Sort defaultDirection="desc" descKey="addedAt:desc" key="addedAt" title="Date Added" />
<Sort defaultDirection="desc" descKey="random:desc" key="random" title="Randomly" />
</Type>
<Type key="/library/sections/2/all?type=4" type="episode" title="Episodes" active="0">
<Filter filter="year" filterType="integer" key="/library/sections/2/year?type=4" title="Year" type="filter" />
<Filter filter="collection" filterType="string" key="/library/sections/2/collection?type=4" title="Collection" type="filter" />
<Filter filter="resolution" filterType="string" key="/library/sections/2/resolution?type=4" title="Resolution" type="filter" />
<Filter filter="unwatched" filterType="boolean" key="/library/sections/2/unwatched?type=4" title="Unplayed" type="filter" />
<Filter filter="inProgress" filterType="boolean" key="/library/sections/2/inProgress?type=4" title="In Progress" type="filter" />
<Filter filter="audioLanguage" filterType="string" key="/library/sections/2/audioLanguage" title="Audio Language" type="filter" />
<Filter filter="subtitleLanguage" filterType="string" key="/library/sections/2/subtitleLanguage" title="Subtitle Language" type="filter" />
<Filter filter="unmatched" filterType="boolean" key="/library/sections/2/unmatched" title="Unmatched" type="filter" />
<Filter filter="duplicate" filterType="boolean" key="/library/sections/2/duplicate?type=4" title="Duplicates" type="filter" advanced="1" />
<Sort defaultDirection="desc" descKey="titleSort:desc" firstCharacterKey="/library/sections/2/firstCharacter?type=4" key="titleSort" title="Title" />
<Sort default="asc" defaultDirection="asc" descKey="show.titleSort:desc,season.index:nullsLast,episode.index:nullsLast,episode.originallyAvailableAt:nullsLast,episode.titleSort,episode.id" key="show.titleSort,season.index:nullsLast,episode.index:nullsLast,episode.originallyAvailableAt:nullsLast,episode.titleSort,episode.id" title="Show" />
<Sort defaultDirection="desc" descKey="year:desc" key="year" title="Year" />
<Sort defaultDirection="desc" descKey="originallyAvailableAt:desc" key="originallyAvailableAt" title="Release Date" />
<Sort defaultDirection="desc" descKey="rating:desc" key="rating" title="Critic Rating" />
<Sort defaultDirection="desc" descKey="audienceRating:desc" key="audienceRating" title="Audience Rating" />
<Sort defaultDirection="desc" descKey="userRating:desc" key="userRating" title="Rating" />
<Sort defaultDirection="desc" descKey="duration:desc" key="duration" title="Duration" />
<Sort defaultDirection="desc" descKey="viewOffset:desc" key="viewOffset" title="Progress" />
<Sort defaultDirection="desc" descKey="viewCount:desc" key="viewCount" title="Plays" />
<Sort defaultDirection="desc" descKey="addedAt:desc" key="addedAt" title="Date Added" />
<Sort defaultDirection="desc" descKey="lastViewedAt:desc" key="lastViewedAt" title="Date Viewed" />
<Sort defaultDirection="desc" descKey="mediaHeight:desc" key="mediaHeight" title="Resolution" />
<Sort defaultDirection="desc" descKey="mediaBitrate:desc" key="mediaBitrate" title="Bitrate" />
<Sort defaultDirection="desc" descKey="random:desc" key="random" title="Randomly" />
<Field key="episode.title" title="Episode Title" type="string" />
<Field key="episode.addedAt" title="Date Episode Added" type="date" />
<Field key="episode.originallyAvailableAt" title="Episode Air Date" type="date" />
<Field key="episode.year" subType="year" title="Episode Year" type="integer" />
<Field key="episode.userRating" subType="rating" title="Episode Rating" type="integer" />
<Field key="episode.viewCount" title="Episode Plays" type="integer" />
<Field key="episode.lastViewedAt" title="Episode Last Played" type="date" />
<Field key="episode.unwatched" title="Episode Unplayed" type="boolean" />
<Field key="episode.inProgress" title="Episode In Progress" type="boolean" />
<Field key="episode.duplicate" title="Episode Duplicate" type="boolean" />
<Field key="episode.hdr" subType="hdr" title="HDR" type="boolean" />
<Field key="episode.resolution" title="Resolution" type="resolution" />
<Field key="episode.mediaSize" subType="fileSize" title="File size" type="integer" />
<Field key="episode.mediaBitrate" subType="bitrate" title="Bitrate" type="integer" />
<Field key="episode.subtitleLanguage" title="Subtitle Language" type="subtitleLanguage" />
<Field key="episode.audioLanguage" title="Audio Language" type="audioLanguage" />
<Field key="episode.trash" title="Trash" type="boolean" />
<Field key="episode.unmatched" title="Episode Unmatched" type="boolean" />
</Type>
<Type key="/library/sections/2/folder" type="folder" title="Folders" active="0">
</Type>
<FieldType type="tag">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="integer">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
<Operator key="&gt;&gt;=" title="is greater than" />
<Operator key="&lt;&lt;=" title="is less than" />
</FieldType>
<FieldType type="string">
<Operator key="=" title="contains" />
<Operator key="!=" title="does not contain" />
<Operator key="==" title="is" />
<Operator key="!==" title="is not" />
<Operator key="&lt;=" title="begins with" />
<Operator key="&gt;=" title="ends with" />
</FieldType>
<FieldType type="boolean">
<Operator key="=" title="is true" />
<Operator key="!=" title="is false" />
</FieldType>
<FieldType type="date">
<Operator key="&lt;&lt;=" title="is before" />
<Operator key="&gt;&gt;=" title="is after" />
</FieldType>
<FieldType type="subtitleLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="audioLanguage">
<Operator key="=" title="is" />
<Operator key="!=" title="is not" />
</FieldType>
<FieldType type="resolution">
<Operator key="=" title="is" />
</FieldType>
</Meta>
</MediaContainer>

View File

@ -0,0 +1,12 @@
<MediaContainer allowSync="1" art="/:/resources/show-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="2" librarySectionTitle="TV Shows" librarySectionUUID="905308ec-5019-43d4-a449-75d2b9e42f93" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1603922053" nocache="1" size="1" sortAsc="1" thumb="/:/resources/show.png" title="TV Shows" title1="All Shows" viewGroup="show" viewMode="131122">
<Directory addedAt="1377827407" art="/library/metadata/30/art/1488495292" banner="/library/metadata/30/banner/1488495292" childCount="5" contentRating="TV-Y" duration="3000000" guid="com.plexapp.agents.thetvdb://12345?lang=en" index="1" key="/library/metadata/30/children" leafCount="100" originallyAvailableAt="2000-01-01" primaryExtraKey="/library/metadata/194407" rating="9.0" ratingKey="20" studio="TV Studio" summary="Elaborate summary." theme="/library/metadata/30/theme/1488495292" thumb="/library/metadata/30/thumb/1488495292" title="TV Show" type="show" updatedAt="1488495292" viewedLeafCount="0" year="2000">
<Video ratingKey="35" key="/library/metadata/35" parentRatingKey="20" grandparentRatingKey="30" guid="plex://episode/60d5ff1c4a0721002c4e5d75" parentGuid="plex://season/606b5e359efaef002c04bcdd" grandparentGuid="plex://show/5d9c07f7e98e47001eb03fc7" type="episode" title="Episode 5" grandparentKey="/library/metadata/30" parentKey="/library/metadata/20" grandparentTitle="TV Show" parentTitle="Season 1" contentRating="G" summary="Elaborate episode summary." index="5" parentIndex="1" audienceRating="8.0" viewCount="1" lastViewedAt="1631590710" parentYear="2021" thumb="/library/metadata/35/thumb/1631586401" art="/library/metadata/30/art/1630011134" parentThumb="/library/metadata/20/thumb/1630011155" grandparentThumb="/library/metadata/30/thumb/1630011134" grandparentArt="/library/metadata/30/art/1630011134" grandparentTheme="/library/metadata/30/theme/1630011134" duration="3421936" originallyAvailableAt="2021-09-19" addedAt="1631586399" updatedAt="1631586401" audienceRatingImage="themoviedb://image.rating">
<Media id="396946" duration="3421936" bitrate="14119" width="1920" height="1080" aspectRatio="1.78" audioChannels="6" audioCodec="eac3" videoCodec="h264" videoResolution="1080" container="mkv" videoFrameRate="24p" videoProfile="high">
<Part id="397384" key="/library/parts/397384/1631586385/file.mkv" duration="3421936" file="/storage/tvshows/TV Show/Season 1/Episode 5.mkv" size="6040228848" container="mkv" videoProfile="high" />
</Media>
</Video>
<Genre tag="Action" />
<Genre tag="Animated" />
<Role tag="Some Actor" />
<Role tag="Another One" />
</Directory></MediaContainer>