TV Module Reference

New in version 0.0.1.

Control the macOS TV application using JXA-like syntax.

Classes:

TVObjectClass(value)

An enumeration.

XATVApplication(properties)

A class for managing and interacting with TV.app.

XATVArtwork(properties)

An artwork in media apps.

XATVArtworkList(properties[, filter])

A wrapper around lists of music artworks that employs fast enumeration techniques.

XATVBrowserWindow(properties)

A browser window of media apps.

XATVBrowserWindowList(properties[, filter])

A wrapper around lists of music browser windows that employs fast enumeration techniques.

XATVFileTrack(properties)

A file track in media apps.

XATVFileTrackList(properties[, filter])

A wrapper around lists of music file tracks that employs fast enumeration techniques.

XATVFolderPlaylist(properties)

A folder playlist in media apps.

XATVFolderPlaylistList(properties[, filter])

A wrapper around lists of music folder playlists that employs fast enumeration techniques.

XATVItem(properties)

A generic class with methods common to the various playable media classes in media apps.

XATVItemList(properties[, filter, obj_class])

A wrapper around lists of music items that employs fast enumeration techniques.

XATVLibraryPlaylist(properties)

The library playlist in media apps.

XATVLibraryPlaylistList(properties[, filter])

A wrapper around lists of library playlists that employs fast enumeration techniques.

XATVPlaylist(properties)

A playlist in media apps.

XATVPlaylistList(properties[, filter, obj_class])

A wrapper around lists of playlists that employs fast enumeration techniques.

XATVPlaylistWindow(properties)

A playlist window in media apps.

XATVPlaylistWindowList(properties[, filter])

A wrapper around lists of music playlist windows that employs fast enumeration techniques.

XATVSharedTrack(properties)

A shared track in media apps.

XATVSharedTrackList(properties[, filter])

A wrapper around lists of music shared tracks that employs fast enumeration techniques.

XATVSource(properties)

A media source in media apps.

XATVSourceList(properties[, filter, obj_class])

A wrapper around lists of sources that employs fast enumeration techniques.

XATVTrack(properties)

A class for managing and interacting with tracks in media apps.

XATVTrackList(properties[, filter, obj_class])

A wrapper around lists of music tracks that employs fast enumeration techniques.

XATVURLTrack(properties)

A URL track in media apps.

XATVURLTrackList(properties[, filter])

A wrapper around lists of music URL tracks that employs fast enumeration techniques.

XATVUserPlaylist(properties)

A user-created playlist in media apps.

XATVUserPlaylistList(properties[, filter])

A wrapper around lists of music user playlists that employs fast enumeration techniques.

XATVVideoWindow(properties)

A video window in media apps.

XATVVideoWindowList(properties[, filter])

A wrapper around lists of music video windows that employs fast enumeration techniques.

XATVWindow(properties)

A windows of media apps.

XATVWindowList(properties[, filter, obj_class])

A wrapper around lists of windows that employs fast enumeration techniques.

class PyXA.apps.TV.TVObjectClass(value)[source]

Bases: Enum

An enumeration.

Attributes:

APPLICATION

ARTWORK

BROWSER_WINDOW

ENCODER

FILE_TRACK

FOLDER_PlAYLIST

ITEM

LIBRARY_PLAYLIST

MINIPLAYER_WINDOW

PLAYLIST

PLAYLIST_WINDOW

SHARED_TRACK

SOURCE

TRACK

URL_TRACK

USER_PLAYLIST

VIDEO_WINDOW

WINDOW

APPLICATION = 'capp'
ARTWORK = 'cArt'
BROWSER_WINDOW = 'cBrW'
ENCODER = 'cEnc'
FILE_TRACK = 'cFlT'
FOLDER_PlAYLIST = 'cFoP'
ITEM = 'cobj'
LIBRARY_PLAYLIST = 'cLiP'
MINIPLAYER_WINDOW = 'cMPW'
PLAYLIST = 'cPly'
PLAYLIST_WINDOW = 'cPlW'
SHARED_TRACK = 'cShT'
SOURCE = 'cSrc'
TRACK = 'cTrk'
URL_TRACK = 'cURT'
USER_PLAYLIST = 'cUsP'
VIDEO_WINDOW = 'cNPW'
WINDOW = 'cwin'
class PyXA.apps.TV.XATVApplication(properties)[source]

Bases: XASBApplication, XACanOpenPath

A class for managing and interacting with TV.app.

See also

XATVWindow, class:XATVSource, XATVPlaylist, XATVTrack

New in version 0.0.1.

Classes:

MediaKind(value)

Types of media items.

ObjectType(value)

Object types able to be created by the application.

PlayerState(value)

States of the music player.

PlaylistKind(value)

Types of special playlists.

RatingKind(value)

Types of ratings for media items.

SearchFilter(value)

Filter restrictions on search results.

SourceKind(value)

Types of sources for media items.

Methods:

back_track()

Restarts the current track or returns to the previous track if playback is currently at the start.

browser_windows([filter])

Returns a list of browser windows, as PyXA objects, matching the given filter.

current_track()

Returns the currently playing (or paused but not stopped) track.

fast_forward()

Repeated skip forward in the track until resume() is called.

file_tracks([filter])

Returns a list of file tracks, as PyXA objects, matching the given filter.

library_playlists([filter])

Returns a list of library playlists, as PyXA objects, matching the given filter.

make(specifier, properties[, data])

Creates a new element of the given specifier class without adding it to any list.

next_track()

Advances to the next track in the current playlist.

open_location(video_url)

Opens and plays an video stream URL or iTunes Store URL.

pause()

Pauses the current track.

play([item, play_once])

Plays the specified TV item (e.g. track, playlist, etc.).

playlist_windows([filter])

Returns a list of playlist windows, as PyXA objects, matching the given filter.

playlists([filter])

Returns a list of playlists, as PyXA objects, matching the given filter.

playpause()

Toggles the playing/paused state of the current track.

previous_track()

Returns to the previous track in the current playlist.

resume()

Returns to normal playback after calls to fast_forward() or rewind().

rewind()

Repeatedly skip backward in the track until resume() is called.

set_volume(new_volume)

Sets the volume of playback.

shared_tracks([filter])

Returns a list of shared tracks, as PyXA objects, matching the given filter.

sources([filter])

Returns a list of sources, as PyXA objects, matching the given filter.

stop()

Stops playback of the current track.

tracks([filter])

Returns a list of tracks, as PyXA objects, matching the given filter.

url_tracks([filter])

Returns a list of URL tracks, as PyXA objects, matching the given filter.

video_windows([filter])

Returns a list of video windows, as PyXA objects, matching the given filter.

