@@ -133,19 +133,19 @@ public void Parse(byte[] bytes)
133133
134134 }
135135
136- public static PPMFile Create ( string authorName , ulong authorId , List < PPMFrame > frames , byte [ ] audio , bool ignoreMetadata = false )
136+ public static PPMFile Create ( PPMAuthor author , List < PPMFrame > frames , byte [ ] audio , bool ignoreMetadata = false )
137137 {
138138 var file = new PPMFile ( ) ;
139139 file . FrameCount = ( ushort ) ( frames . Count - 1 ) ;
140140 file . FormatVersion = 0x24 ;
141141
142142 if ( ! ignoreMetadata )
143143 {
144- file . RootAuthor = new PPMAuthor ( authorName , authorId ) ;
145- file . ParentAuthor = new PPMAuthor ( authorName , authorId ) ;
146- file . CurrentAuthor = new PPMAuthor ( authorName , authorId ) ;
144+ file . RootAuthor = author ;
145+ file . ParentAuthor = author ;
146+ file . CurrentAuthor = author ;
147147
148- string mac6 = string . Join ( "" , BitConverter . GetBytes ( authorId ) . Take ( 3 ) . Reverse ( ) . Select ( t => t . ToString ( "X2" ) ) ) ;
148+ string mac6 = string . Join ( "" , BitConverter . GetBytes ( author . Id ) . Take ( 3 ) . Reverse ( ) . Select ( t => t . ToString ( "X2" ) ) ) ;
149149 var asm = Assembly . GetEntryAssembly ( ) . GetName ( ) . Version ;
150150 var dt = DateTime . UtcNow ;
151151 var fnVM = ( ( byte ) asm . Major ) . ToString ( "X2" ) ;
@@ -248,9 +248,9 @@ public void Save(string fn)
248248 w . Write ( ( ushort ) 0x0024 ) ;
249249 w . Write ( ( ushort ) ( IsLocked ? 1 : 0 ) ) ;
250250 w . Write ( ThumbnailFrameIndex ) ;
251- w . Write ( Encoding . Unicode . GetBytes ( RootAuthor . Name . PadRight ( 11 , '\0 ' ) ) ) ;
252- w . Write ( Encoding . Unicode . GetBytes ( ParentAuthor . Name . PadRight ( 11 , '\0 ' ) ) ) ;
253- w . Write ( Encoding . Unicode . GetBytes ( CurrentAuthor . Name . PadRight ( 11 , '\0 ' ) ) ) ;
251+ w . Write ( Encoding . Unicode . GetBytes ( RootAuthor . _Name . PadRight ( 11 , '\0 ' ) ) ) ;
252+ w . Write ( Encoding . Unicode . GetBytes ( ParentAuthor . _Name . PadRight ( 11 , '\0 ' ) ) ) ;
253+ w . Write ( Encoding . Unicode . GetBytes ( CurrentAuthor . _Name . PadRight ( 11 , '\0 ' ) ) ) ;
254254 w . Write ( ParentAuthor . Id ) ;
255255 w . Write ( CurrentAuthor . Id ) ;
256256 w . Write ( ParentFilename . Buffer ) ;
0 commit comments