2174 |
# Get the display to use for the movie, from any |
# Get the display to use for the movie, from any |
2175 |
# .title file which might be present. |
# .title file which might be present. |
2176 |
my $display = $file; |
my $display = $file; |
2177 |
if ( $display =~ /^(.*)\.(.*)$/ ) |
|
2178 |
|
# |
2179 |
|
# Read the display information from the .title file. |
2180 |
|
# |
2181 |
|
if ( -e $dir . "/" . $display . ".title" ) |
2182 |
{ |
{ |
2183 |
# Strip suffix |
# |
2184 |
$display = $1; |
# Display the contents of the .title file. |
2185 |
|
# |
2186 |
|
$display = join( "\n", &readFile( $dir . "/" . $display . ".title" ) ); |
2187 |
|
|
2188 |
} |
} |
2189 |
if ( $display =~ /^(.*)\/(.*)$/ ) |
else |
2190 |
{ |
{ |
2191 |
# Strip directory |
# |
2192 |
$display = $2; |
# No .title file - so we just show the |
2193 |
|
# filename. |
2194 |
|
# |
2195 |
|
if ( $display =~ /^(.*)\.(.*)$/ ) |
2196 |
|
{ |
2197 |
|
# Strip suffix |
2198 |
|
$display = $1; |
2199 |
|
} |
2200 |
|
if ( $display =~ /^(.*)\/(.*)$/ ) |
2201 |
|
{ |
2202 |
|
# Strip directory |
2203 |
|
$display = $2; |
2204 |
|
} |
2205 |
|
|
2206 |
|
# Make it safe for display. |
2207 |
|
$display = &urlEncode( $display ); |
2208 |
|
|
2209 |
} |
} |
2210 |
$display = &urlEncode( $display ); |
|
2211 |
|
|
2212 |
# |
# |
2213 |
# Build up the text to insert into the file lists. |
# Build up the text to insert into the file lists. |