Attributes:

current_playlist

The playlist containing the currently targeted track.

current_stream_title

The name of the currently streaming track.

current_stream_url

The URL of the currently streaming track.

fixed_indexing

Whether the track indices are independent of the order of the current playlist or not.

frontmost

Whether the application is active or not.

full_screen

Whether the app is fullscreen or not.

mute

Whether sound output is muted or not.

name

The name of the application.

player_position

The time elapsed in the current track.

player_state

Whether the player is playing, paused, stopped, fast forwarding, or rewinding.

selection

The selected media items.

sound_volume

The sound output volume.

version

The version of the application.

class MediaKind(value)[source]

Bases: Enum

Types of media items.

Attributes:

HOME_VIDEO

A home video track

MOVIE

A movie track

TV_SHOW

A TV show track

UNKNOWN

An unknown media item kind

HOME_VIDEO = 1800823880

A home video track

MOVIE = 1800823885

A movie track

TV_SHOW = 1800823892

A TV show track

UNKNOWN = 1800760939

An unknown media item kind

class ObjectType(value)[source]

Bases: Enum

Object types able to be created by the application.

Attributes:

ARTWORK

BROWSER_WINDOW

FILE_TRACK

FOLDER_PLAYLIST

LIBRARY_PLAYLIST

PLAYLIST

PLAYLIST_WINDOW

SHARED_TRACK

SOURCE

TRACK

URL_TRACK

USER_PLAYLIST

VIDEO_WINDOW

WINDOW

ARTWORK = 'artwork'
BROWSER_WINDOW = 'browser_window'
FILE_TRACK = 'file_track'
FOLDER_PLAYLIST = 'folder_playlist'
LIBRARY_PLAYLIST = 'library_playlist'
PLAYLIST = 'playlist'
PLAYLIST_WINDOW = 'playlist_window'
SHARED_TRACK = 'shared_track'
SOURCE = 'source'
TRACK = 'track'
URL_TRACK = 'url_track'
USER_PLAYLIST = 'user_playlist'
VIDEO_WINDOW = 'video_window'
WINDOW = 'window'
class PlayerState(value)[source]

Bases: Enum

States of the music player.

Attributes:

FAST_FORWARDING

The player is fast forwarding

PAUSED

The player is paused

PLAYING

The player is playing

REWINDING

The player is rewinding

STOPPED

The player is stopped

FAST_FORWARDING = 1800426310

The player is fast forwarding

PAUSED = 1800426352

The player is paused

PLAYING = 1800426320

The player is playing

REWINDING = 1800426322

The player is rewinding

STOPPED = 1800426323

The player is stopped

class PlaylistKind(value)[source]

Bases: Enum

Types of special playlists.

Attributes:

FOLDER

A folder

LIBRARY

The system library playlist

MOVIES

A playlist containing movie items

NONE

An unknown playlist kind

TV_SHOWS

A playlist containing TV show items

UNKNOWN

An unknown playlist kind

FOLDER = 1800630342

A folder

LIBRARY = 1800630348

The system library playlist

MOVIES = 1800630345

A playlist containing movie items

NONE = 1800302446

An unknown playlist kind

TV_SHOWS = 1800630356

A playlist containing TV show items

UNKNOWN = 0

An unknown playlist kind

class RatingKind(value)[source]

Bases: Enum

Types of ratings for media items.

Attributes:

COMPUTED

A computer generated rating

USER

A user-inputted rating

COMPUTED = 1800565827

A computer generated rating

USER = 1800565845

A user-inputted rating

class SearchFilter(value)[source]

Bases: Enum

Filter restrictions on search results.

Attributes:

ALBUMS

Search albums

ALL

Search all

ARTISTS

Search artists

DISPLAYED

Search the currently displayed playlist

NAMES

Search track names only

ALBUMS = 1800630860

Search albums

ALL = 1799449708

Search all

ARTISTS = 1800630866

Search artists

DISPLAYED = 1800630870

Search the currently displayed playlist

NAMES = 1800630867

Search track names only

class SourceKind(value)[source]

Bases: Enum

Types of sources for media items.

Attributes:

ITUNES_STORE

The iTunes Store source

LIBRARY

A library source

SHARED_LIBRARY

A shared library source

UNKNOWN

An unknown source

ITUNES_STORE = 1799967827

The iTunes Store source

LIBRARY = 1800169826

A library source

SHARED_LIBRARY = 1800628324

A shared library source

UNKNOWN = 1800760939

An unknown source

back_track() XATVApplication[source]

Restarts the current track or returns to the previous track if playback is currently at the start.

Returns:

A reference to the TV application object.

Return type:

XATVApplication

New in version 0.0.1.

browser_windows(filter: dict | None = None) XATVBrowserWindowList[source]

Returns a list of browser windows, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned browser windows will have, or None

Returns:

The list of windows

Return type:

XATVBrowserWindowList

New in version 0.0.1.

property current_playlist: XATVPlaylist

The playlist containing the currently targeted track.

property current_stream_title: str

The name of the currently streaming track.

property current_stream_url: str

The URL of the currently streaming track.

current_track() XATVTrack[source]

Returns the currently playing (or paused but not stopped) track.

New in version 0.0.1.

fast_forward() XATVApplication[source]

Repeated skip forward in the track until resume() is called.

Returns:

A reference to the TV application object.

Return type:

XATVApplication

See also

rewind(), resume()

New in version 0.0.1.

file_tracks(filter: dict | None = None) XATVFileTrackList[source]

Returns a list of file tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned tracks will have, or None

Returns:

The list of file tracks

Return type:

XATVFileTrackList

New in version 0.2.1.

property fixed_indexing: bool

Whether the track indices are independent of the order of the current playlist or not.

property frontmost: bool

Whether the application is active or not.

property full_screen: bool

Whether the app is fullscreen or not.

library_playlists(filter: dict | None = None) XATVLibraryPlaylistList[source]

Returns a list of library playlists, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned playlists will have, or None

Returns:

The list of library playlists

Return type:

XATVLibraryPlaylistList

New in version 0.2.1.

make(specifier: str | ObjectType, properties: dict, data: Any | None = None)[source]

Creates a new element of the given specifier class without adding it to any list.

Use XABase.XAList.push() to push the element onto a list. Valid specifiers are: playlist, user playlist, folder playlist, library playlist, track, URL track, shared track, file track, artwork, window, browser window, playlist window, video window, or source.

Parameters:
  • specifier (Union[str, XATVApplication.ObjectType]) – The classname of the object to create

  • properties (dict) – The properties to give the object

  • data (Any, optional) – The data to initialize the object with, defaults to None

Returns:

A PyXA wrapped form of the object

Return type:

XABase.XAObject

Example:

Make a new folder playlist and push it onto the list of playlists

>>> import PyXA
>>> app = PyXA.Music()
>>> new_playlist = app.make("folder_playlist", {"name": "Example Playlist"})
>>> app.playlists().push(new_playlist)

New in version 0.2.2.

property mute: bool

Whether sound output is muted or not.

property name: str

The name of the application.

next_track() XATVApplication[source]

Advances to the next track in the current playlist.

Returns:

A reference to the TV application object.

Return type:

XATVApplication

New in version 0.0.1.

open_location(video_url: str) XATVApplication[source]

Opens and plays an video stream URL or iTunes Store URL.

Parameters:

audio_url (str) – The URL of an audio stream (e.g. a web address to an MP3 file) or an item in the iTunes Store.

Returns:

_description_

Return type:

XATVApplication

New in version 0.0.1.

pause() XATVApplication[source]

Pauses the current track.

Returns:

A reference to the TV application object.

Return type:

XATVApplication

New in version 0.0.1.

play(item: XATVItem | None = None, play_once: bool = True) XATVApplication[source]

Plays the specified TV item (e.g. track, playlist, etc.). If no item is provided, this plays the current track from its current player position.

Parameters:

item (_XATVItem, optional) – The track, playlist, or video to play, defaults to None

Returns:

A reference to the TV application object.

Return type:

XATVApplication

New in version 0.0.1.

property player_position: float

The time elapsed in the current track.

property player_state: PlayerState

Whether the player is playing, paused, stopped, fast forwarding, or rewinding.

playlist_windows(filter: dict | None = None) XATVPlaylistWindowList[source]

Returns a list of playlist windows, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned playlist windows will have, or None

Returns:

The list of windows

Return type:

XATVPlaylistWindowList

New in version 0.0.1.

playlists(filter: dict | None = None) XATVPlaylistList[source]

Returns a list of playlists, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned playlists will have, or None

Returns:

The list of playlists

Return type:

XATVPlaylistList

New in version 0.0.1.

playpause() XATVApplication[source]

Toggles the playing/paused state of the current track.

Returns:

A reference to the TV application object.

Return type:

XATVApplication

See also

play(), pause(), stop()

New in version 0.0.1.

previous_track() XATVApplication[source]

Returns to the previous track in the current playlist.

Returns:

A reference to the TV application object.

Return type:

XATVApplication

New in version 0.0.1.

resume() XATVApplication[source]

Returns to normal playback after calls to fast_forward() or rewind().

Returns:

A reference to the TV application object.

Return type:

XATVApplication

New in version 0.0.1.

rewind() XATVApplication[source]

Repeatedly skip backward in the track until resume() is called.

Returns:

A reference to the TV application object.

Return type:

XATVApplication

New in version 0.0.1.

property selection: XATVItemList

The selected media items.

set_volume(new_volume: float) XATVApplication[source]

Sets the volume of playback.

Parameters:

new_volume (float) – The desired volume of playback.

Returns:

A reference to the TV application object.

Return type:

XATVApplication

New in version 0.0.1.

shared_tracks(filter: dict | None = None) XATVSharedTrackList[source]

Returns a list of shared tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned tracks will have, or None

Returns:

The list of shared tracks

Return type:

XATVSharedTrackList

New in version 0.2.1.

property sound_volume: int

The sound output volume.

sources(filter: dict | None = None) XATVSourceList[source]

Returns a list of sources, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned sources will have, or None

Returns:

The list of sources

Return type:

XATVSourceList

New in version 0.0.1.

stop() XATVApplication[source]

Stops playback of the current track. Subsequent playback will start from the beginning of the track.

Returns:

A reference to the TV application object.

Return type:

XATVApplication

New in version 0.0.1.

tracks(filter: dict | None = None) XATVTrackList[source]

Returns a list of tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned tracks will have, or None

Returns:

The list of tracks

Return type:

XATVTrackList

New in version 0.0.1.

url_tracks(filter: dict | None = None) XATVURLTrackList[source]

Returns a list of URL tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned tracks will have, or None

Returns:

The list of URL tracks

Return type:

XATVURLTrackList

New in version 0.2.1.

property version: str

The version of the application.

video_windows(filter: dict | None = None) XATVVideoWindowList[source]

Returns a list of video windows, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned video windows will have, or None

Returns:

The list of windows

Return type:

XATVVideoWindowList

New in version 0.0.1.

class PyXA.apps.TV.XATVArtwork(properties)[source]

Bases: XATVItem

An artwork in media apps.

New in version 0.0.1.

Attributes:

data

The data for the artwork in the form of a picture.

downloaded

Whether the artwork was downloaded by media apps.

format

The data format for the artwork.

kind

The kind/purpose of the artwork.

object_description

The string description of the artwork.

raw_data

The data for the artwork in original format.

property data: XAImage

The data for the artwork in the form of a picture.

property downloaded: bool

Whether the artwork was downloaded by media apps.

property format: int

The data format for the artwork.

property kind: int

The kind/purpose of the artwork.

property object_description: str

The string description of the artwork.

property raw_data: bytes

The data for the artwork in original format.

class PyXA.apps.TV.XATVArtworkList(properties: dict, filter: dict | None = None)[source]

Bases: XATVItemList

A wrapper around lists of music artworks that employs fast enumeration techniques.

All properties of music artworks can be called as methods on the wrapped list, returning a list containing each artworks’s value for the property.

New in version 0.0.7.

Methods:

by_data(data)

by_downloaded(downloaded)

by_format(format)

by_kind(kind)

by_object_description(object_description)

by_raw_data(raw_data)

data()

downloaded()

format()

kind()

object_description()

raw_data()

by_data(data: XAImage) XATVArtwork | None[source]
by_downloaded(downloaded: bool) XATVArtwork | None[source]
by_format(format: int) XATVArtwork | None[source]
by_kind(kind: int) XATVArtwork | None[source]
by_object_description(object_description: str) XATVArtwork | None[source]
by_raw_data(raw_data: bytes) XATVArtwork | None[source]
data() list[XAImage][source]
downloaded() list[bool][source]
format() list[int][source]
kind() list[int][source]
object_description() list[str][source]
raw_data() list[bytes][source]
class PyXA.apps.TV.XATVBrowserWindow(properties)[source]

Bases: XATVWindow

A browser window of media apps.

New in version 0.0.1.

Attributes:

selection

The selected tracks.

view

The playlist currently displayed in the window.

property selection: XATVTrackList

The selected tracks.

