Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #24 from KaustubhPatange/master
Browse files Browse the repository at this point in the history
YouTube extraction not working.
  • Loading branch information
nhCoder authored May 30, 2020
2 parents a3db92d + 8991e0d commit 74127fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,18 @@ public class YTMedia
double approxDurationMs;
int audioChannels;
int audioSampleRate;
String cipher;
String signatureCipher;
String audioQuality;
String url;
int fps;
boolean isVideo;


public boolean isVideo() {
return getMimeType().contains("video");
}

public void setFps(int fps) {
this.fps = fps;
}

public int getFps() {
return fps;
}




public void setItag(int itag)
{
Expand Down Expand Up @@ -178,14 +169,14 @@ public int getAudioSampleRate()
return audioSampleRate;
}

public void setCipher(String cipher)
public void setSignatureCipher(String signatureCipher)
{
this.cipher = cipher;
this.signatureCipher = signatureCipher;
}

public String getCipher()
public String getSignatureCipher()
{
return cipher;
return signatureCipher;
}

public void setAudioQuality(String audioQuality)
Expand All @@ -207,11 +198,11 @@ public String getUrl()
{
return url;
}

public boolean useCipher(){
return (cipher!=null && cipher.contains("s="));

return (signatureCipher !=null && signatureCipher.contains("s="));

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.util.Log;

import com.naveed.ytextractor.model.YTMedia;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -34,7 +36,7 @@ public static String extractVideoID(String Url) {

public static boolean isListContain(List<String> arraylist, String statement) {
for (String str : arraylist) {
if (statement.toLowerCase().contains(str)) {
if (statement != null && statement.toLowerCase().contains(str)) {
return true;
}
}
Expand Down

0 comments on commit 74127fe

Please sign in to comment.