Updated music plugin to suport the full paths
[pyTivo.git] / plugins / music / templates / container.tmpl
blob0ed33292404cda349b12fc02e682dfa907386e00
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 $file['is_dir']
13 <Item>
14 <Details>
15 <Title>$escape($file.name)</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.name)</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['name'].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($container)$quote($file.part_path)</Url>
43 </Content>
44 </Links>
45 </Item>
46 #end if
47 #end for
48 </TiVoContainer>