* Added prefered encoding list using the "encoding_list = <enc>"

option.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@587 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-10-26 13:25:10 +00:00
parent 7e861cf9f2
commit da67bdfff1
4 changed files with 19 additions and 0 deletions
+11
View File
@@ -394,6 +394,17 @@
</para></listitem>
</varlistentry>
<varlistentry>
<term>encoding_list = <replaceable>encoding</replaceable></term>
<listitem><para>
Add a preferred filename encoding to the list. The encodings
are attempted in the order they are inserted, if none match
the torrent default is used.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
+1
View File
@@ -142,6 +142,7 @@ initialize_option_handler(Control* c, OptionHandler* optionHandler) {
optionHandler->insert("connection_seed", new OptionHandlerString(c, &apply_connection_seed, &validate_non_empty));
optionHandler->insert("session", new OptionHandlerString(c, &apply_session_directory, &validate_directory));
optionHandler->insert("encoding_list", new OptionHandlerString(c, &apply_encoding_list, &validate_non_empty));
optionHandler->insert("tracker_dump", new OptionHandlerString(c, &apply_tracker_dump, &validate_yes_no));
optionHandler->insert("use_udp_trackers", new OptionHandlerString(c, &apply_use_udp_trackers, &validate_yes_no));
}
+6
View File
@@ -243,3 +243,9 @@ void
apply_session_directory(Control* m, const std::string& arg) {
m->core()->get_download_store().use(arg);
}
void
apply_encoding_list(Control* m, const std::string& arg) {
torrent::encoding_list()->push_back(arg);
}
+1
View File
@@ -90,6 +90,7 @@ void apply_use_udp_trackers(Control* m, const std::string& arg);
void apply_check_hash(Control* m, const std::string& arg);
void apply_session_directory(Control* m, const std::string& arg);
void apply_encoding_list(Control* m, const std::string& arg);
class OptionHandlerInt : public OptionHandlerBase {
public: