Skip to content

Commit

Permalink
remove debug code, skip downloading meta file
Browse files Browse the repository at this point in the history
  • Loading branch information
Kade-N committed Mar 25, 2021
1 parent aaac012 commit 9f956b1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions library/Sporecast.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Xml.Linq;

namespace SporeDownloader
{
Expand All @@ -25,9 +22,7 @@ public Queue<long> getAllAssetIds()

var assetIds = new Queue<long>();


var doc = server.getSporecastFeed(Id).Element("{http://www.w3.org/2005/Atom}feed");//.Elements().FirstOrDefault()?.Elements().FirstOrDefault();
Console.WriteLine(doc?.ToString());
var doc = server.getSporecastFeed(Id).Element("{http://www.w3.org/2005/Atom}feed");

if (doc is not null)
{
Expand All @@ -47,7 +42,6 @@ public Queue<long> getAllAssetIds()
Console.WriteLine($"Found no assets for sporecast {Id}, feed did not exist");
}


return assetIds;
}

Expand All @@ -67,14 +61,14 @@ public void downloadAllAssets(String filePath)
foreach (var id in assetIds)
{
server.downloadAssetPng(id, filePath + id + ".png");
try
/*try
{
server.getAssetInfo(id).Save(filePath + id + "_meta.xml");
}
catch (System.Xml.XmlException)
{
Console.WriteLine($"Asset ID {id} for sporecast {Id} has invalid data in its Spore.com XML data, this data will not be saved");
}
}*/

Console.WriteLine($"Saved asset ID {id} for sporecast {Id}");
}
Expand Down

0 comments on commit 9f956b1

Please sign in to comment.