Browse Source

Merge pull request #515 from H3mul/add-qbittorrent-features

Add qbittorrent features
pull/527/head
Eric Kok 5 years ago committed by GitHub
parent
commit
79defa87d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 34
      app/src/main/java/org/transdroid/core/gui/DetailsActivity.java
  2. 27
      app/src/main/java/org/transdroid/core/gui/DetailsFragment.java
  3. 4
      app/src/main/java/org/transdroid/core/gui/TorrentTasksExecutor.java
  4. 26
      app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java
  5. 8
      app/src/main/java/org/transdroid/daemon/Daemon.java
  6. 4
      app/src/main/java/org/transdroid/daemon/DaemonMethod.java
  7. 27
      app/src/main/java/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java
  8. 23
      app/src/main/java/org/transdroid/daemon/Torrent.java
  9. 31
      app/src/main/java/org/transdroid/daemon/task/ToggleFirstLastPieceDownloadTask.java
  10. 31
      app/src/main/java/org/transdroid/daemon/task/ToggleSequentialDownloadTask.java
  11. 31
      app/src/main/res/menu/fragment_details.xml
  12. 9
      app/src/main/res/values-ru/strings.xml
  13. 9
      app/src/main/res/values/strings.xml

34
app/src/main/java/org/transdroid/core/gui/DetailsActivity.java

@ -56,6 +56,8 @@ import org.transdroid.daemon.TorrentFile;
import org.transdroid.daemon.task.DaemonTaskFailureResult; import org.transdroid.daemon.task.DaemonTaskFailureResult;
import org.transdroid.daemon.task.DaemonTaskResult; import org.transdroid.daemon.task.DaemonTaskResult;
import org.transdroid.daemon.task.DaemonTaskSuccessResult; import org.transdroid.daemon.task.DaemonTaskSuccessResult;
import org.transdroid.daemon.task.ToggleSequentialDownloadTask;
import org.transdroid.daemon.task.ToggleFirstLastPieceDownloadTask;
import org.transdroid.daemon.task.ForceRecheckTask; import org.transdroid.daemon.task.ForceRecheckTask;
import org.transdroid.daemon.task.GetFileListTask; import org.transdroid.daemon.task.GetFileListTask;
import org.transdroid.daemon.task.GetFileListTaskSuccessResult; import org.transdroid.daemon.task.GetFileListTaskSuccessResult;
@ -278,6 +280,36 @@ public class DetailsActivity extends AppCompatActivity implements TorrentTasksEx
} }
} }
@Background
@Override
public void toggleSequentialDownload(Torrent torrent, boolean sequentialState) {
torrent.mimicSequentialDownload(sequentialState);
String onState = getString(R.string.result_togglesequential_onstate);
String offState = getString(R.string.result_togglesequential_offstate);
String stateString = sequentialState ? onState : offState;
DaemonTaskResult result = ToggleSequentialDownloadTask.create(currentConnection, torrent).execute(log);
if (result instanceof DaemonTaskSuccessResult) {
onTaskSucceeded((DaemonTaskSuccessResult) result, getString(R.string.result_togglesequential, torrent.getName(), stateString));
} else {
onCommunicationError((DaemonTaskFailureResult) result, false);
}
}
@Background
@Override
public void toggleFirstLastPieceDownload(Torrent torrent, boolean firstLastPieceState) {
torrent.mimicFirstLastPieceDownload(firstLastPieceState);
String onState = getString(R.string.result_togglefirstlastpiece_onstate);
String offState = getString(R.string.result_togglefirstlastpiece_offstate);
String stateString = firstLastPieceState ? onState : offState;
DaemonTaskResult result = ToggleFirstLastPieceDownloadTask.create(currentConnection, torrent).execute(log);
if (result instanceof DaemonTaskSuccessResult) {
onTaskSucceeded((DaemonTaskSuccessResult) result, getString(R.string.result_togglefirstlastpiece, torrent.getName(), stateString));
} else {
onCommunicationError((DaemonTaskFailureResult) result, false);
}
}
@Background @Background
@Override @Override
public void forceRecheckTorrent(Torrent torrent) { public void forceRecheckTorrent(Torrent torrent) {
@ -330,7 +362,7 @@ public class DetailsActivity extends AppCompatActivity implements TorrentTasksEx
// Refresh the screen as well // Refresh the screen as well
refreshTorrent(); refreshTorrent();
refreshTorrentDetails(torrent); refreshTorrentDetails(torrent);
SnackbarManager.show(Snackbar.with(this).text(successMessage)); SnackbarManager.show(Snackbar.with(this).text(successMessage).duration(Snackbar.SnackbarDuration.LENGTH_SHORT));
} }
@UiThread @UiThread

