Added Total Items Count to Folders
[pyTivo.git] / plugins / video / templates / container.tmpl
blobfde208a49776b4edc14fa0a63558ffc9dd77530d
1 <?xml version="1.0" encoding="ISO-8859-1" ?>
2 <TiVoContainer>
3 <ItemStart>$start</ItemStart>
4 <ItemCount>#echo len($videos) #</ItemCount>
5 <Details>
6 <Title>$escape($name)</Title>
7 <ContentType>x-container/tivo-videos</ContentType>
8 <SourceFormat>x-container/folder</SourceFormat>
9 <TotalItems>$total</TotalItems>
10 <UniqueId>$crc($guid + $name)</UniqueId>
11 </Details>
12 #for $video in $videos
13 #if $video.is_dir
14 <Item>
15 <Details>
16 <Title>$escape($video.title)</Title>
17 <ContentType>x-container/folder</ContentType>
18 <SourceFormat>x-tivo-container/tivo-dvr</SourceFormat>
19 <UniqueId>$crc($guid + $video.small_path)</UniqueId>
20 <TotalItems>$video.total_items</TotalItems>
21 </Details>
22 <Links>
23 <Content>
24 <Url>/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)/$quote($video.name)</Url>
25 <ContentType>x-tivo-container/folder</ContentType>
26 </Content>
27 </Links>
28 </Item>
29 #else
30 <Item>
31 <Details>
32 <Title>$escape($video.title)</Title>
33 <ContentType>video/x-tivo-mpeg</ContentType>
34 #if not $video.valid
35 <CopyProtected>Yes</CopyProtected>
36 #end if
37 <SourceFormat>video/x-ms-wmv</SourceFormat>
38 <SourceSize>$video.size</SourceSize>
39 <Duration>$video.duration</Duration>
40 <Description>$escape($video.description)</Description>
41 <SourceChannel>$escape($video.displayMajorNumber)</SourceChannel>
42 <SourceStation>$escape($video.callsign)</SourceStation>
43 <SeriesId>$video.seriesId</SeriesId>
44 </Details>
45 <Links>
46 <Content>
47 <ContentType>video/x-tivo-mpeg</ContentType>
48 <AcceptsParams>No</AcceptsParams>
49 <Url>/$quote($container)$quote($video.part_path)</Url>
50 </Content>
51 <CustomIcon>
52 <ContentType>video/*</ContentType>
53 <AcceptsParams>No</AcceptsParams>
54 <Url>urn:tivo:image:save-until-i-delete-recording</Url>
55 </CustomIcon>
56 <TiVoVideoDetails>
57 <ContentType>text/xml</ContentType>
58 <AcceptsParams>No</AcceptsParams>
59 <Url>/TiVoConnect?Command=TVBusQuery&amp;Container=$quote($container)&amp;File=$quote($video.part_path)</Url>
60 </TiVoVideoDetails>
61 </Links>
62 </Item>
63 #end if
64 #end for
65 </TiVoContainer>