mirror of
https://github.com/SteamRE/DepotDownloader.git
synced 2026-10-20 01:46:17 +00:00
Various manifest related improvements (#94)
* Changed saved manifest name format for better clarity * Expanded manifest-to-text conversion
This commit is contained in:
1 parent
05d6da9662
commit
4299c23bed
2 files changed
+13
-3
No files matched your search
@@ -654,7 +654,7 @@ namespace DepotDownloader
|
||||
}
|
||||
else
|
||||
{
|
||||
var newManifestFileName = Path.Combine( configDir, string.Format( "{0}.bin", depot.manifestId ) );
|
||||
var newManifestFileName = Path.Combine( configDir, string.Format( "{0}_{1}.bin", depot.id, depot.manifestId ) );
|
||||
if ( newManifestFileName != null )
|
||||
{
|
||||
byte[] expectedChecksum, currentChecksum;
|
||||
@@ -738,10 +738,13 @@ namespace DepotDownloader
|
||||
|
||||
newProtoManifest.Files.Sort( ( x, y ) => string.Compare( x.FileName, y.FileName, StringComparison.Ordinal ) );
|
||||
|
||||
Console.WriteLine( "Manifest {0} ({1})", depot.manifestId, newProtoManifest.CreationTime );
|
||||
|
||||
if ( Config.DownloadManifestOnly )
|
||||
{
|
||||
StringBuilder manifestBuilder = new StringBuilder();
|
||||
string txtManifest = Path.Combine( depot.installDir, string.Format( "manifest_{0}.txt", depot.id ) );
|
||||
string txtManifest = Path.Combine( depot.installDir, string.Format( "manifest_{0}_{1}.txt", depot.id, depot.manifestId ) );
|
||||
manifestBuilder.Append( string.Format( "{0}\n\n", newProtoManifest.CreationTime ) );
|
||||
|
||||
foreach ( var file in newProtoManifest.Files )
|
||||
{
|
||||
@@ -749,6 +752,8 @@ namespace DepotDownloader
|
||||
continue;
|
||||
|
||||
manifestBuilder.Append( string.Format( "{0}\n", file.FileName ) );
|
||||
manifestBuilder.Append( string.Format( "\t{0}\n", file.TotalSize ) );
|
||||
manifestBuilder.Append( string.Format( "\t{0}\n", BitConverter.ToString( file.FileHash ).Replace( "-", "" ) ) );
|
||||
}
|
||||
|
||||
File.WriteAllText( txtManifest, manifestBuilder.ToString() );
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
|
||||
@@ -20,6 +21,7 @@ namespace DepotDownloader
|
||||
{
|
||||
sourceManifest.Files.ForEach(f => Files.Add(new FileData(f)));
|
||||
ID = id;
|
||||
CreationTime = sourceManifest.CreationTime;
|
||||
}
|
||||
|
||||
[ProtoContract()]
|
||||
@@ -117,6 +119,9 @@ namespace DepotDownloader
|
||||
[ProtoMember(2)]
|
||||
public ulong ID { get; private set; }
|
||||
|
||||
[ProtoMember(3)]
|
||||
public DateTime CreationTime { get; private set; }
|
||||
|
||||
public static ProtoManifest LoadFromFile(string filename, out byte[] checksum)
|
||||
{
|
||||
if (!File.Exists(filename))
|
||||
|
||||
Reference in new issue
Block a user