• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

mAgicAnime 俺用改造版


Commit MetaInfo

Revisión3280b495498199a3e508689bbb3ebd228ec3bdd6 (tree)
Tiempo2016-10-30 07:52:20
Autoryoshy <yoshy@user...>
Commiteryoshy

Log Message

[UPDATE] 特番回のデータを通常回と分離して保持するように修正
[ADD] 放送プランデータ異常時に警告アイコンを表示する機能を追加
[ADD] 通常回・特番回末尾のデータが未定・異常時に削除する機能を追加
[ADD] 選択した番組のみデータ更新する機能を追加

Cambiar Resumen

Diferencia incremental

--- a/OnLine DataBase/SyoboiCalender.cs
+++ b/OnLine DataBase/SyoboiCalender.cs
@@ -31,8 +31,9 @@ namespace magicAnime
3131 //=========================================================================
3232 class SyoboiCalender
3333 {
34- // mod. yossiepon_20150705
34+ // add yossiepon 20150705 begin
3535 public const int UNNUMBERED_EPISODE = int.MinValue;
36+ // add yossiepon 20150705 end
3637
3738 DateTime? prevUpdateListGetTime = null; // 前回の更新リスト取得時刻
3839
@@ -81,8 +82,9 @@ namespace magicAnime
8182 //=========================================================================
8283 public class SyoboiRecord : ICloneable
8384 {
84- // mod. yossiepon_20150705
85+ // add yossiepon 20150705 begin
8586 public string episode;
87+ // add yossiepon 20150705 end
8688 public int number;
8789 public string subtitle;
8890 public string tvStation;
@@ -95,7 +97,7 @@ namespace magicAnime
9597 return this.MemberwiseClone();
9698 }
9799
98- // mod. yossiepon_20150705 begin
100+ // add yossiepon 20150705 begin
99101 //=========================================================================
100102 /// <summary>
101103 /// フォーマットされた番組エピソード文字列を返す
@@ -108,7 +110,7 @@ namespace magicAnime
108110 {
109111 return tvStation + "-No." + number + "(" + episode + ")「" + subtitle + "」(" + length + " min.)/" + onAirDateTime;
110112 }
111- // mod. yossiepon_20150705 end
113+ // add yossiepon 20150705 end
112114 }
113115
114116 public class SyoboiUpdate
@@ -403,8 +405,10 @@ namespace magicAnime
403405 Match matchTitle = parseTitle.Match(line);
404406
405407 if( matchTitle.Success )
406- // mod. yossiepon_20150705
408+ // mod yossiepon 20150705 begin
409+ // title = matchTitle.Groups["Title"].Value;
407410 title = HttpUtility.HtmlDecode( matchTitle.Groups["Title"].Value );
411+ // mod yossiepon 20150705 end
408412 }
409413
410414 allLine += line;
@@ -447,6 +451,11 @@ namespace magicAnime
447451
448452 source = lines;
449453
454+ // add yossiepon 20160808 begin
455+ // 特番回に負の回数を符番する
456+ NumberSpecialEpisodes(ref recordList);
457+ // add yossiepon 20160808 end
458+
450459 return recordList;
451460 }
452461
@@ -470,7 +479,7 @@ namespace magicAnime
470479 ArrayList Cols;
471480 string temp;
472481
473- // mod. yossiepon_20150705 begin
482+ // mod yossiepon 20150705 begin
474483
475484 List<decimal> dummyNums = new List<decimal>();
476485
@@ -499,13 +508,13 @@ namespace magicAnime
499508 // マッチした場合
500509 if (match.Success)
501510 {
502- // 最初と最後が端数だった場合、それぞれ1話増えるようにfloorとceilingにしておく
503- // ※中間に端数が含まれる場合、放送データからだけでは判別がつかず極めて稀なパターンと思われるので考慮しない
504511 decimal firstEpisode = Decimal.Parse(match.Groups["FirstEpisode"].Value);
505512 decimal lastEpisode = Decimal.Parse(match.Groups["LastEpisode"].Value);
506513
507514 // 連続話数は分割せずにまとめて録画する
508- syoboiRecord.episode = firstEpisode + "〜" + lastEpisode; // 話番号文字列(マッチ結果全体をそのまま入れる)
515+
516+ // 話番号文字列(マッチ結果全体をそのまま入れる)
517+ syoboiRecord.episode = formatEpisodeNo(firstEpisode) + "〜" + formatEpisodeNo(lastEpisode);
509518 syoboiRecord.number = convertDecimalEpisodeNoToInt(firstEpisode); // 話番号(1つ目)
510519
511520 // HTMLエンコード文字をデコード
@@ -519,8 +528,8 @@ namespace magicAnime
519528 }
520529
521530 // 最初の話数から最後の話数までをダミー話数リストに追加する
522- // 最後の話数が端数の場合は、その前までが追加される
523- for(int i = Decimal.ToInt32(Decimal.Ceiling(firstEpisode)); i <= Decimal.ToInt32(Decimal.Floor(lastEpisode)); i++)
531+ // 最初の話数が端数の場合はその次から、最後の話数が端数の場合はその前までが追加される
532+ for (int i = Decimal.ToInt32(Decimal.Ceiling(firstEpisode)); i <= Decimal.ToInt32(Decimal.Floor(lastEpisode)); i++)
524533 {
525534 dummyNums.Add(i);
526535 }
@@ -593,7 +602,7 @@ namespace magicAnime
593602 // 連番の場合、「nn〜mm」にする
594603 if ( isEntireNums )
595604 {
596- episodeStr = firstEpisode + "〜" + lastEpisode;
605+ episodeStr = formatEpisodeNo(firstEpisode) + "〜" + formatEpisodeNo(lastEpisode);
597606 }
598607 }
599608
@@ -608,7 +617,7 @@ namespace magicAnime
608617 {
609618 episodeStrBuf.Append('、');
610619 }
611- episodeStrBuf.Append(dummyNums[i]);
620+ episodeStrBuf.Append(formatEpisodeNo(dummyNums[i]));
612621 }
613622
614623 episodeStr = episodeStrBuf.ToString();
@@ -635,8 +644,17 @@ namespace magicAnime
635644 }
636645 else
637646 {
638- syoboiRecord.number = convertDecimalEpisodeNoToInt( decimal.Parse( (string)Cols[ 3 ] ) ); // 話番号
639- syoboiRecord.episode = syoboiRecord.number.ToString(Settings.Default.storyNoFormat); // 話番号文字列
647+ decimal storyNo = decimal.Parse((string)Cols[3]);
648+ syoboiRecord.number = convertDecimalEpisodeNoToInt(storyNo); // 話番号
649+ if (storyNo != decimal.Zero)
650+ {
651+ syoboiRecord.episode = formatEpisodeNo(syoboiRecord.number); // 話番号文字列
652+ }
653+ else
654+ {
655+ // 0話で話番号が振られているケースの場合
656+ syoboiRecord.episode = formatEpisodeNo(storyNo); // 話番号文字列
657+ }
640658
641659 // HTMLエンコード文字をデコード
642660 syoboiRecord.subtitle = HttpUtility.HtmlDecode( MakeNaked( (string)Cols[ 4 ] ) ); // サブタイトル
@@ -661,7 +679,7 @@ namespace magicAnime
661679 recordList.Add(newRecord);
662680 }
663681
664- // mod. yossiepon_20150705 end
682+ // mod yossiepon 20150705 end
665683 }
666684 catch(Exception)
667685 {
@@ -813,7 +831,7 @@ namespace magicAnime
813831 {
814832 string nakedContext = context;
815833
816- // mod. yossiepon_20150705 begin
834+ // add yossiepon 20150705 begin
817835 {
818836 Regex regex = new Regex("<div class=\"peComment\">(?<Content>(.*?))</div>");
819837 Match match = regex.Match(nakedContext);
@@ -835,7 +853,7 @@ namespace magicAnime
835853 nakedContext = regex.Replace(nakedContext, content);
836854 }
837855 }
838- // mod. yossiepon_20150705 end
856+ // add yossiepon 20150705 end
839857
840858 {
841859 Regex regex = new Regex("<a(.*?)>(?<Content>(.*?))</a>");
@@ -863,8 +881,21 @@ namespace magicAnime
863881 }
864882 }
865883
866- // mod. yossiepon_20150705
867- return nakedContext.Trim();
884+ // mod yossiepon 20160924 begin
885+ // // mod yossiepon 20150705 begin
886+ // // return nakedContext;
887+ // return nakedContext.Trim();
888+ // // mod yossiepon 20150705 end
889+
890+ nakedContext = nakedContext.Trim();
891+ // 特番回に含まれる先頭の「^」があれば除去する
892+ if ((nakedContext.Length > 0) && (nakedContext[0] == '^'))
893+ {
894+ nakedContext = nakedContext.Substring(1);
895+ }
896+
897+ return nakedContext;
898+ // mod yossiepon 20160924 end
868899 }
869900
870901 //=========================================================================
@@ -945,57 +976,38 @@ namespace magicAnime
945976 }
946977
947978
979+ // add yossiepon 20160808 begin
948980 //=========================================================================
949981 /// <summary>
950- /// 未対応話を最終話以降に連結する
982+ /// 特番回に負の話数を符番する
951983 /// </summary>
952984 /// <remarks>
953985 /// </remarks>
954986 /// <history>2006/XX/XX 新規作成</history>
955987 //=========================================================================
956- static public int Unnumbers( string _tvstasion, ref List<SyoboiCalender.SyoboiRecord> _syoboi)
988+ private void NumberSpecialEpisodes(ref List<SyoboiCalender.SyoboiRecord> syoboi)
957989 {
958- // mod. yossiepon_20150705 begin
990+ ArrayList tvStationList = ListupTvStation(syoboi);
959991
960- int maxEpNo = int.MinValue;
961- int curSpEpNo = 1;
992+ foreach (string tvStation in tvStationList) {
962993
963- Dictionary<string, int> specialEpNos = new Dictionary<string, int>();
994+ int curSpEpNo = -1;
964995
965- // 放送分の最大話数を取得
966- for(int i = 0; i < _syoboi.Count; i++)
967- {
968- if (_syoboi[i].tvStation.Equals(_tvstasion))
969- {
970- int epNo = _syoboi[i].number;
971-
972- if(epNo != UNNUMBERED_EPISODE)
973- {
974- maxEpNo = Math.Max(maxEpNo, epNo);
975- }
976- }
977- }
978-
979- // 最大話数が見つからない場合(すべて未付番の場合)
980- if(maxEpNo == int.MinValue)
981- {
982- // 特別編の話数を1から付番する
983- maxEpNo = 0;
984- }
996+ Dictionary<string, int> specialEpNos = new Dictionary<string, int>();
985997
986- // 特別編に話数を振る
987- for(int i = 0; i < _syoboi.Count; i++)
998+ // 特番回に話数を振る
999+ for (int i = 0; i < syoboi.Count; i++)
9881000 {
989- if (_syoboi[i].tvStation.Equals(_tvstasion))
1001+ if (syoboi[i].tvStation.Equals(tvStation))
9901002 {
991- int epNo = _syoboi[i].number;
992- string subtitle = _syoboi[i].subtitle;
1003+ int epNo = syoboi[i].number;
1004+ string subtitle = syoboi[i].subtitle;
9931005
994- // 話数が特別編(UNNUMBERED_EPISODE)なら
1006+ // 話数が特番回(UNNUMBERED_EPISODE)なら
9951007 if (epNo == UNNUMBERED_EPISODE)
9961008 {
9971009 // 特別編の話数がディクショナリに存在したら
998- if ( specialEpNos.ContainsKey(subtitle) )
1010+ if (specialEpNos.ContainsKey(subtitle))
9991011 {
10001012 // 保存済みの話数を使用する
10011013 epNo = specialEpNos[subtitle];
@@ -1003,29 +1015,26 @@ namespace magicAnime
10031015 else
10041016 {
10051017 // 存在しなければ、新しい話数を発番して保存する
1006- epNo = maxEpNo + curSpEpNo ++;
1018+ epNo = curSpEpNo--;
10071019 specialEpNos.Add(subtitle, epNo);
10081020 }
10091021
10101022 // 話数文字列が振られていなければ「SPn」にする
1011- if(_syoboi[i].episode.Length == 0)
1023+ if (syoboi[i].episode.Length == 0)
10121024 {
1013- _syoboi[i].episode = Settings.Default.unnumberedEpisodePrefix + (epNo - maxEpNo);
1025+ syoboi[i].episode = Settings.Default.unnumberedEpisodePrefix + (-epNo);
10141026 }
10151027
1016- // 特別編に話数をつける
1017- _syoboi[i].number = epNo;
1028+ // 特番回に話数をつける
1029+ syoboi[i].number = epNo;
1030+ }
10181031 }
10191032 }
10201033 }
1021-
1022- // 付番した最大話数を返す
1023- return maxEpNo + curSpEpNo - 1;
1024-
1025- // mod. yossiepon_20150705 end
10261034 }
1035+ // add yossiepon 20160808 end
10271036
1028- // mod. yossiepon_20150705 begin
1037+ // add yossiepon 20150705 begin
10291038 //=========================================================================
10301039 /// <summary>
10311040 /// 話番号を整数に変換する
@@ -1049,8 +1058,21 @@ namespace magicAnime
10491058 // 端数でなければ整数なので、そのまま変換して返す
10501059 return Decimal.ToInt32(no);
10511060 }
1052- // mod. yossiepon_20150705 end
1053-
1061+ // add yossiepon 20150705 end
1062+
1063+ // add yossiepon 20160924 begin
1064+ //=========================================================================
1065+ /// <summary>
1066+ /// 話数に書式を適用する
1067+ /// </summary>
1068+ /// <param name="no">話番号(実数)</param>
1069+ /// <returns>書式を適用した話数文字列</returns>
1070+ //=========================================================================
1071+ private String formatEpisodeNo(decimal no)
1072+ {
1073+ return no.ToString(Settings.Default.storyNoFormat);
1074+ }
1075+ // add yossiepon 20160924 end
10541076
10551077 }
10561078
--- a/PathHelper.cs
+++ b/PathHelper.cs
@@ -33,10 +33,10 @@ namespace Helpers
3333 name = name.Replace( ':', ':' );
3434 name = name.Replace( ':', ':' );
3535 name = name.Replace( '\"', '”' );
36-// mod. yossiepon_20151025 begin
36+ // add yossiepon 20151025 begin
3737 name = name.Replace( '|', '|' );
3838 name = name.Replace( '%', '%' );
39-// mod. yossiepon_20151025 end
39+ // add yossiepon 20151025 end
4040
4141 // 無効な文字を削除する
4242 name = name.TrimStart( Path.GetInvalidFileNameChars() );
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
55 // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
66 // アセンブリに関連付けられている情報を変更するには、
77 // これらの属性値を変更してください。
8-[assembly: AssemblyTitle("mAgicAnime Ver.7sh mod. yossiepon_20151025")]
8+[assembly: AssemblyTitle("mAgicAnime Ver.7sh mod. yossiepon_20160924")]
99 [assembly: AssemblyDescription("")]
1010 [assembly: AssemblyConfiguration("")]
1111 [assembly: AssemblyCompany("")]
12-[assembly: AssemblyProduct("mAgicAnime.NET (ななし版, mod. yossiepon_20151025)")]
12+[assembly: AssemblyProduct("mAgicAnime.NET (ななし版, mod. yossiepon_20160924)")]
1313 [assembly: AssemblyCopyright("Copyright (C) 2006-2010 mAgicAnime Project")]
1414 [assembly: AssemblyTrademark("")]
1515 [assembly: AssemblyCulture("")]
@@ -30,4 +30,4 @@ using System.Runtime.InteropServices;
3030 // Revision
3131 //
3232 [assembly: AssemblyVersion("2.0.0.0")]
33-[assembly: AssemblyFileVersion("2.0.14.20151025")]
33+[assembly: AssemblyFileVersion("2.0.14.20160924")]
--- a/RecordingManager/AnimeEpisode.cs
+++ b/RecordingManager/AnimeEpisode.cs
@@ -97,8 +97,9 @@ namespace magicAnime
9797 public string mSubTitle = ""; // サブタイトル
9898 private bool mIsDirty = false; // データ変更フラグ
9999 private int mStoryNumber = 0; // エピソード番号
100- // mod. yossiepon_20150705
100+ // add yossiepon 20150705 begin
101101 private string mStoryNoStr = ""; // エピソード番号文字列
102+ // add yossiepon 20150705 end
102103 private int mRepeatNumber = -1; // n回目の放送
103104 private bool mPlanError = false; // 放送プランデータ異常
104105
@@ -451,8 +452,9 @@ namespace magicAnime
451452 }
452453
453454 public int StoryNumber { get { return mStoryNumber; } }
454- // mod. yossiepon_20150705
455+ // add yossiepon 20150705 begin
455456 public string StoryNoStr { get { return mStoryNoStr; } }
457+ // add yossiepon 20150705 end
456458
457459 //=========================================================================
458460 /// <summary>
@@ -644,15 +646,19 @@ namespace magicAnime
644646 if( !mHasPlan
645647 || (mStartTime != syoboiRecord.onAirDateTime)
646648 || (mLength != syoboiRecord.length)
647- // mod. yossiepon_20150705
649+ // add yossiepon 20150705 begin
648650 || !mStoryNoStr.Equals(syoboiRecord.episode) )
651+ // add yossiepon 20150705 end
649652 {
650- // mod. yossiepon_20150705
653+ // mod yossiepon 20150705 begin
654+ // mHasPlan = true;
651655 mHasPlan = syoboiRecord.length != 0;
656+ // mod yossiepon 20150705 end
652657 mStartTime = syoboiRecord.onAirDateTime;
653658 mLength = syoboiRecord.length;
654- // mod. yossiepon_20150705
659+ // add yossiepon 20150705 begin
655660 mStoryNoStr = syoboiRecord.episode;
661+ // add yossiepon 20150705 begin
656662 Dirty = true;
657663 }
658664
@@ -1262,10 +1268,11 @@ namespace magicAnime
12621268 subTitleName,
12631269 dateStr,
12641270 timeStr,
1265- // mod. yossiepon_20150705 begin
1271+ // mod yossiepon 20150705 begin
1272+ // station);
12661273 station,
12671274 mStoryNoStr.Length > 0 ? mStoryNoStr : mStoryNumber.ToString(Settings.Default.storyNoFormat));
1268- // mod. yossiepon_20150705 end
1275+ // mod yossiepon 20150705 end
12691276 }
12701277 catch(Exception ex)
12711278 {
@@ -1312,10 +1319,11 @@ namespace magicAnime
13121319 mSubTitle,
13131320 dateStr,
13141321 timeStr,
1315- // mod. yossiepon_20150705 begin
1322+ // mod yossiepon 20150705 begin
1323+ // station);
13161324 station,
13171325 mStoryNoStr.Length > 0 ? mStoryNoStr : mStoryNumber.ToString(Settings.Default.storyNoFormat));
1318- // mod. yossiepon_20150705 end
1326+ // mod yossiepon 20150705 end
13191327 }
13201328 catch(Exception ex)
13211329 {
@@ -1505,8 +1513,9 @@ namespace magicAnime
15051513 xw.WriteStartElement("Records");
15061514
15071515 xw.WriteElementString("StoryNumber" , Convert.ToString(mStoryNumber));
1508- // mod. yossiepon_20150705
1516+ // add yossiepon 20150705 begin
15091517 xw.WriteElementString("StoryNoStr" , mStoryNoStr);
1518+ // add yossiepon 20150705 end
15101519 xw.WriteElementString("FilePath" , mFilePath);
15111520 xw.WriteElementString("DateTime" , Convert.ToString(mStartTime.Ticks));
15121521 xw.WriteElementString("SubTitle" , mSubTitle);
@@ -1544,9 +1553,10 @@ namespace magicAnime
15441553 {
15451554 if (xr.LocalName.Equals("StoryNumber"))
15461555 mStoryNumber = xr.ReadElementContentAsInt();
1547- // mod. yossiepon_20150705
1556+ // add yossiepon 20150705 begin
15481557 else if (xr.LocalName.Equals("StoryNoStr"))
15491558 mStoryNoStr = xr.ReadElementContentAsString();
1559+ // add yossiepon 20150705 end
15501560 else if (xr.LocalName.Equals("FilePath"))
15511561 mFilePath = xr.ReadElementContentAsString();
15521562 // Ver1.9.18以前からの以降
@@ -1589,12 +1599,12 @@ namespace magicAnime
15891599 break;
15901600 }
15911601
1592- // mod. yossiepon_20150705 begin
1602+ // add yossiepon 20150705 begin
15931603 if (mStoryNoStr.Length == 0)
15941604 {
15951605 mStoryNoStr = mStoryNumber.ToString(Settings.Default.storyNoFormat);
15961606 }
1597- // mod. yossiepon_20150705 end
1607+ // add yossiepon 20150705 end
15981608 }
15991609
16001610 // Ver1.9.18以前からのデータ移行用
--- a/RecordingManager/AnimeProgram.cs
+++ b/RecordingManager/AnimeProgram.cs
@@ -67,6 +67,9 @@ namespace magicAnime
6767 public string filterKeyword = ""; // フィルタ文字列
6868
6969 private int mStoryCount;
70+ // add yossiepon 20160806 begin
71+ private int mSpecialStoryCount;
72+ // add yossiepon 20160806 end
7073 private uint mHashCode = 0;
7174 private AnimeServer mParent;
7275 private bool mIsDirty = false; // 変更フラグ
@@ -74,7 +77,10 @@ namespace magicAnime
7477 private List<Scheduler.Profile> mSchedulerProfiles;
7578 private Type mEncoderType = null; // エンコーダクラスのType
7679 private EncodeProfile mEncoderProfile = null; // エンコーダ設定
77- private EpisodeList mEpisodes; // この番組の各話(Episode)の集合
80+ private EpisodeList mEpisodes; // この番組の符番された各話(Episode)の集合
81+ // add yossiepon 20160806 begin
82+ private EpisodeList mSpecialEpisodes; // この番組の符番されていない各話(Episode)の集合
83+ // add yossiepon 20160806 end
7884 private Mutex mEpisodeLock = new Mutex();
7985 private DateTime mLastUpdate; // データーベースからの最終更新時刻
8086 private Image mThambnailImage = null;
@@ -136,6 +142,10 @@ namespace magicAnime
136142 mEpisodeLock.WaitOne();
137143 foreach (AnimeEpisode episode in mEpisodes)
138144 childDirty |= episode.Dirty;
145+ // add yossiepon 20160806 begin
146+ foreach (AnimeEpisode episode in mSpecialEpisodes)
147+ childDirty |= episode.Dirty;
148+ // add yossiepon 20160806 end
139149 }
140150 finally
141151 {
@@ -153,6 +163,10 @@ namespace magicAnime
153163 mEpisodeLock.WaitOne();
154164 foreach (AnimeEpisode episode in mEpisodes)
155165 episode.Dirty = false;
166+ // add yossiepon 20160806 begin
167+ foreach (AnimeEpisode episode in mSpecialEpisodes)
168+ episode.Dirty = false;
169+ // add yossiepon 20160806 end
156170 }
157171 finally
158172 {
@@ -216,6 +230,61 @@ namespace magicAnime
216230 }
217231 }
218232
233+ // add yossiepon 20160806 begin
234+ //=========================================================================
235+ /// <summary>
236+ /// 話数の取得と変更
237+ /// </summary>
238+ /// <remarks>
239+ /// </remarks>
240+ /// <history>2006/XX/XX 新規作成</history>
241+ //=========================================================================
242+ public int SpecialStoryCount
243+ {
244+ get { return mSpecialStoryCount; }
245+ set
246+ {
247+ int i;
248+
249+ try
250+ {
251+ mEpisodeLock.WaitOne();
252+
253+ this.mIsDirty = true;
254+
255+ if (mSpecialEpisodes == null)
256+ {
257+ mSpecialEpisodes = new EpisodeList();
258+ }
259+
260+ //-----------------------------------
261+ // Episodeリストを話数にあわせて拡大
262+ //-----------------------------------
263+ if (mSpecialStoryCount < value)
264+ {
265+ for (i = mSpecialStoryCount; i < value; ++i)
266+ {
267+ mSpecialEpisodes.Add(new AnimeEpisode(this, -(i + 1)));
268+ }
269+ }
270+ else
271+ {
272+ for (i = mSpecialStoryCount; value < i; --i)
273+ {
274+ mSpecialEpisodes.RemoveAt(i - 1);
275+ }
276+ }
277+
278+ mSpecialStoryCount = value;
279+ }
280+ finally
281+ {
282+ mEpisodeLock.ReleaseMutex();
283+ }
284+ }
285+ }
286+ // add yossiepon 20160806 end
287+
219288 //=========================================================================
220289 /// <summary>
221290 /// 番組ごとの録画設定
@@ -328,8 +397,45 @@ namespace magicAnime
328397
329398 EpisodeList coppied = new EpisodeList();
330399
331- foreach( AnimeEpisode ep in mEpisodes )
332- coppied.Add( ep );
400+ foreach (AnimeEpisode ep in mEpisodes)
401+ coppied.Add(ep);
402+ // add yossiepon 20160806 begin
403+ foreach (AnimeEpisode ep in mSpecialEpisodes)
404+ coppied.Add(ep);
405+ // add yossiepon 20160806 end
406+
407+ return coppied;
408+ }
409+ finally
410+ {
411+ mEpisodeLock.ReleaseMutex();
412+ }
413+ }
414+ }
415+
416+ // add yossiepon 20160924 begin
417+ //=========================================================================
418+ /// <summary>
419+ /// 通常エピソードのリストを返す
420+ /// </summary>
421+ /// <remarks>
422+ /// リストオブジェクトのコピーを返す。
423+ /// 上位がリストを変更してもこちらのデータに影響しない。
424+ /// </remarks>
425+ /// <history>2006/XX/XX 新規作成</history>
426+ //=========================================================================
427+ public EpisodeList NormalEpisodes
428+ {
429+ get
430+ {
431+ try
432+ {
433+ mEpisodeLock.WaitOne();
434+
435+ EpisodeList coppied = new EpisodeList();
436+
437+ foreach (AnimeEpisode ep in mEpisodes)
438+ coppied.Add(ep);
333439
334440 return coppied;
335441 }
@@ -342,6 +448,39 @@ namespace magicAnime
342448
343449 //=========================================================================
344450 /// <summary>
451+ /// 特番エピソードのリストを返す
452+ /// </summary>
453+ /// <remarks>
454+ /// リストオブジェクトのコピーを返す。
455+ /// 上位がリストを変更してもこちらのデータに影響しない。
456+ /// </remarks>
457+ /// <history>2006/XX/XX 新規作成</history>
458+ //=========================================================================
459+ public EpisodeList SpecialEpisodes
460+ {
461+ get
462+ {
463+ try
464+ {
465+ mEpisodeLock.WaitOne();
466+
467+ EpisodeList coppied = new EpisodeList();
468+
469+ foreach (AnimeEpisode ep in mSpecialEpisodes)
470+ coppied.Add(ep);
471+
472+ return coppied;
473+ }
474+ finally
475+ {
476+ mEpisodeLock.ReleaseMutex();
477+ }
478+ }
479+ }
480+ // add yossiepon 20160924 end
481+
482+ //=========================================================================
483+ /// <summary>
345484 /// 番組固有IDを返す
346485 /// </summary>
347486 /// <remarks>
@@ -492,24 +631,25 @@ namespace magicAnime
492631 }
493632 }
494633
495-
496- //=========================================================================
497- /// <summary>
498- /// 第n話のエピソードを取得する(1〜)
499- /// </summary>
500- /// <remarks>
501- /// </remarks>
502- /// <history>2006/XX/XX 新規作成</history>
503- //=========================================================================
504- public AnimeEpisode this[int storyNumber]
505- {
506- get
507- {
508- if (storyNumber < 1 || mStoryCount < storyNumber)
509- throw new Exception("内部エラー: 話数が範囲外です");
510- return (AnimeEpisode)mEpisodes[storyNumber - 1];
511- }
512- }
634+ // del yossiepon 20160806 begin
635+ ////=========================================================================
636+ ///// <summary>
637+ ///// 第n話のエピソードを取得する(1〜)
638+ ///// </summary>
639+ ///// <remarks>
640+ ///// </remarks>
641+ ///// <history>2006/XX/XX 新規作成</history>
642+ ////=========================================================================
643+ //public AnimeEpisode this[int storyNumber]
644+ //{
645+ // get
646+ // {
647+ // if (storyNumber < 1 || mStoryCount < storyNumber)
648+ // throw new Exception("内部エラー: 話数が範囲外です");
649+ // return (AnimeEpisode)mEpisodes[storyNumber - 1];
650+ // }
651+ //}
652+ // del yossiepon 20160806 end
513653
514654 public delegate void EnumRecordCallBack(AnimeEpisode record, object param);
515655
@@ -528,7 +668,10 @@ namespace magicAnime
528668 callBack(episode, param);
529669 }
530670
531- return mEpisodes.Count;
671+ // mod yossiepon 20160806 begin
672+ // return mEpisodes.Count;
673+ return mEpisodes.Count + mSpecialEpisodes.Count;
674+ // mod yossiepon 20160806 end
532675 }
533676
534677
@@ -573,6 +716,7 @@ namespace magicAnime
573716 if( Episodes.Count == 0 )
574717 return NextEpisode.NextUnknown;
575718
719+ // del by 7sh 2.0.14.10 2012-03-30 begin
576720 /* しょぼカルは、すべて登録されていな場合がある
577721 AnimeEpisode lastEpisode = Episodes[Episodes.Count-1];
578722
@@ -583,6 +727,7 @@ namespace magicAnime
583727 return NextEpisode.EndProgram;
584728 }
585729 */
730+ // del by 7sh 2.0.14.10 2012-03-30 end
586731
587732 //
588733 // dateTime以降、リストの中で最も早く放送するEpisodeを見つける
@@ -608,7 +753,10 @@ namespace magicAnime
608753 }
609754
610755 if (earlyOnAir==null)
756+ // mod by 7sh 2.0.14.10 2012-03-30 begin
757+ // return NextEpisode.NextUnknown;
611758 return NextEpisode.EndProgram;
759+ // mod by 7sh 2.0.14.10 2012-03-30 end
612760
613761 return NextEpisode.NextDecided;
614762 }
@@ -663,22 +811,30 @@ namespace magicAnime
663811 // 話数が増えた場合はリスト拡充
664812 //--------------------------------
665813 int maxNumber = 0;
814+ // add yossiepon 20160808 begin
815+ int minNumber = 0;
816+ // add yossiepon 20160808 end
666817
818+ // mod yossiepon 20160808 begin
819+ // foreach (SyoboiCalender.SyoboiRecord record in syoboiList)
820+ // maxNumber = System.Math.Max(maxNumber, record.number);
667821 foreach (SyoboiCalender.SyoboiRecord record in syoboiList)
668- maxNumber = System.Math.Max(maxNumber, record.number);
822+ {
823+ if (syoboiTvStation == record.tvStation)
824+ {
825+ maxNumber = System.Math.Max(maxNumber, record.number);
826+ minNumber = System.Math.Min(minNumber, record.number);
827+ }
828+ }
829+ // mod yossiepon 20160808 end
669830
670831 if (StoryCount < maxNumber)
671832 StoryCount = maxNumber; // 話数が増えた場合だけ増やす
672833
673- //------------------------------------
674- // 話数未設定項目の確認
675- //------------------------------------
676- foreach (AnimeEpisode episode in Episodes)
677- {
678- maxNumber = SyoboiCalender.Unnumbers(episode.Parent.syoboiTvStation, ref syoboiList);
679- }
680- if (StoryCount < maxNumber)
681- StoryCount = maxNumber; // 話数が増えた場合だけ増やす
834+ // add yossiepon 20160808 begin
835+ if (SpecialStoryCount < -minNumber)
836+ SpecialStoryCount = -minNumber; // 特番回が増えた場合だけ増やす
837+ // add yossiepon 20160808 end
682838
683839 //-------------------------------
684840 // エピソードごと放送データ更新
@@ -947,6 +1103,9 @@ namespace magicAnime
9471103
9481104 xw.WriteElementString("Title" , title);
9491105 xw.WriteElementString("StoryCount" , Convert.ToString(mStoryCount));
1106+ // add yossiepon 20160808 begin
1107+ xw.WriteElementString("SpecialStoryCount" , Convert.ToString(mSpecialStoryCount));
1108+ // add yossiepon 20160808 end
9501109 xw.WriteElementString("LinkOnlineDatabase" , linkOnlineDatabase ? "1" : "0");
9511110 xw.WriteElementString("SyoboiTID" , Convert.ToString(syoboiTid));
9521111
@@ -1011,6 +1170,9 @@ namespace magicAnime
10111170 mSchedulerProfiles.Clear();
10121171
10131172 mEpisodes = new EpisodeList();
1173+ // add yossiepon 20160808 begin
1174+ mSpecialEpisodes = new EpisodeList();
1175+ // add yossiepon 20160808 end
10141176 mEncoderProfile = null;
10151177 int length = 0;
10161178
@@ -1024,6 +1186,10 @@ namespace magicAnime
10241186 title = xr.ReadString();
10251187 else if (xr.LocalName.Equals("StoryCount"))
10261188 mStoryCount = xr.ReadElementContentAsInt();
1189+ // add yossiepon 20160808 begin
1190+ else if (xr.LocalName.Equals("SpecialStoryCount"))
1191+ mSpecialStoryCount = xr.ReadElementContentAsInt();
1192+ // add yossiepon 20160808 end
10271193 else if (xr.LocalName.Equals("Length"))
10281194 length = xr.ReadElementContentAsInt();
10291195 else if (xr.LocalName.Equals("LinkOnlineDatabase"))
@@ -1066,8 +1232,18 @@ namespace magicAnime
10661232
10671233 episode.Read(xr);
10681234
1069- mEpisodes.Add(episode);
1070- }
1235+ // mod yossiepon 20160808 begin
1236+ // mEpisodes.Add(episode);
1237+ if(episode.StoryNumber > 0)
1238+ {
1239+ mEpisodes.Add(episode);
1240+ }
1241+ else
1242+ {
1243+ mSpecialEpisodes.Add(episode);
1244+ }
1245+ // mod yossiepon 20160808 begin
1246+ }
10711247 else if (xr.LocalName.Equals("EncodeClass"))
10721248 {
10731249 Encoder encoder;
--- a/RecordingManager/AnimeSort.cs
+++ b/RecordingManager/AnimeSort.cs
@@ -76,12 +76,20 @@ namespace magicAnime
7676 //--------------------------
7777 // 話数が0の場合は前に回す
7878 //--------------------------
79- if( (x.StoryCount == 0) && (y.StoryCount == 0) )
79+ // mod yossiepon 20160808 begin
80+ //if ((x.StoryCount == 0) && (y.StoryCount == 0))
81+ // return 0;
82+ //if ((x.StoryCount != 0) && (y.StoryCount == 0))
83+ // return +1;
84+ //if ((x.StoryCount == 0) && (y.StoryCount != 0))
85+ // return -1;
86+ if ( ((x.StoryCount + x.SpecialStoryCount) == 0) && ((y.StoryCount + y.SpecialStoryCount) == 0) )
8087 return 0;
81- if( (x.StoryCount != 0) && (y.StoryCount == 0) )
88+ if ( ((x.StoryCount + x.SpecialStoryCount) != 0) && ((y.StoryCount + y.SpecialStoryCount) == 0) )
8289 return +1;
83- if( (x.StoryCount == 0) && (y.StoryCount != 0) )
90+ if ( ((x.StoryCount + x.SpecialStoryCount) == 0) && ((y.StoryCount + y.SpecialStoryCount) != 0) )
8491 return -1;
92+ // mod yossiepon 20160808 end
8593
8694 //--------------------------
8795 // 放送終了分を末尾に回す
@@ -125,15 +133,25 @@ namespace magicAnime
125133 //------------------------------------
126134
127135 aCount = 0;
128- foreach( AnimeEpisode aRecord in x.Episodes )
136+ // mod yossiepon 20160924 begin
137+ // foreach( AnimeEpisode aRecord in x.Episodes )
138+ foreach( AnimeEpisode aRecord in x.NormalEpisodes )
139+ // mod yossiepon 20160924 end
129140 {
130141 if( (orderOption & OrderOption.Limit1CoursOption) != 0 ) // 最新1クールに限るオプション(070612)
131142 {
132- if( aRecord.StoryNumber < x.StoryCount - 13 )
133- continue;
134- }
135-// <MOD> 2009/12/28 ->
136- if( aRecord.HasPlan )
143+ // mod yossiepon 20160808 begin
144+ //if (aRecord.StoryNumber < x.StoryCount - 13)
145+ // continue;
146+ if (x.StoryCount >= 13)
147+ {
148+ if (aRecord.StoryNumber < x.StoryCount - 13)
149+ continue;
150+ }
151+ // mod yossiepon 20160808 end
152+ }
153+ // <MOD> 2009/12/28 ->
154+ if( aRecord.HasPlan )
137155 // if( aRecord.CurrentState != AnimeEpisode.State.Undecided )
138156 // <MOD> 2009/12/28 <-
139157 {
@@ -147,13 +165,23 @@ namespace magicAnime
147165 }
148166
149167 bCount = 0;
150- foreach( AnimeEpisode bRecord in y.Episodes )
168+ // mod yossiepon 20160924 begin
169+ // foreach( AnimeEpisode bRecord in y.Episodes )
170+ foreach( AnimeEpisode bRecord in y.NormalEpisodes )
171+ // mod yossiepon 20160924 end
151172 {
152173 if( (orderOption & OrderOption.Limit1CoursOption) != 0 ) // 最新1クールに限るオプション(070612)
153174 {
154- if( bRecord.StoryNumber < y.StoryCount - 13 )
155- continue;
156- }
175+ // mod yossiepon 20160808 begin
176+ //if (bRecord.StoryNumber < y.StoryCount - 13)
177+ // continue;
178+ if (y.StoryCount >= 13)
179+ {
180+ if (bRecord.StoryNumber < y.StoryCount - 13)
181+ continue;
182+ }
183+ // mod yossiepon 20160808 end
184+ }
157185 // <MOD> 2009/12/28 ->
158186 if( bRecord.HasPlan )
159187 // if( bRecord.CurrentState != AnimeEpisode.State.Undecided )
--- a/RecordingManager/ReserveManager.cs
+++ b/RecordingManager/ReserveManager.cs
@@ -302,7 +302,7 @@ namespace magicAnime
302302
303303 if ( sched == null ) return ChangeResult.Dontcare;
304304
305- // mod. yossiepon_20150815 begin
305+ // add yossiepon 20150815 begin
306306
307307 // ファイル名によって録画ファイルを特定?
308308 if ( Settings.Default.specifiedFile == IdentifyFileMethod.ByFileNameWithID )
@@ -313,7 +313,7 @@ namespace magicAnime
313313 title ); // IDを含んだ録画タイトルにする
314314 }
315315
316- // mod. yossiepon_20150815 end
316+ // add yossiepon 20150815 end
317317
318318 Logger.Output("(予約)時間変更操作 " + start.ToString() + "(" + title + ")" );
319319
@@ -358,7 +358,7 @@ namespace magicAnime
358358 //-----------------------
359359 try
360360 {
361- // mod. yossiepon_20150815 begin
361+ // del yossiepon 20150815 begin
362362
363363 //// ファイル名によって録画ファイルを特定?
364364 //if ( Settings.Default.specifiedFile == IdentifyFileMethod.ByFileNameWithID )
@@ -369,7 +369,7 @@ namespace magicAnime
369369 // title ); // IDを含んだ録画タイトルにする
370370 //}
371371
372- // mod. yossiepon_20150815 end
372+ // del yossiepon 20150815 end
373373
374374 sched.MakeReservation(
375375 title ,
--- a/UserInterface/AnimeDialog.cs
+++ b/UserInterface/AnimeDialog.cs
@@ -537,19 +537,13 @@ namespace magicAnime
537537 syoboiTvStationComboBox.Items.Add("(指定なし)");
538538 syoboiTvStationComboBox.SelectedIndex = 0;
539539
540- // 話数を表示
541- int maxNumber = 0;
542-
543540 if( 0 < mZappingTid )
544541 {
545542 syoboiTitleTextBox.Text = title;
546543 titleTextBox.Text = title;
547544
548545 foreach (string tvStation in tvStationList)
549- {
550546 syoboiTvStationComboBox.Items.Add(tvStation);
551- maxNumber = System.Math.Max(maxNumber, SyoboiCalender.Unnumbers(tvStation, ref recordList) );
552- }
553547
554548 if (mSelectTvStation != null)
555549 {
@@ -557,12 +551,18 @@ namespace magicAnime
557551 mSelectTvStation = null;
558552 }
559553
554+ // 話数を表示
555+ int maxNumber = 0;
556+
557+ foreach (SyoboiCalender.SyoboiRecord record in recordList)
558+ maxNumber = System.Math.Max(maxNumber, record.number);
559+
560560 storyCountComboBox.Text = Convert.ToString(maxNumber);
561561
562562 if (mInputTitle != null)
563563 {
564564 titleTextBox.Text = mInputTitle;
565- mInputTitle= null;
565+ mInputTitle = null;
566566 }
567567 }
568568 };
--- a/UserInterface/EpisodeDialog.Designer.cs
+++ b/UserInterface/EpisodeDialog.Designer.cs
@@ -356,6 +356,11 @@
356356 0,
357357 0,
358358 0});
359+ this.StoryNumberUpdown.Minimum = new decimal(new int[] {
360+ 2000,
361+ 0,
362+ 0,
363+ -2147483648});
359364 this.StoryNumberUpdown.Name = "StoryNumberUpdown";
360365 this.StoryNumberUpdown.ReadOnly = true;
361366 this.StoryNumberUpdown.Size = new System.Drawing.Size(49, 22);
--- a/UserInterface/EpisodeDialog.cs
+++ b/UserInterface/EpisodeDialog.cs
@@ -44,8 +44,9 @@ namespace magicAnime
4444 SubtitleTextBox.Text = r.mSubTitle;
4545 FileTextBox.Text = r.FilePath;
4646 StoryNumberUpdown.Value = r.StoryNumber;
47- // mod. yossipon_20150815 begin
47+ // add yossipon 20150815 begin
4848 StoryNoTextBox.Text = r.StoryNoStr;
49+ // add yossipon 20150815 end
4950
5051 hasPlanCheckBox.Checked = r.HasPlan;
5152 if( r.HasPlan )
--- a/UserInterface/MainForm.Designer.cs
+++ b/UserInterface/MainForm.Designer.cs
@@ -98,6 +98,9 @@
9898 this.encodeGroupSeparator = new System.Windows.Forms.ToolStripSeparator();
9999 this.encodeMenu = new System.Windows.Forms.ToolStripMenuItem();
100100 this.storeMenu = new System.Windows.Forms.ToolStripMenuItem();
101+ this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
102+ this.updateProgramPlanMenu = new System.Windows.Forms.ToolStripMenuItem();
103+ this.deleteInvalidEpisode = new System.Windows.Forms.ToolStripMenuItem();
101104 this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
102105 this.renameFileMenu = new System.Windows.Forms.ToolStripMenuItem();
103106 this.unreadMenu = new System.Windows.Forms.ToolStripMenuItem();
@@ -745,12 +748,15 @@
745748 this.encodeGroupSeparator,
746749 this.encodeMenu,
747750 this.storeMenu,
751+ this.toolStripSeparator9,
752+ this.updateProgramPlanMenu,
753+ this.deleteInvalidEpisode,
748754 this.toolStripMenuItem6,
749755 this.renameFileMenu,
750756 this.unreadMenu,
751757 this.RecordPropertyMenu});
752758 this.contextMenuStrip.Name = "contextMenuStrip";
753- this.contextMenuStrip.Size = new System.Drawing.Size(225, 220);
759+ this.contextMenuStrip.Size = new System.Drawing.Size(225, 292);
754760 //
755761 // playMovieMenu
756762 //
@@ -812,6 +818,25 @@
812818 this.storeMenu.Text = "最終保存先へ転送(&M)";
813819 this.storeMenu.Click += new System.EventHandler(this.storeMenu_Click);
814820 //
821+ // toolStripSeparator9
822+ //
823+ this.toolStripSeparator9.Name = "toolStripSeparator9";
824+ this.toolStripSeparator9.Size = new System.Drawing.Size(199, 6);
825+ //
826+ // updateProgramPlanMenu
827+ //
828+ this.updateProgramPlanMenu.Name = "updateProgramPlanMenu";
829+ this.updateProgramPlanMenu.Size = new System.Drawing.Size(202, 22);
830+ this.updateProgramPlanMenu.Text = "この番組のみデータ更新(&P)";
831+ this.updateProgramPlanMenu.Click += new System.EventHandler(this.updateProgramPlanMenu_Click);
832+ //
833+ // deleteInvalidEpisode
834+ //
835+ this.deleteInvalidEpisode.Name = "deleteInvalidEpisode";
836+ this.deleteInvalidEpisode.Size = new System.Drawing.Size(202, 22);
837+ this.deleteInvalidEpisode.Text = "無効な最終回を削除(&D)";
838+ this.deleteInvalidEpisode.Click += new System.EventHandler(this.deleteInvalidEpisode_Click);
839+ //
815840 // toolStripMenuItem6
816841 //
817842 this.toolStripMenuItem6.Name = "toolStripMenuItem6";
@@ -1173,7 +1198,7 @@
11731198 this.MainMenuStrip = this.menuStrip;
11741199 this.Name = "MainForm";
11751200 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
1176- this.Text = "mAgicAnime.NET Ver.7sh mod. yossiepon_20151025";
1201+ this.Text = "mAgicAnime.NET Ver.7sh mod. yossiepon_20160924";
11771202 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
11781203 this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed);
11791204 this.Load += new System.EventHandler(this.MainForm_Load);
@@ -1298,6 +1323,9 @@
12981323 private System.Windows.Forms.PictureBox datePictureBox;
12991324 private System.Windows.Forms.ToolStripMenuItem debugForceEmptyMenu;
13001325 private System.Windows.Forms.ToolStripSeparator toolStripMenuItem10;
1326+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
1327+ private System.Windows.Forms.ToolStripMenuItem updateProgramPlanMenu;
1328+ private System.Windows.Forms.ToolStripMenuItem deleteInvalidEpisode;
13011329 }
13021330 }
13031331
--- a/UserInterface/MainForm.cs
+++ b/UserInterface/MainForm.cs
@@ -320,7 +320,10 @@ namespace magicAnime
320320
321321 foreach( AnimeProgram prog in server.Animes )
322322 {
323- addCols = System.Math.Max( addCols, prog.StoryCount );
323+ // mod yossiepon 20160808 begin
324+ // addCols = System.Math.Max( addCols, prog.StoryCount );
325+ addCols = System.Math.Max( addCols, prog.StoryCount + prog.SpecialStoryCount );
326+ // mod yossiepon 20160808 end
324327 }
325328
326329 addCols = Math.Min(addCols, 500); // グリッドの横幅最大値をオーバーしないため
@@ -734,7 +737,10 @@ namespace magicAnime
734737 (prog.EncoderType != null)?
735738 prog.EncoderProfile.ToString() + "(" + prog.EncoderType.Name + ")"
736739 : "(なし)", // エンコード情報
737- string.Format("{0:D2}",prog.StoryCount), // 全話数
740+ // mod yossiepon 20160808 begin
741+ // string.Format("{0:D2}",prog.StoryCount), // 全話数
742+ string.Format("{0:D2}", prog.StoryCount + prog.SpecialStoryCount), // 全話数
743+ // mod yossiepon 20160808 end
738744 };
739745
740746 for( int i = 0 ;i < newRowData.Length ;++i )
@@ -805,6 +811,9 @@ namespace magicAnime
805811 AnimeEpisode episode = null;
806812 int storyNumber = 0;
807813 Icon icon = null;
814+ // add yossiepon 20160924 begin
815+ Icon icon2 = null;
816+ // add yossiepon 20160924 end
808817 string text;
809818 int cellX, cellY;
810819 bool border = false;
@@ -830,7 +839,10 @@ namespace magicAnime
830839 episode = (AnimeEpisode)dataGrid.Rows[ row ].Cells[ col ].Tag; // セルに対応する話
831840
832841 if ( episode != null )
833- storyNumber = episode.StoryNumber;
842+ // mod yossiepon 20160808 begin
843+ // storyNumber = episode.StoryNumber;
844+ storyNumber = (episode.StoryNumber > 0) ? episode.StoryNumber : -episode.StoryNumber + prog.StoryCount;
845+ // mod yossiepon 20160808 end
834846
835847 // セル左部分が隠れている場合の対策
836848 int cellHeight = dataGrid.Rows[ row ].Height;
@@ -1044,6 +1056,19 @@ namespace magicAnime
10441056 g.DrawIcon( icon, new Rectangle( newRect.X + 24, newRect.Y + 12, 16, 16 ) );
10451057 }
10461058
1059+ // add yossiepon 20160924 begin
1060+ // 放送プランデータ異常のセルに警告アイコンを表示する
1061+ if (episode.PlanError)
1062+ icon2 = mViewIcons.warnIcon;
1063+
1064+ if (icon2 != null)
1065+ {
1066+ if (thumbnailModeButton.Checked)
1067+ g.DrawIcon(icon2, new Rectangle(newRect.X + 18, newRect.Y + 4, 12, 12));
1068+ else
1069+ g.DrawIcon(icon2, new Rectangle(newRect.X + 6, newRect.Y + 12, 16, 16));
1070+ }
1071+ // add yossiepon 20160924 end
10471072 }
10481073
10491074 //----------------------
@@ -1063,8 +1088,11 @@ namespace magicAnime
10631088 ty = newRect.Y;
10641089 }
10651090
1066- // mod. yossiepon_20150705
1067- text = episode.StoryNoStr.Length > 0 ? episode.StoryNoStr : episode.StoryNumber.ToString("0");
1091+ // mod yossiepon 20160808 begin
1092+ // // mod yossiepon 20150705
1093+ // text = episode.StoryNoStr.Length > 0 ? episode.StoryNoStr : episode.StoryNumber.ToString("0");
1094+ text = (episode.StoryNoStr.Length > 0) ? episode.StoryNoStr : storyNumber.ToString("0");
1095+ // mod yossiepon 20160808 end
10681096
10691097 g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; // アンチエイリアス有効
10701098
@@ -1219,6 +1247,9 @@ namespace magicAnime
12191247 AnimeProgram newAnime = new AnimeProgram( AnimeServer.GetInstance() );
12201248
12211249 newAnime.StoryCount = 0;
1250+ // add yossiepon 20160808 begin
1251+ newAnime.SpecialStoryCount = 0;
1252+ // add yossiepon 20160808 end
12221253
12231254 //-------------------------
12241255 // 番組ダイアログを開く
@@ -1540,12 +1571,18 @@ namespace magicAnime
15401571 episode = episodes[0];
15411572 prog = episode.Parent;
15421573
1543- isSelected = (episode != null && 1 <= episode.StoryNumber );
1574+ // mod yossiepon 20160808 begin
1575+ // isSelected = (episode != null && 1 <= episode.StoryNumber);
1576+ isSelected = (episode != null && 0 != episode.StoryNumber);
1577+ // mod yossiepon 20160808 end
15441578 }
15451579
1546- if( isSelected )
1580+ if ( isSelected )
15471581 {
1548- int storyNumber = episode.StoryNumber;
1582+ // mod yossiepon 20160808 begin
1583+ // int storyNumber = episode.StoryNumber;
1584+ int storyNumber = (episode.StoryNumber > 0) ? episode.StoryNumber : -episode.StoryNumber + prog.StoryCount;
1585+ // mod yossiepon 20160808 end
15491586
15501587 string[] RecordStateDescription =
15511588 {
@@ -1565,10 +1602,13 @@ namespace magicAnime
15651602
15661603 titleLabel.Text = prog.title +
15671604 string.Format(
1568- // mod. yossiepon_20150705 begin
1605+ // mod yossiepon 20150705 begin
15691606 " 第{0}話 {1}" ,
1570- episode.StoryNoStr.Length > 0 ? episode.StoryNoStr : episode.StoryNumber.ToString("0"),
1571- // mod. yossiepon_20150705 end
1607+ // mod yossiepon 20160924 begin
1608+ // episode.StoryNoStr.Length > 0 ? episode.StoryNoStr : episode.StoryNumber.ToString("0"),
1609+ episode.StoryNoStr.Length > 0 ? episode.StoryNoStr : episode.StoryNumber.ToString(Settings.Default.storyNoFormat),
1610+ // mod yossiepon 20160924 end
1611+ // mod yossiepon 20150705 end
15721612 episode.mSubTitle );
15731613
15741614 filePathLabel.Text = episode.FilePath;
@@ -1657,8 +1697,12 @@ namespace magicAnime
16571697 bool enableCancel = true;
16581698 bool enableUnread = true;
16591699 bool enableProp = true;
1700+ // add yossiepon 20160924 begin
1701+ bool enableUpdateProg = true;
1702+ bool enableDeleteInv = false;
1703+ // add yossiepon 20160924 end
16601704
1661- foreach(AnimeEpisode ep in episodes)
1705+ foreach (AnimeEpisode ep in episodes)
16621706 {
16631707 enablePlay &= !isMulti && ep.IsPlayable;
16641708 enableEncode &= (ep.HasFile && !ep.IsEncoded && !ep.IsStored);
@@ -1679,6 +1723,35 @@ namespace magicAnime
16791723 enableProp &= !isMulti;
16801724 }
16811725
1726+ // add yossiepon 20160924 begin
1727+ // 無効データ削除判定1:選択セルが1つ
1728+ if (!isMulti)
1729+ {
1730+ AnimeEpisode ep = episodes[0];
1731+ AnimeEpisode lastEp;
1732+
1733+ AnimeProgram prog = ep.Parent;
1734+
1735+ if (ep.StoryNumber > 0)
1736+ {
1737+ // 通常回の最後を取得
1738+ lastEp = prog.NormalEpisodes[prog.NormalEpisodes.Count - 1];
1739+ }
1740+ else
1741+ {
1742+ // 特番回の最後を取得
1743+ lastEp = prog.SpecialEpisodes[prog.SpecialEpisodes.Count - 1];
1744+ }
1745+
1746+ // 無効データ削除判定2:選択中のセルが放送プランデータ異常またはプランなし、かつ未予約、かつファイルなし、かつ最終回か?
1747+ if ( (ep.PlanError || !ep.HasPlan) && !ep.IsReserved && !ep.HasFile && (ep == lastEp) )
1748+ {
1749+ // メニュー有効
1750+ enableDeleteInv = true;
1751+ }
1752+ }
1753+ // add yossiepon 20160924 end
1754+
16821755 //--------------------------------
16831756 // 拡張ツール項目
16841757 //--------------------------------
@@ -1730,6 +1803,10 @@ namespace magicAnime
17301803 cancelReserveMenu.Enabled = enableCancel;
17311804 unreadMenu.Enabled = enableUnread;
17321805 RecordPropertyMenu.Enabled = enableProp;
1806+ // add yossiepon 20160924 begin
1807+ updateProgramPlanMenu.Enabled = enableUpdateProg;
1808+ deleteInvalidEpisode.Enabled = enableDeleteInv;
1809+ // add yossiepon 20160924 end
17331810
17341811 unreadMenu.Checked = !isMulti && episodes[0].Unread;
17351812 unreadMenu.Visible = !Settings.Default.disableUnread;
@@ -2924,7 +3001,10 @@ namespace magicAnime
29243001 {
29253002 storyNumber = ep.StoryNumber;
29263003
2927- if(1 <= storyNumber)
3004+ // mod yossiepon 20160808 begin
3005+ //if (1 <= storyNumber)
3006+ if (0 != storyNumber)
3007+ // mod yossiepon 20160808 end
29283008 {
29293009 episodes.Add(ep);
29303010 }
@@ -2991,7 +3071,67 @@ namespace magicAnime
29913071 if (this.Height < 310) { this.Height = 310; }
29923072 }
29933073
3074+ // add yossiepon 20160924 begin
3075+ //=========================================================================
3076+ /// <summary>
3077+ /// 番組データ更新メニュー項目のクリック処理
3078+ /// </summary>
3079+ /// <remarks>
3080+ /// </remarks>
3081+ /// <history>2006/XX/XX 新規作成</history>
3082+ //========================================================================
3083+ private void updateProgramPlanMenu_Click(object sender, EventArgs e)
3084+ {
3085+ var episodes = GridSelectEpisodes;
3086+
3087+ if (1 != episodes.Count)
3088+ return;
3089+
3090+ AnimeEpisode ep = episodes[0];
3091+ AnimeProgram prog = ep.Parent;
3092+ List<AnimeProgram> animes = new List<AnimeProgram>();
3093+ animes.Add(prog);
29943094
3095+ AnimeServer.GetInstance().BeginUpdate(updateOption.Force, animes);
3096+ RefreshContent();
3097+ }
3098+
3099+ //=========================================================================
3100+ /// <summary>
3101+ /// 無効最終回削除メニュー項目のクリック処理
3102+ /// </summary>
3103+ /// <remarks>
3104+ /// </remarks>
3105+ /// <history>2006/XX/XX 新規作成</history>
3106+ //========================================================================
3107+ private void deleteInvalidEpisode_Click(object sender, EventArgs e)
3108+ {
3109+ var episodes = GridSelectEpisodes;
3110+
3111+ if (1 != episodes.Count)
3112+ return;
3113+
3114+ AnimeEpisode ep = episodes[0];
3115+ AnimeProgram prog = ep.Parent;
3116+
3117+ if (ep.StoryNumber > 0)
3118+ {
3119+ // 通常回の最後を削除
3120+ if (prog.StoryCount > 0)
3121+ {
3122+ prog.StoryCount = prog.StoryCount - 1;
3123+ }
3124+ }
3125+ else
3126+ {
3127+ // 特番回の最後を削除
3128+ if (prog.SpecialStoryCount > 0)
3129+ {
3130+ prog.SpecialStoryCount = prog.SpecialStoryCount - 1;
3131+ }
3132+ }
3133+ }
3134+ // add yossiepon 20160924 end
29953135 }
29963136
29973137 }
--- a/UserInterface/OptionDialog.cs
+++ b/UserInterface/OptionDialog.cs
@@ -562,10 +562,11 @@ namespace magicAnime
562562 "東奔西走アニメライフ",
563563 "20070401",
564564 "2500",
565- // mod. yossiepon_20150705 begin
565+ // mod yossiepon 20150705 begin
566+ // "東都テレビ"
566567 "東都テレビ",
567568 "SP1");
568- // mod. yossiepon_20150705 end
569+ // mod yossiepon 20150705 end
569570
570571 sampleNameFormatTextBox.Text = sampleText;
571572 }
--- a/UserInterface/TrayIcon.cs
+++ b/UserInterface/TrayIcon.cs
@@ -64,7 +64,7 @@ namespace magicAnime.UserInterface
6464 mNotifyIcon.DoubleClick += notifyIcon_DoubleClick;
6565 mNotifyIcon.BalloonTipIcon = ToolTipIcon.Info;
6666 mNotifyIcon.BalloonTipTitle = "mAgicAnime";
67- mNotifyIcon.Text = "mAgicAnime Ver.7sh mod. yossiepon_20151025";
67+ mNotifyIcon.Text = "mAgicAnime Ver.7sh mod. yossiepon_20160924";
6868 // trayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject( "notifyIcon.Icon" )));
6969
7070 //---------------------------