mirror of
https://github.com/SinTan1729/movie-rename.git
synced 2024-12-27 04:38:35 -06:00
Fixed bug for unknown year
This commit is contained in:
parent
c65b0823fb
commit
7fee309ff3
1 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,9 @@ impl MovieEntry {
|
||||||
// Generate desired filename from movie entry
|
// Generate desired filename from movie entry
|
||||||
fn rename_format(&self, mut format: String) -> String {
|
fn rename_format(&self, mut format: String) -> String {
|
||||||
format = format.replace("{title}", self.title.as_str());
|
format = format.replace("{title}", self.title.as_str());
|
||||||
format = format.replace("{year}", self.year.as_str());
|
if self.year.as_str() != "n/a" {
|
||||||
|
format = format.replace("{year}", self.year.as_str());
|
||||||
|
}
|
||||||
format = format.replace("{director}", self.director.as_str());
|
format = format.replace("{director}", self.director.as_str());
|
||||||
format
|
format
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue