1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-23 16:40:32 +00:00

Rename download db sqlite file

Rename the sqlite database to "downloads.db" instead of "newpipe.db"
to make sure the file will create a conflicts later.
This commit is contained in:
Coffeemakr 2017-01-20 18:54:15 +01:00
parent ea76f1d6e2
commit 7fb4e5a143
2 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ public class DownloadMissionSQLiteHelper extends SQLiteOpenHelper {
private final String TAG = "DownloadMissionHelper"; private final String TAG = "DownloadMissionHelper";
// TODO: use NewPipeSQLiteHelper ('s constants) when playlist branch is merged (?) // TODO: use NewPipeSQLiteHelper ('s constants) when playlist branch is merged (?)
private static final String DATABASE_NAME = "newpipe.db"; private static final String DATABASE_NAME = "downloads.db";
private static final int DATABASE_VERSION = 2; private static final int DATABASE_VERSION = 2;
/** /**

View File

@ -22,6 +22,7 @@ import android.support.v7.widget.RecyclerView;
import java.io.File; import java.io.File;
import java.util.HashMap; import java.util.HashMap;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import org.schabi.newpipe.R; import org.schabi.newpipe.R;
@ -150,9 +151,8 @@ public class MissionAdapter extends RecyclerView.Adapter<MissionAdapter.ViewHold
h.status.setText(R.string.msg_error); h.status.setText(R.string.msg_error);
} else { } else {
float progress = (float) h.mission.done / h.mission.length; float progress = (float) h.mission.done / h.mission.length;
h.status.setText(String.format("%.2f%%", progress * 100)); h.status.setText(String.format(Locale.US, "%.2f%%", progress * 100));
h.progress.setProgress(progress); h.progress.setProgress(progress);
} }
} }
@ -315,7 +315,7 @@ public class MissionAdapter extends RecyclerView.Adapter<MissionAdapter.ViewHold
static class ViewHolder extends RecyclerView.ViewHolder { static class ViewHolder extends RecyclerView.ViewHolder {
public DownloadMission mission; public DownloadMission mission;
public int position; public int position;
public TextView status; public TextView status;
public ImageView icon; public ImageView icon;
public TextView name; public TextView name;
@ -324,7 +324,7 @@ public class MissionAdapter extends RecyclerView.Adapter<MissionAdapter.ViewHold
public ImageView menu; public ImageView menu;
public ProgressDrawable progress; public ProgressDrawable progress;
public MissionObserver observer; public MissionObserver observer;
public long lastTimeStamp = -1; public long lastTimeStamp = -1;
public long lastDone = -1; public long lastDone = -1;
public int colorId; public int colorId;