property view: XATVPlaylist

The playlist currently displayed in the window.

class PyXA.apps.TV.XATVBrowserWindowList(properties: dict, filter: dict | None = None)[source]

Bases: XATVWindowList

A wrapper around lists of music browser windows that employs fast enumeration techniques.

All properties of music browser windows can be called as methods on the wrapped list, returning a list containing each windows’s value for the property.

New in version 0.0.7.

Methods:

by_selection(selection)

by_view(view)

selection()

view()

by_selection(selection: XATVTrackList) XATVPlaylistWindow | None[source]
by_view(view: XATVPlaylist) XATVPlaylistWindow | None[source]
selection() XATVTrackList[source]
view() XATVPlaylistList[source]
class PyXA.apps.TV.XATVFileTrack(properties)[source]

Bases: XATVTrack

A file track in media apps.

New in version 0.0.1.

Attributes:

location

The location of the file represented by the track.

property location: XAPath

The location of the file represented by the track.

class PyXA.apps.TV.XATVFileTrackList(properties: dict, filter: dict | None = None)[source]

Bases: XATVTrackList

A wrapper around lists of music file tracks that employs fast enumeration techniques.

All properties of music file tracks can be called as methods on the wrapped list, returning a list containing each track’s value for the property.

New in version 0.0.7.

Methods:

by_location(location)

location()

by_location(location: XAURL) XATVFileTrack | None[source]
location() list[XAURL][source]
class PyXA.apps.TV.XATVFolderPlaylist(properties)[source]

Bases: XATVUserPlaylist

A folder playlist in media apps.

New in version 0.0.7.

class PyXA.apps.TV.XATVFolderPlaylistList(properties: dict, filter: dict | None = None)[source]

Bases: XATVUserPlaylistList

A wrapper around lists of music folder playlists that employs fast enumeration techniques.

All properties of music folder playlists can be called as methods on the wrapped list, returning a list containing each playlist’s value for the property.

New in version 0.0.7.

class PyXA.apps.TV.XATVItem(properties)[source]

Bases: XAObject

A generic class with methods common to the various playable media classes in media apps.

New in version 0.0.1.

Attributes:

container

The container of the item.

id

The ID of the item.

index

The index of the item in the internal application order.

name

The name of the item.

object_class

persistent_id

The constant unique identifier for the item.

properties

Every property of the item.

Methods:

download()

Downloads the item into the local library.

get_clipboard_representation()

Gets a clipboard-codable representation of the music item.

reveal()

Reveals the item in the media apps window.

property container: XAObject

The container of the item.

download() XATVItem[source]

Downloads the item into the local library.

Returns:

A reference to the TV item object.

Return type:

XATVItem

New in version 0.0.1.

get_clipboard_representation() str[source]

Gets a clipboard-codable representation of the music item.

When a music item is copied to the clipboard, the name of the music item is added to the clipboard.

Returns:

The name of the music item

Return type:

str

New in version 0.0.8.

property id: int

The ID of the item.

property index: int

The index of the item in the internal application order.

property name: str

The name of the item.

property object_class
property persistent_id: str

The constant unique identifier for the item.

property properties: dict

Every property of the item.

reveal() XATVItem[source]

Reveals the item in the media apps window.

Returns:

A reference to the TV item object.

Return type:

XATVItem

See also

select()

New in version 0.0.1.

class PyXA.apps.TV.XATVItemList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XAList

A wrapper around lists of music items that employs fast enumeration techniques.

All properties of music items can be called as methods on the wrapped list, returning a list containing each item’s value for the property.

New in version 0.0.7.

Methods:

by_container(container)

by_id(id)

by_index(index)

by_name(name)

by_persistent_id(persistent_id)

by_properties(properties)

container()

get_clipboard_representation()

Gets a clipboard-codable representation of each music item in the list.

id()

index()

Returns the index of the first occurrence of the element in the list, or -1 if no such element exists in the list.

name()

persistent_id()

properties()

by_container(container: XAObject) XATVItem | None[source]
by_id(id: int) XATVItem | None[source]
by_index(index: int) XATVItem | None[source]
by_name(name: str) XATVItem | None[source]
by_persistent_id(persistent_id: str) XATVItem | None[source]
by_properties(properties: dict) XATVItem | None[source]
container() list[XAObject][source]
get_clipboard_representation() list[str][source]

Gets a clipboard-codable representation of each music item in the list.

When a list of music items is copied to the clipboard, the name of each item is added to the clipboard.

Returns:

A list of track names

Return type:

list[str]

New in version 0.0.8.

id() list[int][source]
index() list[int][source]

Returns the index of the first occurrence of the element in the list, or -1 if no such element exists in the list.

New in version 0.1.2.

name() list[str][source]
persistent_id() list[str][source]
properties() list[dict][source]
class PyXA.apps.TV.XATVLibraryPlaylist(properties)[source]

Bases: XATVPlaylist

The library playlist in media apps.

New in version 0.0.1.

Methods:

file_tracks([filter])

Returns a list of file tracks, as PyXA objects, matching the given filter.

shared_tracks([filter])

Returns a list of shared tracks, as PyXA objects, matching the given filter.

url_tracks([filter])

Returns a list of URL tracks, as PyXA objects, matching the given filter.

file_tracks(filter: dict | None = None) XATVFileTrackList[source]

Returns a list of file tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned file tracks will have, or None

Returns:

The list of file tracks

Return type:

XATVFileTrackList

New in version 0.0.7.

shared_tracks(filter: dict | None = None) XATVSharedTrackList[source]

Returns a list of shared tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned shared tracks will have, or None

Returns:

The list of shared tracks

Return type:

XATVSharedTrackList

New in version 0.0.7.

url_tracks(filter: dict | None = None) XATVURLTrackList[source]

Returns a list of URL tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned URL tracks will have, or None

Returns:

The list of URL tracks

Return type:

XATVURLTrackList

New in version 0.0.7.

class PyXA.apps.TV.XATVLibraryPlaylistList(properties: dict, filter: dict | None = None)[source]

Bases: XATVPlaylistList

A wrapper around lists of library playlists that employs fast enumeration techniques.

All properties of library playlists can be called as methods on the wrapped list, returning a list containing each playlist’s value for the property.

New in version 0.0.7.

class PyXA.apps.TV.XATVPlaylist(properties)[source]

Bases: XATVItem

A playlist in media apps.

New in version 0.0.1.

Methods:

add_tracks(*tracks)

Add one or more tracks to this playlist.

artworks([filter])

Returns a list of artworks, as PyXA objects, matching the given filter.

duplicate([location])

