Use proper XML escaping for all fields in the music and photo plugins.
[pyTivo/TheBayer.git] / plugins / photo / templates / container.tmpl
blob82933b6f9271743ffa9c932e57c41c21c486fe25
1 <?xml version="1.0" encoding="UTF-8" ?>
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-container/folder</ContentType>
23 </Content>
24 </Links>
25 </Item>
26 #else
27 <Item>
28 <Details>
29 #set $title = '.'.join(file['name'].split('.')[:-1])
30 <Title>$escape($title)</Title>
31 <ContentType>image/jpeg</ContentType>
32 #if 'odate' in $file
33 <CaptureDate>$file['odate']</CaptureDate>
34 #end if
35 <CreationDate>$file['cdate']</CreationDate>
36 <LastChangeDate>$file['mdate']</LastChangeDate>
37 </Details>
38 <Links>
39 <Content>
40 <ContentType>image/jpeg</ContentType>
41 <AcceptsParams>Yes</AcceptsParams>
42 <Url>/$quote($container)$quote($file.part_path)</Url>
43 </Content>
44 </Links>
45 </Item>
46 #end if
47 #end for
48 </TiVoContainer>