1.2.0
added some final touches made the download cancellable fixed button visibility issues updated to latest version of youtubedl-android
This commit is contained in:
parent
709a3778a2
commit
4f4a6a4660
13 changed files with 198 additions and 90 deletions
|
|
@ -23,7 +23,7 @@
|
|||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/icons/material/materialicons/keyboard_arrow_right/baseline_keyboard_arrow_right_24.xml" />
|
||||
<entry key="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/icons/material/materialicons/videocam_off/baseline_videocam_off_24.xml" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
<option name="values">
|
||||
<map>
|
||||
<entry key="color" value="00a6ff" />
|
||||
<entry key="outputName" value="ic_baseline_keyboard_arrow_right_24" />
|
||||
<entry key="outputName" value="ic_video_stopped" />
|
||||
<entry key="sourceFile" value="C:\Users\denis\Desktop\eaKdW401.svg" />
|
||||
</map>
|
||||
</option>
|
||||
|
|
|
|||
|
|
@ -52,15 +52,18 @@
|
|||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_more.xml" value="0.109" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_music.xml" value="0.1275" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_music_downloaded.xml" value="0.1275" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_music_stopped.xml" value="0.14" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_no_results.xml" value="0.109" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_refresh.xml" value="0.109" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_search.xml" value="0.1275" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_settings.xml" value="0.109" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_speed.xml" value="0.14" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_subtitles.xml" value="0.109" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_update.xml" value="0.1275" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_update_app.xml" value="0.109" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_video.xml" value="0.1275" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_video_downloaded.xml" value="0.1275" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/drawable/ic_video_stopped.xml" value="0.14" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/layout/activity_custom_command.xml" value="0.15940685820203893" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/layout/activity_main.xml" value="0.18" />
|
||||
<entry key="..\:/Users/denis/Documents/GitHub/ytdlnis/app/src/main/res/layout/activity_settings.xml" value="0.16875" />
|
||||
|
|
|
|||
|
|
@ -57,8 +57,9 @@ dependencies {
|
|||
// implementation project(":library")
|
||||
// implementation project(":ffmpeg")
|
||||
|
||||
implementation 'com.github.yausername.youtubedl-android:library:0.13.3'
|
||||
implementation 'com.github.yausername.youtubedl-android:ffmpeg:0.13.3'
|
||||
implementation "com.github.yausername.youtubedl-android:library:$youtubedlAndroidVer"
|
||||
implementation "com.github.yausername.youtubedl-android:ffmpeg:$youtubedlAndroidVer"
|
||||
implementation "com.github.yausername.youtubedl-android:aria2c:$youtubedlAndroidVer"
|
||||
|
||||
implementation "androidx.appcompat:appcompat:$appCompatVer"
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ import com.google.android.material.appbar.AppBarLayout;
|
|||
import com.google.android.material.appbar.MaterialToolbar;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
|
|
@ -78,6 +79,7 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
private ShimmerFrameLayout shimmerCards;
|
||||
private CoordinatorLayout downloadFabs;
|
||||
private CoordinatorLayout downloadAllFab;
|
||||
private CoordinatorLayout homeFabs;
|
||||
private BottomSheetDialog bottomSheet;
|
||||
|
||||
Context context;
|
||||
|
|
@ -140,8 +142,6 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
shimmerCards = fragmentView.findViewById(R.id.shimmer_results_framelayout);
|
||||
topAppBar = fragmentView.findViewById(R.id.home_toolbar);
|
||||
recyclerView = fragmentView.findViewById(R.id.recycler_view_home);
|
||||
downloadFabs = fragmentView.findViewById(R.id.download_selected_coordinator);
|
||||
downloadAllFab = fragmentView.findViewById(R.id.download_all_coordinator);
|
||||
|
||||
homeRecyclerViewAdapter = new HomeRecyclerViewAdapter(resultObjects, this, activity);
|
||||
recyclerView.setAdapter(homeRecyclerViewAdapter);
|
||||
|
|
@ -156,6 +156,10 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
initCards();
|
||||
}
|
||||
|
||||
homeFabs = fragmentView.findViewById(R.id.home_fabs);
|
||||
downloadFabs = homeFabs.findViewById(R.id.download_selected_coordinator);
|
||||
downloadAllFab = homeFabs.findViewById(R.id.download_all_coordinator);
|
||||
|
||||
FloatingActionButton music_fab = downloadFabs.findViewById(R.id.audio_fab);
|
||||
FloatingActionButton video_fab = downloadFabs.findViewById(R.id.video_fab);
|
||||
music_fab.setTag("SELECT##mp3");
|
||||
|
|
@ -216,12 +220,14 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
MenuItem.OnActionExpandListener onActionExpandListener = new MenuItem.OnActionExpandListener() {
|
||||
@Override
|
||||
public boolean onMenuItemActionExpand(MenuItem menuItem) {
|
||||
homeFabs.setVisibility(View.GONE);
|
||||
recyclerView.setVisibility(View.GONE);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onMenuItemActionCollapse(MenuItem menuItem) {
|
||||
homeFabs.setVisibility(View.VISIBLE);
|
||||
recyclerView.setVisibility(View.VISIBLE);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -236,6 +242,9 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
@Override
|
||||
public boolean onQueryTextSubmit(String query) {
|
||||
topAppBar.getMenu().findItem(R.id.search).collapseActionView();
|
||||
downloadAllFab.setVisibility(View.GONE);
|
||||
downloadFabs.setVisibility(View.GONE);
|
||||
selectedObjects = new ArrayList<>();
|
||||
inputQuery = query.trim();
|
||||
parseQuery();
|
||||
return true;
|
||||
|
|
@ -252,16 +261,27 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
if(itemId == R.id.delete_results){
|
||||
dbManager.clearResults();
|
||||
recyclerView.removeAllViews();
|
||||
selectedObjects = new ArrayList<>();
|
||||
downloadAllFab.setVisibility(View.GONE);
|
||||
initCards();
|
||||
}else if(itemId == R.id.refresh_results){
|
||||
recyclerView.removeAllViews();
|
||||
selectedObjects = new ArrayList<>();
|
||||
downloadFabs.setVisibility(View.GONE);
|
||||
initCards();
|
||||
}else if(itemId == R.id.open_settings){
|
||||
Intent intent = new Intent(context, SettingsActivity.class);
|
||||
startActivity(intent);
|
||||
}else if(itemId == R.id.cancel_download){
|
||||
compositeDisposable.clear();
|
||||
mainActivity.stopDownloadService();
|
||||
topAppBar.getMenu().findItem(itemId).setVisible(false);
|
||||
downloadQueue = new LinkedList<>();
|
||||
downloading = false;
|
||||
|
||||
String id = progressBar.getTag().toString().split("##progress")[0];
|
||||
String type = findVideo(id).getDownloadedType();
|
||||
MaterialButton theClickedButton = recyclerView.findViewWithTag(id + "##"+type);
|
||||
|
||||
if (theClickedButton != null) {
|
||||
if (type.equals("mp3")) {
|
||||
theClickedButton.setIcon(ContextCompat.getDrawable(activity, R.drawable.ic_music_stopped));
|
||||
} else {
|
||||
theClickedButton.setIcon(ContextCompat.getDrawable(activity, R.drawable.ic_video_stopped));
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
|
@ -464,8 +484,17 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
|
||||
SharedPreferences sharedPreferences = context.getSharedPreferences("root_preferences", Activity.MODE_PRIVATE);
|
||||
|
||||
int concurrentFragments = sharedPreferences.getInt("concurrent_fragments", 1);
|
||||
request.addOption("-N", concurrentFragments);
|
||||
|
||||
boolean aria2 = sharedPreferences.getBoolean("aria2", false);
|
||||
if(aria2){
|
||||
request.addOption("--downloader", "libaria2c.so");
|
||||
request.addOption("--external-downloader-args", "aria2c:\"--summary-interval=1\"");
|
||||
}else{
|
||||
int concurrentFragments = sharedPreferences.getInt("concurrent_fragments", 1);
|
||||
request.addOption("-N", concurrentFragments);
|
||||
}
|
||||
|
||||
|
||||
|
||||
String limitRate = sharedPreferences.getString("limit_rate", "");
|
||||
if(!limitRate.equals("")){
|
||||
|
|
@ -529,9 +558,19 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
recyclerView.scrollToPosition(resultObjects.indexOf(findVideo(id)));
|
||||
progressBar.setProgress(0);
|
||||
downloading = true;
|
||||
topAppBar.getMenu().findItem(R.id.cancel_download).setVisible(true);
|
||||
|
||||
Video theVideo = video;
|
||||
MaterialButton theClickedButton = clickedButton;
|
||||
|
||||
if (theClickedButton != null) {
|
||||
if (type.equals("mp3")) {
|
||||
theClickedButton.setIcon(ContextCompat.getDrawable(activity, R.drawable.ic_music));
|
||||
} else {
|
||||
theClickedButton.setIcon(ContextCompat.getDrawable(activity, R.drawable.ic_video));
|
||||
}
|
||||
}
|
||||
|
||||
Disposable disposable = Observable.fromCallable(() -> YoutubeDL.getInstance().execute(request, callback))
|
||||
.subscribeOn(Schedulers.newThread())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
|
@ -551,6 +590,7 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
addToHistory(theVideo, new Date());
|
||||
updateDownloadStatusOnResult(theVideo, type);
|
||||
downloading = false;
|
||||
topAppBar.getMenu().findItem(R.id.cancel_download).setVisible(false);
|
||||
|
||||
|
||||
// MEDIA SCAN
|
||||
|
|
@ -565,6 +605,7 @@ public class HomeFragment extends Fragment implements HomeRecyclerViewAdapter.On
|
|||
progressBar.setProgress(0);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
downloading = false;
|
||||
topAppBar.getMenu().findItem(R.id.cancel_download).setVisible(false);
|
||||
|
||||
// SCAN NEXT IN QUEUE
|
||||
videos.remove();
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
|
|||
|
||||
SeekBarPreference concurrentFragments;
|
||||
EditTextPreference limitRate;
|
||||
SwitchPreferenceCompat aria2;
|
||||
|
||||
SwitchPreferenceCompat removeNonMusic;
|
||||
SwitchPreferenceCompat embedSubtitles;
|
||||
|
|
@ -82,6 +83,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
|
|||
|
||||
concurrentFragments = findPreference("concurrent_fragments");
|
||||
limitRate = findPreference("limit_rate");
|
||||
aria2 = findPreference("aria2");
|
||||
|
||||
removeNonMusic = findPreference("remove_non_music");
|
||||
embedSubtitles = findPreference("embed_subtitles");
|
||||
|
|
@ -107,6 +109,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
|
|||
|
||||
editor.putInt("concurrent_fragments", concurrentFragments.getValue());
|
||||
editor.putString("limit_rate", limitRate.getText());
|
||||
editor.putBoolean("aria2", aria2.isChecked());
|
||||
editor.putBoolean("remove_non_music", removeNonMusic.isChecked());
|
||||
editor.putBoolean("embed_subtitles", embedSubtitles.isChecked());
|
||||
editor.putBoolean("embed_thumbnail", embedThumbnail.isChecked());
|
||||
|
|
@ -157,6 +160,13 @@ public class SettingsFragment extends PreferenceFragmentCompat {
|
|||
return true;
|
||||
});
|
||||
|
||||
aria2.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
boolean enable = (Boolean) newValue;
|
||||
editor.putBoolean("aria2", enable);
|
||||
editor.apply();
|
||||
return true;
|
||||
});
|
||||
|
||||
removeNonMusic.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
boolean remove = (Boolean) newValue;
|
||||
editor.putBoolean("remove_non_music", remove);
|
||||
|
|
|
|||
5
app/src/main/res/drawable/ic_music_stopped.xml
Normal file
5
app/src/main/res/drawable/ic_music_stopped.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="?android:colorAccent" android:pathData="M4.27,3L3,4.27l9,9v0.28c-0.59,-0.34 -1.27,-0.55 -2,-0.55 -2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4v-1.73L19.73,21 21,19.73 4.27,3zM14,7h4V3h-6v5.18l2,2z"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_speed.xml
Normal file
5
app/src/main/res/drawable/ic_speed.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="?android:colorAccent" android:pathData="M20.38,8.57l-1.23,1.85a8,8 0,0 1,-0.22 7.58L5.07,18A8,8 0,0 1,15.58 6.85l1.85,-1.23A10,10 0,0 0,3.35 19a2,2 0,0 0,1.72 1h13.85a2,2 0,0 0,1.74 -1,10 10,0 0,0 -0.27,-10.44zM10.59,15.41a2,2 0,0 0,2.83 0l5.66,-8.49 -8.49,5.66a2,2 0,0 0,0 2.83z"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_video_stopped.xml
Normal file
5
app/src/main/res/drawable/ic_video_stopped.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="?android:colorAccent" android:pathData="M21,6.5l-4,4V7c0,-0.55 -0.45,-1 -1,-1H9.82L21,17.18V6.5zM3.27,2L2,3.27 4.73,6H4c-0.55,0 -1,0.45 -1,1v10c0,0.55 0.45,1 1,1h12c0.21,0 0.39,-0.08 0.54,-0.18L19.73,21 21,19.73 3.27,2z"/>
|
||||
</vector>
|
||||
|
|
@ -73,64 +73,72 @@
|
|||
</com.facebook.shimmer.ShimmerFrameLayout>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/download_all_coordinator"
|
||||
android:id="@+id/home_fabs"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/download_all_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:text="@string/download_all"
|
||||
app:icon="@drawable/ic_down"/>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/download_all_coordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/download_selected_coordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
app:cardCornerRadius="20dp"
|
||||
android:layout_margin="16dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/download_all_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorPrimaryContainer"
|
||||
android:orientation="horizontal">
|
||||
android:layout_margin="16dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:text="@string/download_all"
|
||||
app:icon="@drawable/ic_down"/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/audio_fab"
|
||||
app:elevation="0dp"
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/download_selected_coordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
app:cardCornerRadius="20dp"
|
||||
android:layout_margin="16dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginRight="5dp"
|
||||
app:srcCompat="@drawable/ic_music"/>
|
||||
android:background="?attr/colorPrimaryContainer"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/video_fab"
|
||||
app:elevation="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginLeft="5dp"
|
||||
app:srcCompat="@drawable/ic_video"/>
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/audio_fab"
|
||||
app:elevation="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginRight="5dp"
|
||||
app:srcCompat="@drawable/ic_music"/>
|
||||
|
||||
</LinearLayout>
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/video_fab"
|
||||
app:elevation="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginLeft="5dp"
|
||||
app:srcCompat="@drawable/ic_video"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -10,20 +10,15 @@
|
|||
app:showAsAction="always|collapseActionView"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/refresh_results"
|
||||
android:icon="@drawable/ic_refresh"
|
||||
android:title="@string/refresh_results"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/delete_results"
|
||||
android:title="@string/fshi_rezultatet"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/open_settings"
|
||||
android:title="@string/settings"
|
||||
android:id="@+id/cancel_download"
|
||||
android:title="@string/cancel_download"
|
||||
android:visible="false"
|
||||
app:showAsAction="never" />
|
||||
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -67,4 +67,26 @@
|
|||
<string name="music_path" translatable="false">/storage/emulated/0/Download</string>
|
||||
<string name="video_path" translatable="false">/storage/emulated/0/Download</string>
|
||||
<string name="command_path" translatable="false">/storage/emulated/0/Download</string>
|
||||
<string name="concurrent_fragments_summary">Number of fragments of a dash/hlsnative video that should be downloaded concurrently</string>
|
||||
<string name="concurrent_fragments">Concurrent Fragments</string>
|
||||
<string name="downloading">Downloading</string>
|
||||
<string name="limit_rate">Limit Rate</string>
|
||||
<string name="limit_rate_summary">Maximum download rate in bytes per second, e.g. 50K or 4.2M</string>
|
||||
<string name="aria2_summary">Use Aria2c as a downloader instead of the default one</string>
|
||||
<string name="remove_non_music">Remove non music parts</string>
|
||||
<string name="remove_non_music_summary">Remove SponsorBlock segments that contain non music parts for audio files</string>
|
||||
<string name="processing">Processing</string>
|
||||
<string name="embed_subs">Embed Subtitles on Videos</string>
|
||||
<string name="embed_subs_summary">Embed subtitles in the video (only for mp4,webm and mkv videos)</string>
|
||||
<string name="embed_thumb">Embed Thumbnail</string>
|
||||
<string name="embed_thumb_summary">Embed thumbnail as cover art</string>
|
||||
<string name="add_chapters">Add Chapters on Videos</string>
|
||||
<string name="add_chapters_summary">Mark Youtube / Sponsorblock segments as chapters for the video</string>
|
||||
<string name="save_thumb">Save Thumbnail</string>
|
||||
<string name="save_thumb_summary">Write Video Thumbnail as a file on the Download Directory</string>
|
||||
<string name="audio_format">Audio Format</string>
|
||||
<string name="video_format">Video Format</string>
|
||||
<string name="audio_quality">Audio Quality</string>
|
||||
<string name="audio_quality_summary">0 (Best) 10 (Worst)</string>
|
||||
<string name="cancel_download">Cancel Download</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -22,59 +22,71 @@
|
|||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory app:title="Downloading">
|
||||
<PreferenceCategory app:title="@string/downloading">
|
||||
<SeekBarPreference
|
||||
app:dependency="aria2"
|
||||
android:defaultValue="1"
|
||||
android:icon="@drawable/ic_lines"
|
||||
android:max="10"
|
||||
app:key="concurrent_fragments"
|
||||
app:min="1"
|
||||
app:showSeekBarValue="true"
|
||||
app:summary=" Number of fragments of a dash/hlsnative video that should be downloaded concurrently"
|
||||
app:title="Concurrent Fragments" />
|
||||
android:dependency="aria2"
|
||||
app:summary="@string/concurrent_fragments_summary"
|
||||
app:title="@string/concurrent_fragments" />
|
||||
|
||||
<EditTextPreference
|
||||
android:icon="@drawable/ic_down"
|
||||
app:key="limit_rate"
|
||||
app:summary="Maximum download rate in bytes per second, e.g. 50K or 4.2M"
|
||||
app:title="Limit Rate" />
|
||||
app:summary="@string/limit_rate_summary"
|
||||
app:title="@string/limit_rate" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="false"
|
||||
android:icon="@drawable/ic_speed"
|
||||
android:key="aria2"
|
||||
app:summary="@string/aria2_summary"
|
||||
android:disableDependentsState="true"
|
||||
app:title="Aria2" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
<PreferenceCategory android:title="Processing">
|
||||
<PreferenceCategory android:title="@string/processing">
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:icon="@drawable/ic_music"
|
||||
app:key="remove_non_music"
|
||||
app:summary="Remove SponsorBlock segments that contain non music parts and others"
|
||||
app:title="Remove non music parts" />
|
||||
app:summary="@string/remove_non_music_summary"
|
||||
app:title="@string/remove_non_music" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:icon="@drawable/ic_subtitles"
|
||||
app:key="embed_subtitles"
|
||||
app:summary="Embed subtitles in the video (only for mp4,webm and mkv videos)"
|
||||
app:title="Embed Subtitles on Videos" />
|
||||
app:summary="@string/embed_subs_summary"
|
||||
app:title="@string/embed_subs" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:key="embed_thumbnail"
|
||||
app:summary="Embed thumbnail as cover art"
|
||||
app:title="Embed Thumbnail" />
|
||||
app:summary="@string/embed_thumb_summary"
|
||||
app:title="@string/embed_thumb" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:icon="@drawable/ic_chapters"
|
||||
app:key="add_chapters"
|
||||
app:title="Add Chapters on Videos" />
|
||||
app:summary="@string/add_chapters_summary"
|
||||
app:title="@string/add_chapters" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="false"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:key="write_thumbnail"
|
||||
app:title="Write Thumbnail to disk" />
|
||||
app:summary="@string/save_thumb_summary"
|
||||
app:title="@string/save_thumb" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="mp3"
|
||||
|
|
@ -83,16 +95,16 @@
|
|||
android:icon="@drawable/ic_code"
|
||||
app:key="audio_format"
|
||||
app:summary="mp3"
|
||||
app:title="Audio Format" />
|
||||
app:title="@string/audio_format" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="mp4"
|
||||
android:defaultValue="mkv"
|
||||
android:entries="@array/video_formats"
|
||||
android:entryValues="@array/video_formats"
|
||||
android:icon="@drawable/ic_code"
|
||||
app:key="video_format"
|
||||
app:summary="mp4"
|
||||
app:title="Video Format" />
|
||||
app:summary="mkv"
|
||||
app:title="@string/video_format" />
|
||||
|
||||
|
||||
<SeekBarPreference
|
||||
|
|
@ -102,8 +114,8 @@
|
|||
app:key="audio_quality"
|
||||
app:min="0"
|
||||
app:showSeekBarValue="true"
|
||||
app:summary="0 (Best) 10 (Worst)"
|
||||
app:title="Audio Quality" />
|
||||
app:summary="@string/audio_quality_summary"
|
||||
app:title="@string/audio_quality" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ ext {
|
|||
commonsIoVer = '2.5'
|
||||
// supports java 1.6
|
||||
commonsCompressVer = '1.12'
|
||||
youtubedlAndroidVer = "0.14.+"
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue