~ubuntu-branches/ubuntu/precise/libtorrent/precise

« back to all changes in this revision

Viewing changes to src/torrent/resume.cc

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Rivas
  • Date: 2007-09-11 15:12:31 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20070911151231-brompt7pecvfbaau
Tags: 0.11.8-1
* New upstream version
* debian/patches/update-changelog.patch:
 + Updated with the new changelog.
* debian/control:
 + Added the Homepage field, deleted Homepages from the descriptions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// libTorrent - BitTorrent library
2
 
// Copyright (C) 2005-2006, Jari Sundell
 
2
// Copyright (C) 2005-2007, Jari Sundell
3
3
//
4
4
// This program is free software; you can redistribute it and/or modify
5
5
// it under the terms of the GNU General Public License as published by
145
145
    else if (!filesItr->is_map())
146
146
      *filesItr = Object(Object::TYPE_MAP);
147
147
 
 
148
    filesItr->insert_key("completed", (int64_t)(*listItr)->completed_chunks());
 
149
 
148
150
    rak::file_stat fs;
149
151
 
150
152
    if (!fs.update(fileList->root_dir() + (*listItr)->path()->as_string()) ||
182
184
    if (filesItr->has_key_value("priority") &&
183
185
        filesItr->get_key_value("priority") >= 0 && filesItr->get_key_value("priority") <= PRIORITY_HIGH)
184
186
      (*listItr)->set_priority((priority_t)filesItr->get_key_value("priority"));
 
187
 
 
188
    if (filesItr->has_key_value("completed"))
 
189
      fileList->set_file_completed_chunks(listItr, std::max<int64_t>(filesItr->get_key_value("completed"), (*listItr)->size_chunks()));
185
190
  }
186
191
}
187
192