ADown: Back in Action!

» 10 July 2012 » In C#, Open-Source, Programming, Releases »

After so many months of being still, I didn’t know ADown(Facebook Album Downloader) is not quite working. Today, I updated the code and the binary. It’s now usable again!

ADown - Facebook Album Downloader

Facebook Album Downloader

So what exactly happened?

Mainly, there has been an issue with the function ParseAlbumUrl. If you want to see the actual differentiation, you can head over here. Meanwhile, the new code looks like this:

/// <summary>
/// Parses the album URL.
/// </summary>
/// <param name="url">The URL.</param>
/// <returns>A string list containing the short album ID, user ID and the validity</returns>
private List<string> ParseAlbumUrl(string url)
{
    List<string> details = new List<string>();
    Match m;

    // Check if the URL has the user id and the album id parameter
    // And store it in the list
    if (Regex.IsMatch(url, @"a\.[0-9]+\.[0-9]+\.[0-9]+(&.+)?$"))
    {
        m = Regex.Match(url, @"a\.([0-9]+)\.[0-9]+\.([0-9]+)(&.+)?$");
        details.Add(m.Groups[2].Value);
        details.Add(m.Groups[1].Value);
        details.Add("valid");
    }
    else
    {
        // If it's not, clear the list and add null, and invalid.
        details.Clear();
        details.AddRange(new string[] { "null", "null", "invalid" });
    }

    return details;
}

And of course, there’s a new feature. I added a parent directory for each album. The directory of the album owner’s name is first created. This will eliminate confusion and album merge from different owners.

Download it here.

Tags: , , , , ,

Trackback URL

  • Robert Woodley

    Can we download the code & project? Is it in Git? Whereabouts? Thanks!

    • http://ruel.me Ruel

      Thanks, did you see the github link? :)