@@ -11,20 +11,30 @@ public override void WriteToFile(TagLib.File file, AutoTagConfig config, Action<
1111 {
1212 base . WriteToFile ( file , config , setStatus ) ;
1313
14- if ( config . ExtendedTagging && file . MimeType == "video/x-matroska" )
14+ if ( ( file . TagTypes & TagLib . TagTypes . Matroska ) == TagLib . TagTypes . Matroska )
1515 {
16- var custom = ( TagLib . Matroska . Tag ) file . GetTag ( TagLib . TagTypes . Matroska ) ;
17- custom . Set ( "TMDB" , "" , $ "tv/{ Id } ") ;
16+ var custom = ( TagLib . Matroska . Tag ) file . GetTag ( TagLib . TagTypes . Matroska ) ;
17+ // workaround for https://github.com/mono/taglib-sharp/issues/263 - Tag.Album property writes to TITLE tag instead of ALBUM
18+ // how has this still not been fixed??
19+ custom . Set ( "ALBUM" , null , SeriesName ) ;
20+
21+ if ( config . ExtendedTagging )
22+ {
23+ custom . Set ( "TMDB" , null , $ "tv/{ Id } ") ;
24+ }
25+ }
26+ else
27+ {
28+ file . Tag . Album = SeriesName ;
1829 }
1930
20- file . Tag . Album = SeriesName ;
2131 file . Tag . Disc = ( uint ) Season ;
2232 file . Tag . Track = ( uint ) Episode ;
2333 file . Tag . TrackCount = ( uint ) SeasonEpisodes ;
2434
2535 // set extra tags because Apple is stupid and uses different tags for some reason
2636 // for a list of tags see https://kdenlive.org/en/project/adding-meta-data-to-mp4-video/
27- if ( config . AppleTagging && file . MimeType . EndsWith ( "/mp4" ) )
37+ if ( config . AppleTagging && ( file . TagTypes & TagLib . TagTypes . Apple ) == TagLib . TagTypes . Apple )
2838 {
2939 var appleTags = ( TagLib . Mpeg4 . AppleTag ) file . GetTag ( TagLib . TagTypes . Apple ) ;
3040
0 commit comments