Skip to content

Instantly share code, notes, and snippets.

@chrippa
Created August 11, 2009 17:38
Show Gist options
  • Save chrippa/165985 to your computer and use it in GitHub Desktop.
Save chrippa/165985 to your computer and use it in GitHub Desktop.
// Pseudokod
handle_file (file)
{
// Hasha filen
hash = hashfs_hash_ed2k(file)
// Leta upp metadata
result = anidb_ed2k_lookup(hash)
// Sätt filspecifik info i DBn
hashfs_file_prop_set(file, "ep", result.ep)
// etc ...
// Lägg till filen i ett set och lägg till metadata
set = hashfs_file_add_to_set(file, result.anime)
hashfs_set_prop_set(set, "total_ep", result.anime.total_ep)
// etc ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment