タイニー番組ナビゲータ本体
修订版 | 91e606a70103831c5e3c2775377cce298f04c467 (tree) |
---|---|
时间 | 2017-12-25 13:13:29 |
作者 | Masahiko Kimura <mkimura@u01....> |
Commiter | Masahiko Kimura |
1. 「2017/12/31 22:00」で予約すると「2018/12/31 22:00」となってしまう問題の対応
2. 日付を指定して過去ログを閲覧するとエラーになる問題の対応
@@ -338,9 +338,10 @@ public abstract class AbsPaperView extends JPanel implements VWTimerRiseListener | ||
338 | 338 | String adate = CommonUtils.getDate(c); |
339 | 339 | String atime = CommonUtils.getTime(c); |
340 | 340 | String adate529 = CommonUtils.getDate529(c,true); |
341 | + boolean hasTime = startdt.length() > 10; | |
341 | 342 | |
342 | 343 | // 指定日付に移動して放送局の位置を確認する |
343 | - TVProgramIterator pli = redrawByDateWithCenter(center,adate529); | |
344 | + TVProgramIterator pli = redrawByDateWithCenter(center, hasTime ? adate529 : adate); | |
344 | 345 | if ( pli == null ) { |
345 | 346 | // どちらにもない |
346 | 347 | MWin.appendError(ERRID+"ジャンプ先の日付がみつかりません: "+adate529); |
@@ -354,20 +355,22 @@ public abstract class AbsPaperView extends JPanel implements VWTimerRiseListener | ||
354 | 355 | } |
355 | 356 | |
356 | 357 | // 横の列 |
357 | - int crindex = pli.getIndex(center); | |
358 | - if ( crindex == -1 ) { | |
359 | - MWin.appendError(ERRID+"「"+center+"」は有効な放送局ではありません"); | |
360 | - ringBeep(); | |
361 | - return false; | |
362 | - } | |
363 | - | |
364 | 358 | int x = 0; |
365 | - if ( env.isPagerEnabled() ) { | |
366 | - int idx = env.getPageIndex(1+crindex); | |
367 | - x = (crindex - idx*env.getCenterPerPage()) * bounds.getBangumiColumnWidth(); | |
368 | - } | |
369 | - else { | |
370 | - x = crindex * bounds.getBangumiColumnWidth(); | |
359 | + if (center != null){ | |
360 | + int crindex = pli.getIndex(center); | |
361 | + if ( crindex == -1 ) { | |
362 | + MWin.appendError(ERRID+"「"+center+"」は有効な放送局ではありません"); | |
363 | + ringBeep(); | |
364 | + return false; | |
365 | + } | |
366 | + | |
367 | + if ( env.isPagerEnabled() ) { | |
368 | + int idx = env.getPageIndex(1+crindex); | |
369 | + x = (crindex - idx*env.getCenterPerPage()) * bounds.getBangumiColumnWidth(); | |
370 | + } | |
371 | + else { | |
372 | + x = crindex * bounds.getBangumiColumnWidth(); | |
373 | + } | |
371 | 374 | } |
372 | 375 | |
373 | 376 | // 縦の列 |
@@ -379,7 +382,7 @@ public abstract class AbsPaperView extends JPanel implements VWTimerRiseListener | ||
379 | 382 | h = Integer.valueOf(ma.group(1)); |
380 | 383 | m = Integer.valueOf(ma.group(2)); |
381 | 384 | } |
382 | - if (adate529.equals(adate)) { | |
385 | + if (!hasTime || adate529.equals(adate)) { | |
383 | 386 | if (h < TIMEBAR_START) { |
384 | 387 | h = TIMEBAR_START; |
385 | 388 | m = 0; |
@@ -1025,7 +1025,7 @@ public class PlugIn_RecDBR_T2007 extends HDDRecorderUtils implements HDDRecorder | ||
1025 | 1025 | Date bdate = new Date(nbsecs*1000L); // 開始日時(Date) |
1026 | 1026 | Date edate = new Date(nesecs*1000L); // 終了日時(Date) |
1027 | 1027 | |
1028 | - SimpleDateFormat sfd = new SimpleDateFormat("YYYY/MM/dd(E)"); | |
1028 | + SimpleDateFormat sfd = new SimpleDateFormat("yyyy/MM/dd(E)"); | |
1029 | 1029 | String pattern = sfd.format(bdate); |
1030 | 1030 | |
1031 | 1031 | // 繰り返しパターン |
@@ -1782,7 +1782,7 @@ public class PlugIn_RecDBR_T2007 extends HDDRecorderUtils implements HDDRecorder | ||
1782 | 1782 | Date bdate = new Date(nbsecs*1000L); // 開始日時(Date) |
1783 | 1783 | Date edate = new Date(nesecs*1000L); // 終了日時(Date) |
1784 | 1784 | |
1785 | - SimpleDateFormat sfd = new SimpleDateFormat("YYYY/MM/dd(E)"); | |
1785 | + SimpleDateFormat sfd = new SimpleDateFormat("yyyy/MM/dd(E)"); | |
1786 | 1786 | String pattern = sfd.format(bdate); |
1787 | 1787 | |
1788 | 1788 | // 開始、終了時刻 |