PSPlex.format.ps1xml

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
    <ViewDefinitions>
        <View>
            <Name>DefaultView</Name>
            <ViewSelectedBy>
                <TypeName>PSPlex.Playlist</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>9</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>5</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>9</Width>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>title</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>ratingKey</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>smart</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>leafCount</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>DefaultView</Name>
            <ViewSelectedBy>
                <TypeName>PSPlex.Session</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Label>title</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>type</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>username</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>playerstate</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>sessionid</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>transcodesession</Label>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <ScriptBlock>
                                    if($_.type -eq 'episode')
                                    {
                                        $_.grandparentTitle + ' - ' + $_.parentTitle + ' - ' + $_.title
                                    }
                                    else
                                    {
                                        $_.title
                                    }
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $_.type
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $_.User.title
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $_.Player.State
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $_.Session.id
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>$_.TranscodeSession</ScriptBlock>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>DefaultView</Name>
            <ViewSelectedBy>
                <TypeName>PSPlex.SharedLibrary</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Label>username</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>allowSync</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>section</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>invitedAt</Label>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>username</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>allowSync</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>section</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    [timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddSeconds($_.invitedAt))
                                </ScriptBlock>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>DefaultView</Name>
            <ViewSelectedBy>
                <TypeName>PSPlex.User</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>title</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>username</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>email</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>id</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>allowSync</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>DefaultView</Name>
            <ViewSelectedBy>
                <TypeName>PSPlex.WatchHistory</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Width>40</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>30</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>8</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>20</Width>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>title</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>grandparenttitle</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>type</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>lastViewedAtDateTime</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
    </ViewDefinitions>
</Configuration>