@@ -49,7 +49,7 @@ public static bool write(string filePath, FileMetadata metadata, Action<string>
49
49
// overwrite default file name - allows software such as Icaros to display cover art thumbnails - default isn't compliant with Matroska guidelines
50
50
file . Tag . Pictures = new TagLib . Picture [ ] { new TagLib . Picture ( downloadFile ) { Filename = "cover.jpg" } } ;
51
51
}
52
- } else if ( String . IsNullOrEmpty ( metadata . CoverFilename ) ) {
52
+ } else if ( String . IsNullOrEmpty ( metadata . CoverFilename ) && config . addCoverArt == true ) {
53
53
fileSuccess = false ;
54
54
}
55
55
@@ -74,19 +74,30 @@ public static bool write(string filePath, FileMetadata metadata, Action<string>
74
74
if ( config . mode == 0 ) {
75
75
newPath = Path . Combine (
76
76
Path . GetDirectoryName ( filePath ) ,
77
- EscapeFilename ( String . Format ( GetTVRenamePattern ( config ) , metadata . SeriesName , metadata . Season , metadata . Episode . ToString ( "00" ) , metadata . Title ) + Path . GetExtension ( filePath ) )
78
- ) ;
77
+ EscapeFilename ( String . Format (
78
+ GetTVRenamePattern ( config ) ,
79
+ metadata . SeriesName ,
80
+ metadata . Season ,
81
+ metadata . Episode . ToString ( "00" ) ,
82
+ metadata . Title ) + Path . GetExtension ( filePath )
83
+ )
84
+ ) ;
79
85
} else {
80
86
newPath = Path . Combine (
81
87
Path . GetDirectoryName ( filePath ) ,
82
- EscapeFilename ( String . Format ( GetMovieRenamePattern ( config ) , metadata . Title , metadata . Date . Year ) ) + Path . GetExtension ( filePath ) ) ;
88
+ EscapeFilename ( String . Format (
89
+ GetMovieRenamePattern ( config ) ,
90
+ metadata . Title ,
91
+ metadata . Date . Year ) + Path . GetExtension ( filePath )
92
+ )
93
+ ) ;
83
94
}
84
95
85
96
if ( filePath != newPath ) {
86
97
try {
87
98
File . Move ( filePath , newPath ) ;
88
99
setPath ( newPath ) ;
89
- setStatus ( $ "Successfully renamed file to '{ newPath } '", false ) ;
100
+ setStatus ( $ "Successfully renamed file to '{ Path . GetFileName ( newPath ) } '", false ) ;
90
101
} catch ( Exception ex ) {
91
102
if ( config . verbose ) {
92
103
setStatus ( $ "Error: Failed to rename file - { ex . Message } ", true ) ;
0 commit comments