Skip to content

Commit 69c492d

Browse files
committed
-버전업데이트
-옥수수 프로그램 정보 가져오는 중에 크래쉬 수정 -비디오 정보 가져오기, 로그인시에 예외 처리 강화
1 parent 4580216 commit 69c492d

File tree

7 files changed

+21
-16
lines changed

7 files changed

+21
-16
lines changed

Source/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
applicationId "com.ksi.alltv"
77
minSdkVersion 23
88
targetSdkVersion 26
9-
versionCode 6
10-
versionName "1.6"
9+
versionCode 7
10+
versionName "1.7"
1111
}
1212
buildTypes {
1313
release {

Source/app/src/main/java/com/ksi/alltv/FetchChannelService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected void onHandleIntent(Intent intent) {
9090
int retCode;
9191
String authKey = mSiteProcessor.getAuthKey();
9292

93-
if(authKey == null || authKey.length() == 0) {
93+
if (authKey == null || authKey.length() == 0 || channels.size() == 0 || category.size() == 0) {
9494
retCode = Utils.Code.ServiceIntent_Fail.ordinal();
9595
} else {
9696
retCode = Utils.Code.ServiceIntent_OK.ordinal();

Source/app/src/main/java/com/ksi/alltv/OksusuRowSupportFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ protected Integer doInBackground(Integer... channelIndex) {
208208
playVideo(chList.get(arrIndex), progInfo);
209209

210210
return Utils.Code.FetchVideoUrlTask_OK.ordinal();
211-
} catch (java.lang.ArithmeticException ex) {
211+
} catch (Exception ex) {
212212
return Utils.Code.NoVideoUrl_err.ordinal();
213213
} finally {
214214

Source/app/src/main/java/com/ksi/alltv/OksusuSiteProcessor.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,19 @@ private void getLiveTvList() {
9898

9999
ChannelData chData = new ChannelData();
100100

101-
String channelName = Utils.removeQuote(channelObj.get(getAppDataString(R.string.CHANNELNAME_TAG)).getAsString());
102-
103-
chData.setTitle(channelName);
101+
if (!channelObj.get(getAppDataString(R.string.CHANNELNAME_TAG)).isJsonNull()) {
102+
String channelName = Utils.removeQuote(channelObj.get(getAppDataString(R.string.CHANNELNAME_TAG)).getAsString());
103+
chData.setTitle(channelName);
104+
}
104105

105-
JsonArray programs = channelObj.getAsJsonArray(getAppDataString(R.string.PROGRAMS_TAG));
106-
String programName = Utils.removeQuote(programs.get(0).getAsJsonObject().get(getAppDataString(R.string.PROGRAMNAME_TAG)).getAsString());
106+
if (!channelObj.getAsJsonArray(getAppDataString(R.string.PROGRAMS_TAG)).isJsonNull()) {
107+
JsonArray programs = channelObj.getAsJsonArray(getAppDataString(R.string.PROGRAMS_TAG));
107108

108-
chData.setProgram(programName);
109+
if (programs.size() > 0 && !programs.get(0).getAsJsonObject().get(getAppDataString(R.string.PROGRAMNAME_TAG)).isJsonNull()) {
110+
String programName = Utils.removeQuote(programs.get(0).getAsJsonObject().get(getAppDataString(R.string.PROGRAMNAME_TAG)).getAsString());
111+
chData.setProgram(programName);
112+
}
113+
}
109114

110115
String stillImageUrl = Utils.removeQuote(channelObj.get(getAppDataString(R.string.STILLIMAGE_TAG)).getAsString());
111116

@@ -134,7 +139,7 @@ private void getLiveTvList() {
134139

135140
mCategoryDatas.add(ctData);
136141
}
137-
} catch (java.lang.ArithmeticException ex) {
142+
} catch (Exception ex) {
138143
mChannelDatas.clear();
139144
mCategoryDatas.clear();
140145
} finally {
@@ -170,7 +175,7 @@ private void doLogin(SettingsData inSettingsData) {
170175
mAuthKey = receivedCookies.substring(receivedCookies
171176
.lastIndexOf(getAppDataString(R.string.CORNAC_STR)), receivedCookies.lastIndexOf(getAppDataString(R.string.DOMAIN_STR)));
172177
}
173-
} catch (java.lang.ArithmeticException ex) {
178+
} catch (Exception ex) {
174179
mAuthKey = "";
175180
} finally {
176181

Source/app/src/main/java/com/ksi/alltv/PooqRowSupportFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ protected Integer doInBackground(Integer... channelIndex) {
233233
playVideo(chList.get(arrIndex), progInfo);
234234

235235
return Utils.Code.FetchVideoUrlTask_OK.ordinal();
236-
} catch (java.lang.ArithmeticException ex) {
236+
} catch (Exception ex) {
237237
return Utils.Code.NoVideoUrl_err.ordinal();
238238
} finally {
239239

Source/app/src/main/java/com/ksi/alltv/PooqSiteProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private void getLiveTvList() {
123123
mChannelDatas.add(chData);
124124
}
125125
}
126-
} catch (java.lang.ArithmeticException ex) {
126+
} catch (Exception ex) {
127127
mChannelDatas.clear();
128128
mCategoryDatas.clear();
129129
} finally {
@@ -161,7 +161,7 @@ private void doLogin(SettingsData inSettingsData) {
161161
mAuthKey = Utils.removeQuote(parser.parse(resultJson).getAsJsonObject().
162162
get(getAppDataString(R.string.RESULT_STR)).getAsJsonObject().
163163
get(getAppDataString(R.string.POOQ_CREDENTIAL_STR)).getAsString());
164-
} catch (java.lang.ArithmeticException ex) {
164+
} catch (Exception ex) {
165165
mAuthKey = "";
166166
} finally {
167167

Source/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"PatchedVersion": "1.6"
2+
"PatchedVersion" : "1.7"
33
}

0 commit comments

Comments
 (0)