27
app/src/main/java/org/transdroid/core/gui/DetailsFragment.java

@ -301,6 +301,12 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
case R.id.action_stop: case R.id.action_stop:
stopTorrent(); stopTorrent();
return true; return true;
case R.id.action_toggle_sequential:
toggleSequentialDownload(menuItem);
return true;
case R.id.action_toggle_firstlastpiece:
toggleFirstLastPieceDownload(menuItem);
return true;
case R.id.action_forcerecheck: case R.id.action_forcerecheck:
setForceRecheck(); setForceRecheck();
return true; return true;
@ -359,6 +365,15 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
detailsMenu.getMenu().findItem(R.id.action_setlabel).setVisible(setLabel); detailsMenu.getMenu().findItem(R.id.action_setlabel).setVisible(setLabel);
boolean forceRecheck = Daemon.supportsForceRecheck(torrent.getDaemon()); boolean forceRecheck = Daemon.supportsForceRecheck(torrent.getDaemon());
detailsMenu.getMenu().findItem(R.id.action_forcerecheck).setVisible(forceRecheck); detailsMenu.getMenu().findItem(R.id.action_forcerecheck).setVisible(forceRecheck);
boolean sequentialdl = Daemon.supportsSequentialDownload(torrent.getDaemon());
MenuItem seqMenuItem = detailsMenu.getMenu().findItem(R.id.action_toggle_sequential);
seqMenuItem.setVisible(sequentialdl);
seqMenuItem.setChecked(torrent.isSequentiallyDownloading());
boolean firstlastpiecedl = Daemon.supportsFirstLastPiece(torrent.getDaemon());
MenuItem flpMenuItem = detailsMenu.getMenu().findItem(R.id.action_toggle_firstlastpiece);
flpMenuItem.setVisible(firstlastpiecedl);
flpMenuItem.setChecked(torrent.isDownloadingFirstLastPieceFirst());
detailsMenu.getMenu().findItem(R.id.action_download_mode).setVisible(!torrent.isFinished() && (firstlastpiecedl || sequentialdl));
boolean setTrackers = Daemon.supportsSetTrackers(torrent.getDaemon()); boolean setTrackers = Daemon.supportsSetTrackers(torrent.getDaemon());
detailsMenu.getMenu().findItem(R.id.action_updatetrackers).setVisible(setTrackers); detailsMenu.getMenu().findItem(R.id.action_updatetrackers).setVisible(setTrackers);
boolean setLocation = Daemon.supportsSetDownloadLocation(torrent.getDaemon()); boolean setLocation = Daemon.supportsSetDownloadLocation(torrent.getDaemon());
@ -421,6 +436,18 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
} }
} }
@OptionsItem(R.id.action_toggle_sequential)
protected void toggleSequentialDownload(MenuItem menuItem) {
if (getTasksExecutor() != null)
getTasksExecutor().toggleSequentialDownload(torrent, !menuItem.isChecked());
}
@OptionsItem(R.id.action_toggle_firstlastpiece)
protected void toggleFirstLastPieceDownload(MenuItem menuItem) {
if (getTasksExecutor() != null)
getTasksExecutor().toggleFirstLastPieceDownload(torrent, !menuItem.isChecked());
}
@OptionsItem(R.id.action_forcerecheck) @OptionsItem(R.id.action_forcerecheck)
protected void setForceRecheck() { protected void setForceRecheck() {
if (getTasksExecutor() != null) if (getTasksExecutor() != null)

4
app/src/main/java/org/transdroid/core/gui/TorrentTasksExecutor.java

@ -40,6 +40,10 @@ public interface TorrentTasksExecutor {
void removeTorrent(Torrent torrent, boolean withData); void removeTorrent(Torrent torrent, boolean withData);
void toggleSequentialDownload(Torrent torrent, boolean sequentialState);
void toggleFirstLastPieceDownload(Torrent torrent, boolean firstLastPieceState);
void forceRecheckTorrent(Torrent torrent); void forceRecheckTorrent(Torrent torrent);
void updateLabel(Torrent torrent, String newLabel); void updateLabel(Torrent torrent, String newLabel);

26
app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java

@ -103,6 +103,8 @@ import org.transdroid.daemon.task.AddByUrlTask;
import org.transdroid.daemon.task.DaemonTaskFailureResult; import org.transdroid.daemon.task.DaemonTaskFailureResult;
import org.transdroid.daemon.task.DaemonTaskResult; import org.transdroid.daemon.task.DaemonTaskResult;
import org.transdroid.daemon.task.DaemonTaskSuccessResult; import org.transdroid.daemon.task.DaemonTaskSuccessResult;
import org.transdroid.daemon.task.ToggleSequentialDownloadTask;
import org.transdroid.daemon.task.ToggleFirstLastPieceDownloadTask;
import org.transdroid.daemon.task.ForceRecheckTask; import org.transdroid.daemon.task.ForceRecheckTask;
import org.transdroid.daemon.task.GetFileListTask; import org.transdroid.daemon.task.GetFileListTask;
import org.transdroid.daemon.task.GetFileListTaskSuccessResult; import org.transdroid.daemon.task.GetFileListTaskSuccessResult;
@ -1225,6 +1227,30 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE
} }
} }
@Background
@Override
public void toggleSequentialDownload(Torrent torrent, boolean sequentialState) {
torrent.mimicSequentialDownload(sequentialState);
DaemonTaskResult result = ToggleSequentialDownloadTask.create(currentConnection, torrent).execute(log);
if (result instanceof DaemonTaskSuccessResult) {
onTaskSucceeded((DaemonTaskSuccessResult) result, getString(R.string.result_togglesequential));
} else {
onCommunicationError((DaemonTaskFailureResult) result, false);
}
}
@Background
@Override
public void toggleFirstLastPieceDownload(Torrent torrent, boolean firstLastPieceState) {
torrent.mimicFirstLastPieceDownload(firstLastPieceState);
DaemonTaskResult result = ToggleFirstLastPieceDownloadTask.create(currentConnection, torrent).execute(log);
if (result instanceof DaemonTaskSuccessResult) {
onTaskSucceeded((DaemonTaskSuccessResult) result, getString(R.string.action_toggle_firstlastpiece));
} else {
onCommunicationError((DaemonTaskFailureResult) result, false);
}
}
@Background @Background
@Override @Override
public void forceRecheckTorrent(Torrent torrent) { public void forceRecheckTorrent(Torrent torrent) {

8
app/src/main/java/org/transdroid/daemon/Daemon.java

@ -412,6 +412,14 @@ public enum Daemon {
|| type == Transmission || type == Dummy || type == qBittorrent; || type == Transmission || type == Dummy || type == qBittorrent;
} }
public static boolean supportsSequentialDownload(Daemon type) {
return type == qBittorrent;
}
public static boolean supportsFirstLastPiece(Daemon type) {
return type == qBittorrent;
}
public static boolean supportsExtraPassword(Daemon type) { public static boolean supportsExtraPassword(Daemon type) {
return type == Deluge || type == Aria2; return type == Deluge || type == Aria2;
} }

4
app/src/main/java/org/transdroid/daemon/DaemonMethod.java

@ -44,7 +44,9 @@ public enum DaemonMethod {
SetTrackers (19), SetTrackers (19),
SetAlternativeMode (20), SetAlternativeMode (20),
GetStats (21), GetStats (21),
ForceRecheck (22); ForceRecheck (22),
ToggleSequentialDownload(23),
ToggleFirstLastPieceDownload(24);
private int code; private int code;
private static final Map<Integer,DaemonMethod> lookup = new HashMap<>(); private static final Map<Integer,DaemonMethod> lookup = new HashMap<>();

27
app/src/main/java/org/transdroid/daemon/Qbittorrent/QbittorrentAdapter.java

@ -292,6 +292,18 @@ public class QbittorrentAdapter implements IDaemonAdapter {
makeRequest(log, "/command/recheck", new BasicNameValuePair("hash", task.getTargetTorrent().getUniqueID())); makeRequest(log, "/command/recheck", new BasicNameValuePair("hash", task.getTargetTorrent().getUniqueID()));
return new DaemonTaskSuccessResult(task); return new DaemonTaskSuccessResult(task);
case ToggleSequentialDownload:
// Toggle sequential download mode on a torrent
makeRequest(log, "/command/toggleSequentialDownload", new BasicNameValuePair("hashes", task.getTargetTorrent().getUniqueID()));
return new DaemonTaskSuccessResult(task);
case ToggleFirstLastPieceDownload:
// Set policy for downloading first and last piece first on a torrent
makeRequest(log, "/command/toggleFirstLastPiecePrio", new BasicNameValuePair("hashes", task.getTargetTorrent().getUniqueID()));
return new DaemonTaskSuccessResult(task);
case SetLabel: case SetLabel:
SetLabelTask labelTask = (SetLabelTask) task; SetLabelTask labelTask = (SetLabelTask) task;
@ -492,6 +504,8 @@ public class QbittorrentAdapter implements IDaemonAdapter {
long uploaded; long uploaded;
int dlspeed; int dlspeed;
int upspeed; int upspeed;
boolean dlseq = false;
boolean dlflp = false;
Date addedOn = null; Date addedOn = null;
Date completionOn = null; Date completionOn = null;
String label = null; String label = null;
@ -507,6 +521,12 @@ public class QbittorrentAdapter implements IDaemonAdapter {
ratio = tor.getDouble("ratio"); ratio = tor.getDouble("ratio");
dlspeed = tor.getInt("dlspeed"); dlspeed = tor.getInt("dlspeed");
upspeed = tor.getInt("upspeed"); upspeed = tor.getInt("upspeed");
if (tor.has("seq_dl")) {
dlseq = tor.getBoolean("seq_dl");
}
if (tor.has("f_l_piece_prio")) {
dlflp = tor.getBoolean("f_l_piece_prio");
}
if (tor.has("uploaded")) { if (tor.has("uploaded")) {
uploaded = tor.getLong("uploaded"); uploaded = tor.getLong("uploaded");
} else { } else {
@ -535,7 +555,7 @@ public class QbittorrentAdapter implements IDaemonAdapter {
eta = (long) (size - (size * progress)) / dlspeed; eta = (long) (size - (size * progress)) / dlspeed;
// Add the parsed torrent to the list // Add the parsed torrent to the list
// @formatter:off // @formatter:off
torrents.add(new Torrent( Torrent torrent = new Torrent(
(long) i, (long) i,
tor.getString("hash"), tor.getString("hash"),
tor.getString("name"), tor.getString("name"),
@ -557,7 +577,10 @@ public class QbittorrentAdapter implements IDaemonAdapter {
addedOn, addedOn,
completionOn, completionOn,
null, null,
settings.getType())); settings.getType());
torrent.mimicSequentialDownload(dlseq);
torrent.mimicFirstLastPieceDownload(dlflp);
torrents.add(torrent);
// @formatter:on // @formatter:on
} }

23
app/src/main/java/org/transdroid/daemon/Torrent.java

@ -49,6 +49,8 @@ public final class Torrent implements Parcelable, Comparable<Torrent>, Finishabl
final private float partDone; final private float partDone;
final private float available; final private float available;
private String label; private String label;
private boolean sequentialDownload;
private boolean firstLastPieceDownload;
final private Date dateAdded; final private Date dateAdded;
final private Date dateDone; final private Date dateDone;
@ -76,6 +78,8 @@ public final class Torrent implements Parcelable, Comparable<Torrent>, Finishabl
this.partDone = in.readFloat(); this.partDone = in.readFloat();
this.available = in.readFloat(); this.available = in.readFloat();
this.label = in.readString(); this.label = in.readString();
this.sequentialDownload = in.readByte() != 0;
this.firstLastPieceDownload = in.readByte() != 0;
long lDateAdded = in.readLong(); long lDateAdded = in.readLong();
this.dateAdded = (lDateAdded == -1) ? null : new Date(lDateAdded); this.dateAdded = (lDateAdded == -1) ? null : new Date(lDateAdded);
@ -109,6 +113,8 @@ public final class Torrent implements Parcelable, Comparable<Torrent>, Finishabl
this.partDone = partDone; this.partDone = partDone;
this.available = available; this.available = available;
this.label = label; this.label = label;
this.sequentialDownload = false;
this.firstLastPieceDownload = false;
this.dateAdded = dateAdded; this.dateAdded = dateAdded;
if (realDateDone != null) { if (realDateDone != null) {
@ -197,6 +203,13 @@ public final class Torrent implements Parcelable, Comparable<Torrent>, Finishabl
return label; return label;
} }
public boolean isSequentiallyDownloading() {
return sequentialDownload;
}
public boolean isDownloadingFirstLastPieceFirst() {
return firstLastPieceDownload;
}
public Date getDateAdded() { public Date getDateAdded() {
return dateAdded; return dateAdded;
} }
@ -342,6 +355,14 @@ public final class Torrent implements Parcelable, Comparable<Torrent>, Finishabl
label = newLabel; label = newLabel;
} }
public void mimicSequentialDownload(boolean sequentialDownload) {
this.sequentialDownload = sequentialDownload;
}
public void mimicFirstLastPieceDownload(boolean firstLastPieceDownload) {
this.firstLastPieceDownload = firstLastPieceDownload;
}
public void mimicCheckingStatus() { public void mimicCheckingStatus() {
statusCode = TorrentStatus.Checking; statusCode = TorrentStatus.Checking;
} }
@ -399,6 +420,8 @@ public final class Torrent implements Parcelable, Comparable<Torrent>, Finishabl
dest.writeFloat(partDone); dest.writeFloat(partDone);
dest.writeFloat(available); dest.writeFloat(available);
dest.writeString(label); dest.writeString(label);
dest.writeByte((byte) (sequentialDownload ? 1 : 0));
dest.writeByte((byte) (firstLastPieceDownload ? 1 : 0));
dest.writeLong((dateAdded == null) ? -1 : dateAdded.getTime()); dest.writeLong((dateAdded == null) ? -1 : dateAdded.getTime());
dest.writeLong((dateDone == null) ? -1 : dateDone.getTime()); dest.writeLong((dateDone == null) ? -1 : dateDone.getTime());

31
app/src/main/java/org/transdroid/daemon/task/ToggleFirstLastPieceDownloadTask.java

@ -0,0 +1,31 @@
/*
* This file is part of Transdroid <http://www.transdroid.org>
*
* Transdroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Transdroid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.transdroid.daemon.task;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Torrent;
public class ToggleFirstLastPieceDownloadTask extends DaemonTask {
protected ToggleFirstLastPieceDownloadTask(IDaemonAdapter adapter, Torrent targetTorrent) {
super(adapter, DaemonMethod.ToggleFirstLastPieceDownload, targetTorrent, null);
}
public static ToggleFirstLastPieceDownloadTask create(IDaemonAdapter adapter, Torrent targetTorrent) {
return new ToggleFirstLastPieceDownloadTask(adapter, targetTorrent);
}
}

31
app/src/main/java/org/transdroid/daemon/task/ToggleSequentialDownloadTask.java

@ -0,0 +1,31 @@
/*
* This file is part of Transdroid <http://www.transdroid.org>
*
* Transdroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Transdroid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.transdroid.daemon.task;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Torrent;
public class ToggleSequentialDownloadTask extends DaemonTask {
protected ToggleSequentialDownloadTask(IDaemonAdapter adapter, Torrent targetTorrent) {
super(adapter, DaemonMethod.ToggleSequentialDownload, targetTorrent, null);
}
public static ToggleSequentialDownloadTask create(IDaemonAdapter adapter, Torrent targetTorrent) {
return new ToggleSequentialDownloadTask(adapter, targetTorrent);
}
}

31
app/src/main/res/menu/fragment_details.xml

@ -47,19 +47,36 @@
<item <item
android:id="@+id/action_start_direct" android:id="@+id/action_start_direct"
android:icon="@drawable/ic_action_start" android:icon="@drawable/ic_action_start"
android:orderInCategory="202" android:orderInCategory="203"
android:title="@string/action_start" android:title="@string/action_start"
app:showAsAction="always" /> app:showAsAction="always" />
<item <item
android:id="@+id/action_stop" android:id="@+id/action_stop"
android:icon="@drawable/ic_action_stop" android:icon="@drawable/ic_action_stop"
android:orderInCategory="203" android:orderInCategory="204"
android:title="@string/action_stop" android:title="@string/action_stop"
app:showAsAction="always" /> app:showAsAction="always" />
<item
android:id="@+id/action_download_mode"
android:icon="@drawable/ic_action_download"
android:orderInCategory="205"
android:title="@string/action_download_mode"
app:showAsAction="always" >
<menu>
<item
android:id="@+id/action_toggle_sequential"
android:title="@string/action_toggle_sequential"
android:checkable="true" />
<item
android:id="@+id/action_toggle_firstlastpiece"
android:title="@string/action_toggle_firstlastpiece"
android:checkable="true" />
</menu>
</item>
<item <item
android:id="@+id/action_remove" android:id="@+id/action_remove"
android:icon="@drawable/ic_action_remove" android:icon="@drawable/ic_action_remove"
android:orderInCategory="204" android:orderInCategory="206"
android:title="@string/action_remove" android:title="@string/action_remove"
app:showAsAction="always"> app:showAsAction="always">
<menu> <menu>
@ -74,25 +91,25 @@
<item <item
android:id="@+id/action_setlabel" android:id="@+id/action_setlabel"
android:icon="@drawable/ic_action_labels" android:icon="@drawable/ic_action_labels"
android:orderInCategory="205" android:orderInCategory="207"
android:title="@string/action_setlabel" android:title="@string/action_setlabel"
app:showAsAction="always" /> app:showAsAction="always" />
<item <item
android:id="@+id/action_forcerecheck" android:id="@+id/action_forcerecheck"
android:icon="@drawable/ic_action_force_recheck" android:icon="@drawable/ic_action_force_recheck"
android:orderInCategory="206" android:orderInCategory="208"
android:title="@string/action_forcerecheck" android:title="@string/action_forcerecheck"
app:showAsAction="always" /> app:showAsAction="always" />
<item <item
android:id="@+id/action_updatetrackers" android:id="@+id/action_updatetrackers"
android:icon="@drawable/ic_action_trackers" android:icon="@drawable/ic_action_trackers"
android:orderInCategory="207" android:orderInCategory="209"
android:title="@string/action_updatetrackers" android:title="@string/action_updatetrackers"
app:showAsAction="always" /> app:showAsAction="always" />
<item <item
android:id="@+id/action_changelocation" android:id="@+id/action_changelocation"
android:icon="@drawable/ic_action_save" android:icon="@drawable/ic_action_save"
android:orderInCategory="208" android:orderInCategory="210"
android:title="@string/action_changelocation" android:title="@string/action_changelocation"
app:showAsAction="always" /> app:showAsAction="always" />

9
app/src/main/res/values-ru/strings.xml

@ -54,6 +54,9 @@
<string name="action_remove_default">Удалить торрент-файл</string> <string name="action_remove_default">Удалить торрент-файл</string>
<string name="action_remove_withdata">Удалить вместе с данными</string> <string name="action_remove_withdata">Удалить вместе с данными</string>
<string name="action_setlabel">Установить метку</string> <string name="action_setlabel">Установить метку</string>
<string name="action_download_mode">Режим скачивания</string>
<string name="action_toggle_sequential">Скачать последовательно</string>
<string name="action_toggle_firstlastpiece">Скачать начало и конец первыми</string>
<string name="action_updatetrackers">Обновить трекеры</string> <string name="action_updatetrackers">Обновить трекеры</string>
<string name="action_changelocation">Изменить место расположения</string> <string name="action_changelocation">Изменить место расположения</string>
<string name="action_forcerecheck">Пересчитать хэш</string> <string name="action_forcerecheck">Пересчитать хэш</string>
@ -167,6 +170,12 @@
<string name="result_trackersupdated">Трекеры обновлены</string> <string name="result_trackersupdated">Трекеры обновлены</string>
<string name="result_labelset">Метка установлена в \'%1$s\'</string> <string name="result_labelset">Метка установлена в \'%1$s\'</string>
<string name="result_labelremoved">Метка удалена</string> <string name="result_labelremoved">Метка удалена</string>
<string name="result_togglesequential">%1$s скачивается %2$s</string>
<string name="result_togglesequential_offstate">последовательно</string>
<string name="result_togglesequential_onstate">обычным образом</string>
<string name="result_togglefirstlastpiece">%1$s имеет %2$s</string>
<string name="result_togglefirstlastpiece_onstate">приоритет первого и последнего куска</string>
<string name="result_togglefirstlastpiece_offstate">обычый приоритет кусков</string>
<string name="result_recheckedstarted">Проверка данных %1$s</string> <string name="result_recheckedstarted">Проверка данных %1$s</string>
<string name="result_locationset">Торрент перемещен в \'%1$s\'</string> <string name="result_locationset">Торрент перемещен в \'%1$s\'</string>
<string name="result_priotitiesset">Приоритеты файлов обновлены</string> <string name="result_priotitiesset">Приоритеты файлов обновлены</string>

9
app/src/main/res/values/strings.xml

@ -56,6 +56,9 @@
<string name="action_remove_default">Remove torrent</string> <string name="action_remove_default">Remove torrent</string>
<string name="action_remove_withdata">Remove and delete data</string> <string name="action_remove_withdata">Remove and delete data</string>
<string name="action_setlabel">Set label</string> <string name="action_setlabel">Set label</string>
<string name="action_download_mode">Download mode</string>
<string name="action_toggle_sequential">Download sequentially</string>
<string name="action_toggle_firstlastpiece">Prioritize first and last piece</string>
<string name="action_updatetrackers">Update trackers</string> <string name="action_updatetrackers">Update trackers</string>
<string name="action_changelocation">Change storage location</string> <string name="action_changelocation">Change storage location</string>
<string name="action_forcerecheck">Force data recheck</string> <string name="action_forcerecheck">Force data recheck</string>
@ -175,6 +178,12 @@
<string name="result_trackersupdated">Trackers updated</string> <string name="result_trackersupdated">Trackers updated</string>
<string name="result_labelset">Label set to \'%1$s\'</string> <string name="result_labelset">Label set to \'%1$s\'</string>
<string name="result_labelremoved">Label removed</string> <string name="result_labelremoved">Label removed</string>
<string name="result_togglesequential">%1$s is downloading %2$s</string>
<string name="result_togglesequential_offstate">normally</string>
<string name="result_togglesequential_onstate">sequentially</string>
<string name="result_togglefirstlastpiece">%1$s has %2$s</string>
<string name="result_togglefirstlastpiece_onstate">first and last piece priority</string>
<string name="result_togglefirstlastpiece_offstate">normal piece priority</string>
<string name="result_recheckedstarted">Checking %1$s data</string> <string name="result_recheckedstarted">Checking %1$s data</string>
<string name="result_locationset">Torrent moved to \'%1$s\'</string> <string name="result_locationset">Torrent moved to \'%1$s\'</string>
<string name="result_priotitiesset">File priorities updated</string> <string name="result_priotitiesset">File priorities updated</string>

Loading…
Cancel
Save