Skip to content

Commit

Permalink
Updated app
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhPatange committed Feb 11, 2020
1 parent 12c5cac commit 7291fcc
Show file tree
Hide file tree
Showing 37 changed files with 656 additions and 418 deletions.
Binary file modified .gradle/4.6/fileContent/fileContent.lock
Binary file not shown.
4 changes: 2 additions & 2 deletions .gradle/4.6/fileHashes/fileHashes.bin
Git LFS file not shown
Binary file modified .gradle/4.6/fileHashes/fileHashes.lock
Binary file not shown.
4 changes: 2 additions & 2 deletions .gradle/4.6/javaCompile/classAnalysis.bin
Git LFS file not shown
Binary file modified .gradle/4.6/javaCompile/javaCompile.lock
Binary file not shown.
2 changes: 1 addition & 1 deletion .gradle/4.6/javaCompile/taskHistory.bin
Git LFS file not shown
4 changes: 2 additions & 2 deletions .gradle/4.6/taskHistory/taskHistory.bin
Git LFS file not shown
Binary file modified .gradle/4.6/taskHistory/taskHistory.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
4 changes: 2 additions & 2 deletions .gradle/buildOutputCleanup/outputFiles.bin
Git LFS file not shown
4 changes: 2 additions & 2 deletions .idea/assetWizardSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

629 changes: 310 additions & 319 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.kpstv.youtube"
minSdkVersion 21
targetSdkVersion 28
versionCode 12
versionName "1.8"
versionCode 13
versionName "1.9"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand Down
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":12,"versionName":"1.8","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":13,"versionName":"1.9","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
2 changes: 1 addition & 1 deletion app/src/main/java/com/kpstv/youtube/EqualizerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
import com.warkiz.widget.OnSeekChangeListener;
import com.warkiz.widget.SeekParams;

import static com.kpstv.youtube.MainActivity.settingPref;
import static com.kpstv.youtube.services.MusicService.bassBoost;
import static com.kpstv.youtube.services.MusicService.loudnessEnhancer;
import static com.kpstv.youtube.services.MusicService.mEqualizer;
import static com.kpstv.youtube.services.MusicService.presetReverb;
import static com.kpstv.youtube.services.MusicService.settingPref;
import static com.kpstv.youtube.services.MusicService.virtualizer;

public class EqualizerActivity extends AppCompatActivity {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/kpstv/youtube/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public class MainActivity extends AppCompatActivity implements AppInterface, Sle
public static Fragment PlaylistFrag, libraryFrag, FavouriteFrag,localMusicFrag, localSearchFrag,popularFrag;
Fragment NCFrag; String ytLink;
public static List<String> playListItems;
static SharedPreferences preferences,settingPref;
static SharedPreferences preferences;
public static LinearLayout bottom_player, adViewLayout;
public static ImageButton actionUp;
public static ImageButton actionPlay;
Expand Down
37 changes: 31 additions & 6 deletions app/src/main/java/com/kpstv/youtube/PlayerActivity2.java
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,22 @@ public void onStopTrackingTouch(IndicatorSeekBar seekBar) {
});

repeatButton.setOnClickListener(v1->{
MusicService.isLoop = !MusicService.isLoop;
makeRepeat(MusicService.isLoop);
switch (MusicService.repeatMode) {
case 0:
MusicService.repeatMode=1;
Toast.makeText(activity, "Playlist will be repeated!", Toast.LENGTH_SHORT).show();
break;
case 1:
MusicService.repeatMode = 2;
Toast.makeText(activity, "Current song will be repeated!", Toast.LENGTH_SHORT).show();
break;
case 2:
MusicService.repeatMode = 0;
break;
}
// MusicService.isLoop = !MusicService.isLoop;
// makeRepeat(MusicService.isLoop);
makeRepeat(MusicService.repeatMode);
});

navigationDown.setOnClickListener(view -> {
Expand Down Expand Up @@ -619,7 +633,7 @@ static void player_common() {
}
backImage.setTag(colorTo);

makeRepeat(MusicService.isLoop);
makeRepeat(MusicService.repeatMode);

setLyricData(MusicService.lyricText);

Expand Down Expand Up @@ -933,11 +947,22 @@ public static void makePause() {
playFab.setImageDrawable(activity.getResources().getDrawable(R.drawable.pause));
}

public static void makeRepeat(boolean value) {
if (value)
public static void makeRepeat(int value) {
switch (value) {
case 0:
repeatButton.setImageDrawable(activity.getResources().getDrawable(R.drawable.ic_repeat));
break;
case 1:
repeatButton.setImageDrawable(activity.getResources().getDrawable(R.drawable.ic_repeat_true));
break;
case 2:
repeatButton.setImageDrawable(activity.getResources().getDrawable(R.drawable.ic_repeat_one));
break;
}
/* if (value)
repeatButton.setImageDrawable(activity.getResources().getDrawable(R.drawable.ic_repeat_true));
else
repeatButton.setImageDrawable(activity.getResources().getDrawable(R.drawable.ic_repeat));
repeatButton.setImageDrawable(activity.getResources().getDrawable(R.drawable.ic_repeat));*/
}

private void getAllViews() {
Expand Down
15 changes: 14 additions & 1 deletion app/src/main/java/com/kpstv/youtube/SilentDownloadActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
Expand Down Expand Up @@ -34,7 +35,7 @@ public class SilentDownloadActivity extends AppCompatActivity {
private RadioButton mRadio1080p;
private RadioButton mRadio720p;
private RadioButton mRadio480p;
private MetaModel meta;
private MetaModel meta; private AlertDialog alertDialog;
private String url; private boolean adComplete=false,interstitialLoad=false;
private LinearLayout mLoadlayout;
private LinearLayout mMainlayout;
Expand Down Expand Up @@ -109,6 +110,18 @@ && getIntent().getType() != null && "text/plain".equals(getIntent().getType()))

@SuppressLint("StaticFieldLeak")
private void commonIntentLaunch() {
if (url.contains("/playlist/")||url.contains("/album/")||url.contains("/playlist?")) {
View v = getLayoutInflater().inflate(R.layout.alert_not_playlist,null);

alertDialog = new AlertDialog.Builder(this)
.setView(v)
.setCancelable(false)
.setPositiveButton("OK",(dialogInterface, i) -> finish())
.create();

alertDialog.show();
return;
}
url = parseLinkfromText(url);
Log.e(TAG, "onCreate: Action: " + getIntent().getAction() + ", Url: " + url);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,7 @@ void LoadMainMethod() {
));
}
}
/*if (!items.isEmpty()) {
String[] urlarray = items.split(",");
urls.addAll(Arrays.asList(urlarray));
}*/

if (urls.size() > 0) {
swipeRefreshLayout.setRefreshing(true);
adapter = new HistoryAdapter(urls, getActivity(), recyclerItemLongListener);
Expand Down
Loading

0 comments on commit 7291fcc

Please sign in to comment.