Author: andar
Revision: 5247
Log:
Torrent name is now changed when the root folder or file is renamed
Diff:
Modified: branches/1.1.0_RC/ChangeLog
===================================================================
--- branches/1.1.0_RC/ChangeLog 2009-05-09 03:02:11 UTC (rev 5246)
+++ branches/1.1.0_RC/ChangeLog 2009-05-09 03:05:43 UTC (rev 5247)
@@ -1,6 +1,7 @@
=== Deluge 1.1.8 - (In Development) ===
==== Core ====
* Fix pause all/resume all
+ * Torrent name is now changed when the root folder or file is renamed
==== GtkUI ====
* Fix high cpu usage when displaying speeds in titlebar
Modified: branches/1.1.0_RC/deluge/core/torrent.py
===================================================================
--- branches/1.1.0_RC/deluge/core/torrent.py 2009-05-09 03:02:11 UTC (rev
5246)
+++ branches/1.1.0_RC/deluge/core/torrent.py 2009-05-09 03:05:43 UTC (rev
5247)
@@ -637,10 +637,11 @@
def ti_name():
if self.handle.has_metadata():
+ name = os.path.split(self.torrent_info.file_at(0).path)[0]
try:
- return self.torrent_info.name().decode("utf8", "ignore")
+ return name.decode("utf8", "ignore")
except UnicodeDecodeError:
- return self.torrent_info.name()
+ return name
return self.torrent_id
def ti_priv():
Modified: trunk/deluge/core/torrent.py
===================================================================
--- trunk/deluge/core/torrent.py 2009-05-09 03:02:11 UTC (rev 5246)
+++ trunk/deluge/core/torrent.py 2009-05-09 03:05:43 UTC (rev 5247)
@@ -621,10 +621,11 @@
def ti_name():
if self.handle.has_metadata():
+ name = os.path.split(self.torrent_info.file_at(0).path)[0]
try:
- return self.torrent_info.name().decode("utf8", "ignore")
+ return name.decode("utf8", "ignore")
except UnicodeDecodeError:
- return self.torrent_info.name()
+ return name
return self.torrent_id
def ti_priv():
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---