Duplicates the playlist to the specified source or folder playlist.

move(location)

Moves the playlist to the specified source or folder playlist.

move_to(parent_playlist)

play()

Starts playback of the playlist, beginning with the first track in the list.

search(query[, type])

tracks([filter])

Returns a list of tracks, as PyXA objects, matching the given filter.

Attributes:

duration

The total length of all tracks in seconds.

name

The name of the playlist.

object_description

The string description of the playlist.

parent

The folder containing the playlist, if any.

size

The total size of all tracks in the playlist in bytes.

special_kind

The special playlist kind.

time

The length of all tracks in the playlist in MM:SS format.

visible

Whether the playlist is visible in the source list.

add_tracks(*tracks: XATVTrackList | list[XATVTrack])[source]

Add one or more tracks to this playlist.

Parameters:

tracks (Union[XATVTrackList, list[XATVTrack]]) – The list of tracks to add to this playlist

New in version 0.2.2.

artworks(filter: dict | None = None) XATVArtworkList[source]

Returns a list of artworks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned artworks will have, or None

Returns:

The list of artworks

Return type:

XATVArtworkList

New in version 0.0.7.

duplicate(location: XATVSource | XATVFolderPlaylist | None = None)[source]

Duplicates the playlist to the specified source or folder playlist.

Parameters:

location (Union[XATVSource, XATVFolderPlaylist, None], optional) – The source or folder playlist to duplicate this playlist to, or None to duplicate into the parent of this playlist, defaults to None

New in version 0.2.2.

property duration: int

The total length of all tracks in seconds.

move(location: XATVSource | XATVFolderPlaylist)[source]

Moves the playlist to the specified source or folder playlist.

Parameters:

location (Union[XATVSource, XATVFolderPlaylist]) – The source or folder playlist to move this playlist to

New in version 0.2.2.

move_to(parent_playlist)[source]
property name: str

The name of the playlist.

property object_description: str

The string description of the playlist.

property parent: XATVPlaylist

The folder containing the playlist, if any.

play()[source]

Starts playback of the playlist, beginning with the first track in the list.

New in version 0.2.1.

search(query: str, type: Literal['all', 'artists', 'albums', 'displayed', 'tracks'] = 'displayed')[source]
property size: int

The total size of all tracks in the playlist in bytes.

property special_kind: PlaylistKind

The special playlist kind.

property time: str

The length of all tracks in the playlist in MM:SS format.

tracks(filter: dict | None = None) XATVTrackList[source]

Returns a list of tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned tracks will have, or None

Returns:

The list of tracks

Return type:

XATVTrackList

New in version 0.0.7.

property visible: bool

Whether the playlist is visible in the source list.

class PyXA.apps.TV.XATVPlaylistList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XATVItemList

A wrapper around lists of playlists that employs fast enumeration techniques.

All properties of playlists can be called as methods on the wrapped list, returning a list containing each playlist’s value for the property.

New in version 0.0.7.

Methods:

by_duration(duration)

by_name(name)

by_object_description(object_description)

by_parent(parent)

by_size(size)

by_special_kind(special_kind)

by_time(time)

by_visible(visible)

duration()

name()

object_description()

parent()

push(*elements)

Appends the object referenced by the provided PyXA wrapper to the end of the list.

size()

special_kind()

time()

visible()

by_duration(duration: int) XATVPlaylist | None[source]
by_name(name: str) XATVPlaylist | None[source]
by_object_description(object_description: str) XATVPlaylist | None[source]
by_parent(parent: XATVPlaylist) XATVPlaylist | None[source]
by_size(size: int) XATVPlaylist | None[source]
by_special_kind(special_kind: PlaylistKind) XATVPlaylist | None[source]
by_time(time: str) XATVPlaylist | None[source]
by_visible(visible: bool) XATVPlaylist | None[source]
duration() list[int][source]
name() list[str][source]
object_description() list[str][source]
parent() XATVPlaylistList[source]
push(*elements: list[XATVPlaylist]) XATVPlaylist | list[XATVPlaylist] | None[source]

Appends the object referenced by the provided PyXA wrapper to the end of the list.

New in version 0.0.3.

size() list[int][source]
special_kind() list[PlaylistKind][source]
time() list[str][source]
visible() list[bool][source]
class PyXA.apps.TV.XATVPlaylistWindow(properties)[source]

Bases: XATVWindow

A playlist window in media apps.

New in version 0.0.1.

Attributes:

selection

The selected tracks.

view

The playlist currently displayed in the window.

property selection: XATVTrackList

The selected tracks.

property view: XATVPlaylist

The playlist currently displayed in the window.

class PyXA.apps.TV.XATVPlaylistWindowList(properties: dict, filter: dict | None = None)[source]

Bases: XATVWindowList

A wrapper around lists of music playlist windows that employs fast enumeration techniques.

All properties of music playlist windows can be called as methods on the wrapped list, returning a list containing each windows’s value for the property.

New in version 0.0.7.

Methods:

by_selection(selection)

by_view(view)

selection()

view()

by_selection(selection: XATVTrackList) XATVPlaylistWindow | None[source]
by_view(view: XATVPlaylist) XATVPlaylistWindow | None[source]
selection() XATVTrackList[source]
view() XATVPlaylistList[source]
class PyXA.apps.TV.XATVSharedTrack(properties)[source]

Bases: XATVTrack

A shared track in media apps.

New in version 0.0.1.

class PyXA.apps.TV.XATVSharedTrackList(properties: dict, filter: dict | None = None)[source]

Bases: XATVTrackList

A wrapper around lists of music shared tracks that employs fast enumeration techniques.

All properties of music shared tracks can be called as methods on the wrapped list, returning a list containing each track’s value for the property.

New in version 0.0.7.

class PyXA.apps.TV.XATVSource(properties)[source]

Bases: XATVItem

A media source in media apps.

New in version 0.0.1.

Attributes:

capacity

The total size of the source, if it has a fixed size.

free_space

The free space on the source, if it has a fixed size.

kind

The source kind.

Methods:

library_playlists([filter])

Returns a list of library playlists, as PyXA objects, matching the given filter.

playlists([filter])

Returns a list of playlists, as PyXA objects, matching the given filter.

user_playlists([filter])

Returns a list of user playlists, as PyXA objects, matching the given filter.

property capacity: int

The total size of the source, if it has a fixed size.

property free_space: int

The free space on the source, if it has a fixed size.

property kind: SourceKind

The source kind.

library_playlists(filter: dict | None = None) XATVLibraryPlaylistList[source]

Returns a list of library playlists, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned library playlists will have, or None

Returns:

The list of library playlists

Return type:

XATVLibraryPlaylistList

New in version 0.0.7.

playlists(filter: dict | None = None) XATVPlaylistList[source]

Returns a list of playlists, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned playlists will have, or None

Returns:

The list of playlists

Return type:

XATVPlaylistList

New in version 0.0.7.

user_playlists(filter: dict | None = None) XATVUserPlaylistList[source]

Returns a list of user playlists, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned user playlists will have, or None

Returns:

The list of user playlists

Return type:

XATVUserPlaylistList

New in version 0.0.7.

class PyXA.apps.TV.XATVSourceList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XATVItemList

A wrapper around lists of sources that employs fast enumeration techniques.

All properties of sources can be called as methods on the wrapped list, returning a list containing each source’s value for the property.

New in version 0.0.7.

Methods:

by_capacity(capacity)

by_free_space(free_space)

by_kind(kind)

capacity()

free_space()

kind()

by_capacity(capacity: int) XATVSource | None[source]
by_free_space(free_space: int) XATVSource | None[source]
by_kind(kind: SourceKind) XATVSource | None[source]
capacity() list[int][source]
free_space() list[int][source]
kind() list[SourceKind][source]
class PyXA.apps.TV.XATVTrack(properties)[source]

Bases: XATVItem

A class for managing and interacting with tracks in media apps.

See also

XATVSharedTrack, XATVFileTrack, XATVRemoteURLTrack

New in version 0.0.1.

Attributes:

album

The name of the track's album.

album_rating

The rating of the track's album.

album_rating_kind

The album's rating kind.

bit_rate

The track's bitrate in kbps.

bookmark

The bookmark time of the track in seconds.

bookmarkable

Whether the playback position is kept in memory after stopping the track.

category

The category of the track.

comment

User-provided notes on the track.

database_id

A unique ID for the track.

date_added

The date the track was added to the current playlist.

disc_count

The number of discs in the source album.

disc_number

The index of the disc containing the track.

downloader_apple_id

The Apple ID of the person who downloaded the track.

downloader_name

The full name of the person who downloaded the track.

duration

Length of the track in seconds.

enabled

Whether the track is able to be played.

episode_id

A unique ID for the episode of the track.

episode_number

The episode number of the track.

finish

The time in seconds from the start at which the track stops playing.

genre

The music/audio genre category of the track.

grouping

The current section/chapter/movement of the track.

kind

A text description of the track.

long_description

A long description for the track.

media_kind

A description of the track's media type.

modification_date

The last modification date of the track's content.

object_description

A string description of the track.

played_count

The number of the times the track has been played.

played_date

The date the track was last played.

purchaser_apple_id

The Apple ID of the person who bought the track.

purchaser_name

The full name of the person who bought the track.

rating

The rating of the track from 0 to 100.

rating_kind

Whether the rating is user-provided or computed.

release_date

The date the track was released.

sample_rate

The sample rate of the track in Hz.

season_number

The number of the season the track belongs to.

show

The name of the show the track belongs to.

size

The size of the track in bytes.

skipped_count

The number of times the track has been skipped.

skipped_date

The date the track was last skipped.

sort_album

The string used for this track when sorting by album.

sort_director

The string used for this track when sorting by director.

sort_name

The string used for this track when sorting by name.

sort_show

The string used for this track when sorting by show.

start

The start time of the track in seconds.

time

HH:MM:SS representation for the duration of the track.

track_count

The number of tracks in the track's album.

track_number

The index of the track within its album.

unplayed

Whether the track has been played before.

volume_adjustment

Volume adjustment setting for this track from -100 to +100.

year

The year the track was released.

Methods:

artworks([filter])

Returns a list of artworks, as PyXA objects, matching the given filter.

duplicate(location)

Duplicates the track at the specified location.

move(location)

Moves the track to the specified location, copying it if appropriate.

play()

Plays the item.

select()

Selects the item.

property album: str

The name of the track’s album.

property album_rating: int

The rating of the track’s album.

property album_rating_kind: RatingKind

The album’s rating kind.

artworks(filter: dict | None = None) XATVArtworkList[source]

Returns a list of artworks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned artworks will have, or None

Returns:

The list of artworks

Return type:

XATVArtworkList

New in version 0.0.7.

property bit_rate: int

The track’s bitrate in kbps.

property bookmark: float

The bookmark time of the track in seconds.

property bookmarkable: bool

Whether the playback position is kept in memory after stopping the track.

property category: str

The category of the track.

property comment: str

User-provided notes on the track.

property database_id: int

A unique ID for the track.

property date_added: datetime

The date the track was added to the current playlist.

property disc_count: int

The number of discs in the source album.

property disc_number: int

The index of the disc containing the track.

property downloader_apple_id: str

The Apple ID of the person who downloaded the track.

property downloader_name: str

The full name of the person who downloaded the track.

duplicate(location: XATVPlaylist | XATVSource)[source]

Duplicates the track at the specified location.

Parameters:

location (Union[XATVPlaylist, XATVSource]) – The location to duplicate the track to

New in version 0.2.2.

property duration: float

Length of the track in seconds.

property enabled: bool

Whether the track is able to be played.

property episode_id: str

A unique ID for the episode of the track.

property episode_number: int

The episode number of the track.

property finish: float

The time in seconds from the start at which the track stops playing.

property genre: str

The music/audio genre category of the track.

property grouping: str

The current section/chapter/movement of the track.

property kind: str

A text description of the track.

property long_description: str

A long description for the track.

property media_kind: MediaKind

A description of the track’s media type.

property modification_date: datetime

The last modification date of the track’s content.

move(location: XATVPlaylist | XATVSource)[source]

Moves the track to the specified location, copying it if appropriate.

Parameters:

location (Union[XATVPlaylist, XATVSource]) – The playlist or source to move the track to

New in version 0.2.2.

property object_description: str

A string description of the track.

play() XATVItem[source]

Plays the item.

Returns:

A reference to the media item object.

Return type:

_XATVItem

New in version 0.0.1.

property played_count: int

The number of the times the track has been played.

property played_date: datetime

The date the track was last played.

property purchaser_apple_id: str

The Apple ID of the person who bought the track.

property purchaser_name: str

The full name of the person who bought the track.

property rating: int

The rating of the track from 0 to 100.

property rating_kind: RatingKind

Whether the rating is user-provided or computed.

property release_date: datetime

The date the track was released.

property sample_rate: int

The sample rate of the track in Hz.

property season_number: int

The number of the season the track belongs to.

select() XATVItem[source]

Selects the item.

Returns:

A reference to the media item object.

Return type:

XATVTrack

See also

reveal()

New in version 0.0.1.

property show: str

The name of the show the track belongs to.

property size: int

The size of the track in bytes.

property skipped_count: int

The number of times the track has been skipped.

property skipped_date: datetime

The date the track was last skipped.

property sort_album: str

The string used for this track when sorting by album.

property sort_director: str

The string used for this track when sorting by director.

property sort_name: str

The string used for this track when sorting by name.

property sort_show: str

The string used for this track when sorting by show.

property start: float

The start time of the track in seconds.

property time: str

HH:MM:SS representation for the duration of the track.

property track_count: int

The number of tracks in the track’s album.

property track_number: int

The index of the track within its album.

property unplayed: bool

Whether the track has been played before.

property volume_adjustment: int

Volume adjustment setting for this track from -100 to +100.

property year: int

The year the track was released.

class PyXA.apps.TV.XATVTrackList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XATVItemList

A wrapper around lists of music tracks that employs fast enumeration techniques.

All properties of music tracks can be called as methods on the wrapped list, returning a list containing each track’s value for the property.

New in version 0.0.7.

Methods:

album()

album_rating()

album_rating_kind()

bit_rate()

bookmark()

bookmarkable()

by_album(album)

by_album_rating(album_rating)

by_album_rating_kind(album_rating_kind)

by_bit_rate(bit_rate)

by_bookmark(bookmark)

by_bookmarkable(bookmarkable)

by_category(category)

by_comment(comment)

by_database_id(database_id)

by_date_added(date_added)

by_disc_count(disc_count)

by_disc_number(disc_number)

by_downloader_apple_id(downloader_apple_id)

by_downloader_name(downloader_name)

by_duration(duration)

by_enabled(enabled)

by_episode_id(episode_id)

by_episode_number(episode_number)

by_finish(finish)

by_genre(genre)

by_grouping(grouping)

by_kind(kind)

by_long_description(long_description)

by_media_kind(media_kind)

by_modification_date(modification_date)

by_object_description(object_description)

by_played_count(played_count)

by_played_date(played_date)

by_purchaser_apple_id(purchaser_apple_id)

by_purchaser_name(purchaser_name)

by_rating(rating)

by_rating_kind(rating_kind)

by_release_date(release_date)

by_sample_rate(sample_rate)

by_season_number(season_number)

by_show(show)

by_size(size)

by_skipped_count(skipped_count)

by_skipped_date(skipped_date)

by_sort_album(sort_album)

by_sort_director(sort_director)

by_sort_name(sort_name)

by_sort_show(sort_show)

by_start(start)

by_time(time)

by_track_count(track_count)

by_track_number(track_number)

by_unplayed(unplayed)

by_volume_adjustment(volume_adjustment)

by_year(year)

category()

comment()

database_id()

date_added()

disc_count()

disc_number()

downloader_apple_id()

downloader_name()

duration()

enabled()

episode_id()

episode_number()

finish()

genre()

grouping()

kind()

long_description()

media_kind()

modification_date()

object_description()

played_count()

played_date()

purchaser_apple_id()

purchaser_name()

rating()

rating_kind()

release_date()

sample_rate()

season_number()

show()

size()

skipped_count()

skipped_date()

sort_album()

sort_director()

sort_name()

sort_show()

start()

time()

track_count()

track_number()

unplayed()

volume_adjustment()

year()

album() list[str][source]
album_rating() list[int][source]
album_rating_kind() list[RatingKind][source]
bit_rate() list[int][source]
bookmark() list[float][source]
bookmarkable() list[bool][source]
by_album(album: str) XATVTrack | None[source]
by_album_rating(album_rating: int) XATVTrack | None[source]
by_album_rating_kind(album_rating_kind: RatingKind) XATVTrack | None[source]
by_bit_rate(bit_rate: int) XATVTrack | None[source]
by_bookmark(bookmark: float) XATVTrack | None[source]
by_bookmarkable(bookmarkable: bool) XATVTrack | None[source]
by_category(category: str) XATVTrack | None[source]
by_comment(comment: str) XATVTrack | None[source]
by_database_id(database_id: int) XATVTrack | None[source]
by_date_added(date_added: datetime) XATVTrack | None[source]
by_disc_count(disc_count: int) XATVTrack | None[source]
by_disc_number(disc_number: int) XATVTrack | None[source]
by_downloader_apple_id(downloader_apple_id: str) XATVTrack | None[source]
by_downloader_name(downloader_name: str) XATVTrack | None[source]
by_duration(duration: float) XATVTrack | None[source]
by_enabled(enabled: bool) XATVTrack | None[source]
by_episode_id(episode_id: str) XATVTrack | None[source]
by_episode_number(episode_number: int) XATVTrack | None[source]
by_finish(finish: float) XATVTrack | None[source]
by_genre(genre: str) XATVTrack | None[source]
by_grouping(grouping: str) XATVTrack | None[source]
by_kind(kind: str) XATVTrack | None[source]
by_long_description(long_description: str) XATVTrack | None[source]
by_media_kind(media_kind: MediaKind) XATVTrack | None[source]
by_modification_date(modification_date: datetime) XATVTrack | None[source]
by_object_description(object_description: str) XATVTrack | None[source]
by_played_count(played_count: int) XATVTrack | None[source]
by_played_date(played_date: datetime) XATVTrack | None[source]
by_purchaser_apple_id(purchaser_apple_id: str) XATVTrack | None[source]
by_purchaser_name(purchaser_name: str) XATVTrack | None[source]
by_rating(rating: int) XATVTrack | None[source]
by_rating_kind(rating_kind: RatingKind) XATVTrack | None[source]
by_release_date(release_date: datetime) XATVTrack | None[source]
by_sample_rate(sample_rate: int) XATVTrack | None[source]
by_season_number(season_number: int) XATVTrack | None[source]
by_show(show: str) XATVTrack | None[source]
by_size(size: int) XATVTrack | None[source]
by_skipped_count(skipped_count: int) XATVTrack | None[source]
by_skipped_date(skipped_date: datetime) XATVTrack | None[source]
by_sort_album(sort_album: str) XATVTrack | None[source]
by_sort_director(sort_director: str) XATVTrack | None[source]
by_sort_name(sort_name: str) XATVTrack | None[source]
by_sort_show(sort_show: str) XATVTrack | None[source]
by_start(start: float) XATVTrack | None[source]
by_time(time: str) XATVTrack | None[source]
by_track_count(track_count: int) XATVTrack | None[source]
by_track_number(track_number: int) XATVTrack | None[source]
by_unplayed(unplayed: bool) XATVTrack | None[source]
by_volume_adjustment(volume_adjustment: int) XATVTrack | None[source]
by_year(year: int) XATVTrack | None[source]
category() list[str][source]
comment() list[str][source]
database_id() list[int][source]
date_added() list[datetime][source]
disc_count() list[int][source]
disc_number() list[int][source]
downloader_apple_id() list[str][source]
downloader_name() list[str][source]
duration() list[float][source]
enabled() list[bool][source]
episode_id() list[str][source]
episode_number() list[int][source]
finish() list[float][source]
genre() list[str][source]
grouping() list[str][source]
kind() list[str][source]
long_description() list[str][source]
media_kind() list[MediaKind][source]
modification_date() list[datetime][source]
object_description() list[str][source]
played_count() list[int][source]
played_date() list[datetime][source]
purchaser_apple_id() list[str][source]
purchaser_name() list[str][source]
rating() list[int][source]
rating_kind() list[RatingKind][source]
release_date() list[datetime][source]
sample_rate() list[int][source]
season_number() list[int][source]
show() list[str][source]
size() list[int][source]
skipped_count() list[int][source]
skipped_date() list[datetime][source]
sort_album() list[str][source]
sort_director() list[str][source]
sort_name() list[str][source]
sort_show() list[str][source]
start() list[float][source]
time() list[str][source]
track_count() list[int][source]
track_number() list[int][source]
unplayed() list[bool][source]
volume_adjustment() list[int][source]
year() list[int][source]
class PyXA.apps.TV.XATVURLTrack(properties)[source]

Bases: XATVTrack

A URL track in media apps.

New in version 0.0.1.

Attributes:

address

The URL for the track.

property address: XAURL

The URL for the track.

class PyXA.apps.TV.XATVURLTrackList(properties: dict, filter: dict | None = None)[source]

Bases: XATVTrackList

A wrapper around lists of music URL tracks that employs fast enumeration techniques.

All properties of music URL tracks can be called as methods on the wrapped list, returning a list containing each track’s value for the property.

New in version 0.0.7.

Methods:

address()

by_address(address)

address() list[str][source]
by_address(address: str) XATVURLTrack | None[source]
class PyXA.apps.TV.XATVUserPlaylist(properties)[source]

Bases: XATVPlaylist

A user-created playlist in media apps.

New in version 0.0.1.

Methods:

file_tracks([filter])

Returns a list of file tracks, as PyXA objects, matching the given filter.

shared_tracks([filter])

Returns a list of shared tracks, as PyXA objects, matching the given filter.

url_tracks([filter])

Returns a list of URL tracks, as PyXA objects, matching the given filter.

Attributes:

shared

Whether the playlist is shared.

smart

Whether the playlist is a smart playlist.

file_tracks(filter: dict | None = None) XATVFileTrackList[source]

Returns a list of file tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned file tracks will have, or None

Returns:

The list of file tracks

Return type:

XATVFileTrackList

New in version 0.0.7.

property shared: bool

Whether the playlist is shared.

shared_tracks(filter: dict | None = None) XATVSharedTrackList[source]

Returns a list of shared tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned shared tracks will have, or None

Returns:

The list of shared tracks

Return type:

XATVSharedTrackList

New in version 0.0.7.

property smart: bool

Whether the playlist is a smart playlist.

url_tracks(filter: dict | None = None) XATVURLTrackList[source]

Returns a list of URL tracks, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned URL tracks will have, or None

Returns:

The list of URL tracks

Return type:

XATVURLTrackList

New in version 0.0.7.

class PyXA.apps.TV.XATVUserPlaylistList(properties: dict, filter: dict | None = None)[source]

Bases: XATVPlaylistList

A wrapper around lists of music user playlists that employs fast enumeration techniques.

All properties of music user playlists can be called as methods on the wrapped list, returning a list containing each playlist’s value for the property.

New in version 0.0.7.

Methods:

by_shared(shared)

by_smart(smart)

shared()

smart()

by_shared(shared: bool) XATVUserPlaylist | None[source]
by_smart(smart: bool) XATVUserPlaylist | None[source]
shared() list[bool][source]
smart() list[bool][source]
class PyXA.apps.TV.XATVVideoWindow(properties)[source]

Bases: XATVWindow

A video window in media apps.

New in version 0.0.1.

class PyXA.apps.TV.XATVVideoWindowList(properties: dict, filter: dict | None = None)[source]

Bases: XATVWindowList

A wrapper around lists of music video windows that employs fast enumeration techniques.

All properties of music video windows can be called as methods on the wrapped list, returning a list containing each windows’s value for the property.

New in version 0.0.7.

class PyXA.apps.TV.XATVWindow(properties)[source]

Bases: XASBWindow, XATVItem

A windows of media apps.

New in version 0.0.1.

Attributes:

full_screen

Whether the window is currently full screen.

position

The upper left position of the window.

property full_screen: bool

Whether the window is currently full screen.

property position: tuple[int, int]

The upper left position of the window.

class PyXA.apps.TV.XATVWindowList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XATVItemList

A wrapper around lists of windows that employs fast enumeration techniques.

All properties of windows can be called as methods on the wrapped list, returning a list containing each windows’s value for the property.

New in version 0.0.7.

Methods:

bounds()

by_bounds(bounds)

by_closeable(closeable)

by_collapseable(collapseable)

by_collapsed(collapsed)

by_full_screen(full_screen)

by_position(position)

by_resizable(resizable)

by_visible(visible)

by_zoomable(zoomable)

by_zoomed(zoomed)

closeable()

collapseable()

collapsed()

full_screen()

position()

resizable()

visible()

zoomable()

zoomed()

bounds() list[tuple[tuple[int, int], tuple[int, int]]][source]
by_bounds(bounds: tuple[tuple[int, int], tuple[int, int]]) XATVWindow | None[source]
by_closeable(closeable: bool) XATVWindow | None[source]
by_collapseable(collapseable: bool) XATVWindow | None[source]
by_collapsed(collapsed: bool) XATVWindow | None[source]
by_full_screen(full_screen: bool) XATVWindow | None[source]
by_position(position: tuple[int, int]) XATVWindow | None[source]
by_resizable(resizable: bool) XATVWindow | None[source]
by_visible(visible: bool) XATVWindow | None[source]
by_zoomable(zoomable: bool) XATVWindow | None[source]
by_zoomed(zoomed: bool) XATVWindow | None[source]
closeable() list[bool][source]
collapseable() list[bool][source]
collapsed() list[bool][source]
full_screen() list[bool][source]
position() list[tuple[int, int]][source]
resizable() list[bool][source]
visible() list[bool][source]
zoomable() list[bool][source]
zoomed() list[bool][source]