pyTivo
[pyTivo/krkeegan.git] / plugins / music / templates / container.tmpl
blob04ba1ff12c1bd913669b33c41fb7cd4be8162019
1 <?xml version="1.0" encoding="ISO-8859-1" ?>
2 <TiVoContainer>
3 <ItemStart>$start</ItemStart>
4 <ItemCount>#echo len($files) #</ItemCount>
5 <Details>
6 <Title>$escape($name)</Title>
7 <ContentType>x-container/folder</ContentType>
8 <SourceFormat>x-container/folder</SourceFormat>
9 <TotalItems>$total</TotalItems>
10 </Details>
11 #for $file in $files
12 #if $isdir($file['path'])
13 <Item>
14 <Details>
15 <Title>$escape($file.path)</Title>
16 <ContentType>x-container/folder</ContentType>
17 <SourceFormat>x-container/folder</SourceFormat>
18 </Details>
19 <Links>
20 <Content>
21 <Url>/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)/$quote($file.path)</Url>
22 <ContentType>x-tivo-container/folder</ContentType>
23 </Content>
24 </Links>
25 </Item>
26 #else
27 <Item>
28 <Details>
29 <Title>#echo '.'.join(file['path'].split('.')[:-1]) #</Title>
30 <ContentType>audio/*</ContentType>
31 <SourceFormat>audio/mpeg</SourceFormat>
33 #for $key in $file
34 <$key>$file[$key]</$key>
35 #end for
37 </Details>
38 <Links>
39 <Content>
40 <ContentType>audio/*</ContentType>
41 <AcceptsParams>No</AcceptsParams>
42 <Url>/$quote($name)/$quote($file.path)</Url>
43 </Content>
44 </Links>
45 </Item>
46 #end if
47 #end for
48 </TiVoContainer>