Skip to content

Commit 39a30a8

Browse files
committed
Missed a rename operation
1 parent 581a522 commit 39a30a8

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

core/src/com/biglybt/plugin/magnet/MagnetPlugin.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,12 @@
905905
});
906906
}
907907

908+
protected boolean
909+
getRenameDisplayName()
910+
{
911+
return( COConfigurationManager.getBooleanParameter( "Plugin.Magnet URI Handler.MagnetPlugin.rename.using.dn" ));
912+
}
913+
908914
public String
909915
addSource(
910916
Download download,
@@ -1771,9 +1777,8 @@
17711777

17721778
boolean update_torrent = false;
17731779

1774-
boolean rename = COConfigurationManager.getBooleanParameter( "Plugin.Magnet URI Handler.MagnetPlugin.rename.using.dn" );
17751780

1776-
if ( dn != null&& rename ){
1781+
if ( dn != null && getRenameDisplayName()){
17771782

17781783
if ( TorrentUtils.getDisplayName( torrent ) == null ){
17791784

core/src/com/biglybt/plugin/magnet/MagnetPluginMDDownloader.java

+9-6
Original file line numberDiff line numberDiff line change
@@ -1129,13 +1129,16 @@ public void perform(TimerEvent event ){
11291129
}
11301130

11311131
try{
1132-
String dn = magnet_args.get( "dn" );
1133-
1134-
if ( dn != null ){
1135-
1136-
PlatformTorrentUtils.setContentTitle( torrent, dn );
1132+
if ( plugin.getRenameDisplayName()){
1133+
1134+
String dn = magnet_args.get( "dn" );
1135+
1136+
if ( dn != null ){
1137+
1138+
PlatformTorrentUtils.setContentTitle( torrent, dn );
1139+
}
11371140
}
1138-
1141+
11391142
String pfi_str = magnet_args.get( "pfi" );
11401143

11411144
if ( pfi_str != null ){

0 commit comments

Comments
 (0)