Fixing squid:S00117- Local variable and method parameter names should comply with a naming convention.
This commit is contained in:
parent
35e11e43de
commit
cade4f932d
|
@ -102,15 +102,15 @@ class VideoInfoItemViewCreator {
|
||||||
public TextView itemVideoTitleView, itemUploaderView, itemDurationView, itemUploadDateView, itemViewCountView;
|
public TextView itemVideoTitleView, itemUploaderView, itemDurationView, itemUploadDateView, itemViewCountView;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String shortViewCount(Long view_count){
|
private String shortViewCount(Long viewCount){
|
||||||
if(view_count >= 1000000000){
|
if(viewCount >= 1000000000){
|
||||||
return Long.toString(view_count/1000000000)+"B views";
|
return Long.toString(viewCount/1000000000)+"B views";
|
||||||
}else if(view_count>=1000000){
|
}else if(viewCount>=1000000){
|
||||||
return Long.toString(view_count/1000000)+"M views";
|
return Long.toString(viewCount/1000000)+"M views";
|
||||||
}else if(view_count>=1000){
|
}else if(viewCount>=1000){
|
||||||
return Long.toString(view_count/1000)+"K views";
|
return Long.toString(viewCount/1000)+"K views";
|
||||||
}else {
|
}else {
|
||||||
return Long.toString(view_count)+" views";
|
return Long.toString(viewCount)+" views";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -247,9 +247,9 @@ public class VideoItemDetailFragment extends Fragment {
|
||||||
public void run() {
|
public void run() {
|
||||||
Activity a = getActivity();
|
Activity a = getActivity();
|
||||||
if(a != null) {
|
if(a != null) {
|
||||||
boolean show_age_restricted_content = PreferenceManager.getDefaultSharedPreferences(a)
|
boolean showAgeRestrictedContent = PreferenceManager.getDefaultSharedPreferences(a)
|
||||||
.getBoolean(activity.getString(R.string.show_age_restricted_content), false);
|
.getBoolean(activity.getString(R.string.show_age_restricted_content), false);
|
||||||
if (streamInfo.age_limit == 0 || show_age_restricted_content) {
|
if (streamInfo.age_limit == 0 || showAgeRestrictedContent) {
|
||||||
updateInfo(streamInfo);
|
updateInfo(streamInfo);
|
||||||
} else {
|
} else {
|
||||||
onNotSpecifiedContentErrorWithMessage(R.string.video_is_age_restricted);
|
onNotSpecifiedContentErrorWithMessage(R.string.video_is_age_restricted);
|
||||||
|
|
|
@ -272,14 +272,14 @@ public class VideoItemListActivity extends AppCompatActivity
|
||||||
getSupportFragmentManager()
|
getSupportFragmentManager()
|
||||||
.findFragmentById(R.id.videoitem_list))
|
.findFragmentById(R.id.videoitem_list))
|
||||||
.getListAdapter();
|
.getListAdapter();
|
||||||
String webpage_url = listAdapter.getVideoList().get((int) Long.parseLong(id)).webpage_url;
|
String webpageUrl = listAdapter.getVideoList().get((int) Long.parseLong(id)).webpage_url;
|
||||||
if (mTwoPane) {
|
if (mTwoPane) {
|
||||||
// In two-pane mode, show the detail view in this activity by
|
// In two-pane mode, show the detail view in this activity by
|
||||||
// adding or replacing the detail fragment using a
|
// adding or replacing the detail fragment using a
|
||||||
// fragment transaction.
|
// fragment transaction.
|
||||||
Bundle arguments = new Bundle();
|
Bundle arguments = new Bundle();
|
||||||
//arguments.putString(VideoItemDetailFragment.ARG_ITEM_ID, id);
|
//arguments.putString(VideoItemDetailFragment.ARG_ITEM_ID, id);
|
||||||
arguments.putString(VideoItemDetailFragment.VIDEO_URL, webpage_url);
|
arguments.putString(VideoItemDetailFragment.VIDEO_URL, webpageUrl);
|
||||||
arguments.putInt(VideoItemDetailFragment.STREAMING_SERVICE, currentStreamingServiceId);
|
arguments.putInt(VideoItemDetailFragment.STREAMING_SERVICE, currentStreamingServiceId);
|
||||||
videoFragment = new VideoItemDetailFragment();
|
videoFragment = new VideoItemDetailFragment();
|
||||||
videoFragment.setArguments(arguments);
|
videoFragment.setArguments(arguments);
|
||||||
|
@ -298,7 +298,7 @@ public class VideoItemListActivity extends AppCompatActivity
|
||||||
// for the selected item ID.
|
// for the selected item ID.
|
||||||
Intent detailIntent = new Intent(this, VideoItemDetailActivity.class);
|
Intent detailIntent = new Intent(this, VideoItemDetailActivity.class);
|
||||||
//detailIntent.putExtra(VideoItemDetailFragment.ARG_ITEM_ID, id);
|
//detailIntent.putExtra(VideoItemDetailFragment.ARG_ITEM_ID, id);
|
||||||
detailIntent.putExtra(VideoItemDetailFragment.VIDEO_URL, webpage_url);
|
detailIntent.putExtra(VideoItemDetailFragment.VIDEO_URL, webpageUrl);
|
||||||
detailIntent.putExtra(VideoItemDetailFragment.STREAMING_SERVICE, currentStreamingServiceId);
|
detailIntent.putExtra(VideoItemDetailFragment.STREAMING_SERVICE, currentStreamingServiceId);
|
||||||
startActivity(detailIntent);
|
startActivity(detailIntent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,11 +54,11 @@ public class Parser {
|
||||||
public static Map<String, String> compatParseMap(final String input) throws UnsupportedEncodingException {
|
public static Map<String, String> compatParseMap(final String input) throws UnsupportedEncodingException {
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
for(String arg : input.split("&")) {
|
for(String arg : input.split("&")) {
|
||||||
String[] split_arg = arg.split("=");
|
String[] splitArg = arg.split("=");
|
||||||
if(split_arg.length > 1) {
|
if(splitArg.length > 1) {
|
||||||
map.put(split_arg[0], URLDecoder.decode(split_arg[1], "UTF-8"));
|
map.put(splitArg[0], URLDecoder.decode(splitArg[1], "UTF-8"));
|
||||||
} else {
|
} else {
|
||||||
map.put(split_arg[0], "");
|
map.put(splitArg[0], "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
|
|
@ -435,14 +435,14 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||||
public List<AudioStream> getAudioStreams() throws ParsingException {
|
public List<AudioStream> getAudioStreams() throws ParsingException {
|
||||||
Vector<AudioStream> audioStreams = new Vector<>();
|
Vector<AudioStream> audioStreams = new Vector<>();
|
||||||
try{
|
try{
|
||||||
String encoded_url_map;
|
String encodedUrlMap;
|
||||||
// playerArgs could be null if the video is age restricted
|
// playerArgs could be null if the video is age restricted
|
||||||
if (playerArgs == null) {
|
if (playerArgs == null) {
|
||||||
encoded_url_map = videoInfoPage.get("adaptive_fmts");
|
encodedUrlMap = videoInfoPage.get("adaptive_fmts");
|
||||||
} else {
|
} else {
|
||||||
encoded_url_map = playerArgs.getString("adaptive_fmts");
|
encodedUrlMap = playerArgs.getString("adaptive_fmts");
|
||||||
}
|
}
|
||||||
for(String url_data_str : encoded_url_map.split(",")) {
|
for(String url_data_str : encodedUrlMap.split(",")) {
|
||||||
// This loop iterates through multiple streams, therefor tags
|
// This loop iterates through multiple streams, therefor tags
|
||||||
// is related to one and the same stream at a time.
|
// is related to one and the same stream at a time.
|
||||||
Map<String, String> tags = Parser.compatParseMap(
|
Map<String, String> tags = Parser.compatParseMap(
|
||||||
|
@ -478,14 +478,14 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||||
Vector<VideoStream> videoStreams = new Vector<>();
|
Vector<VideoStream> videoStreams = new Vector<>();
|
||||||
|
|
||||||
try{
|
try{
|
||||||
String encoded_url_map;
|
String encodedUrlMap;
|
||||||
// playerArgs could be null if the video is age restricted
|
// playerArgs could be null if the video is age restricted
|
||||||
if (playerArgs == null) {
|
if (playerArgs == null) {
|
||||||
encoded_url_map = videoInfoPage.get("url_encoded_fmt_stream_map");
|
encodedUrlMap = videoInfoPage.get("url_encoded_fmt_stream_map");
|
||||||
} else {
|
} else {
|
||||||
encoded_url_map = playerArgs.getString("url_encoded_fmt_stream_map");
|
encodedUrlMap = playerArgs.getString("url_encoded_fmt_stream_map");
|
||||||
}
|
}
|
||||||
for(String url_data_str : encoded_url_map.split(",")) {
|
for(String url_data_str : encodedUrlMap.split(",")) {
|
||||||
try {
|
try {
|
||||||
// This loop iterates through multiple streams, therefor tags
|
// This loop iterates through multiple streams, therefor tags
|
||||||
// is related to one and the same stream at a time.
|
// is related to one and the same stream at a time.
|
||||||
|
|
Loading…
Reference in New Issue