aboutsummaryrefslogtreecommitdiff
path: root/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-05 00:36:45 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-05 00:36:45 -0400
commitac69327f1fa866c20630d9d0e0c663472b726c79 (patch)
tree3d7dfd7627d13201cc74bcd1f0302b67bf6c16b2 /OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs
parent8aadbf35136874ac7a279f8bc0f3a4a02a131313 (diff)
check in open subtitles stub
Diffstat (limited to 'OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs')
-rw-r--r--OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs115
1 files changed, 115 insertions, 0 deletions
diff --git a/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs b/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs
new file mode 100644
index 000000000..e11ff1b9a
--- /dev/null
+++ b/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs
@@ -0,0 +1,115 @@
+/* This file is part of OpenSubtitles Handler
+ A library that handle OpenSubtitles.org XML-RPC methods.
+
+ Copyright © Ala Ibrahim Hadid 2013
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+using System;
+
+namespace OpenSubtitlesHandler
+{
+ /// <summary>
+ /// Paramaters for subtitle search call
+ /// </summary>
+ public struct SubtitleSearchParameters
+ {
+ /// <summary>
+ /// Paramaters for subtitle search call
+ /// </summary>
+ /// <param name="subLanguageId">List of language ISO639-3 language codes to search for, divided by ',' (e.g. 'cze,eng,slo')</param>
+ /// <param name="movieHash">Video file hash as calculated by one of the implementation functions as seen on http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes</param>
+ /// <param name="movieByteSize">Size of video file in bytes </param>
+ public SubtitleSearchParameters(string subLanguageId, string movieHash, long movieByteSize)
+ {
+ this.subLanguageId = subLanguageId;
+ this.movieHash = movieHash;
+ this.movieByteSize = movieByteSize;
+ this.imdbid = "";
+ this._episode = "";
+ this._season = "";
+ this._query = "";
+ }
+
+ public SubtitleSearchParameters(string subLanguageId, string query, string season, string episode)
+ {
+ this.subLanguageId = subLanguageId;
+ this.movieHash = "";
+ this.movieByteSize = 0;
+ this.imdbid = "";
+ this._episode = episode;
+ this._season = season;
+ this._query = query;
+ }
+
+ /// <summary>
+ /// Paramaters for subtitle search call
+ /// </summary>
+ /// <param name="subLanguageId">List of language ISO639-3 language codes to search for, divided by ',' (e.g. 'cze,eng,slo')</param>
+ /// <param name="movieHash">Video file hash as calculated by one of the implementation functions as seen on http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes</param>
+ /// <param name="movieByteSize">Size of video file in bytes </param>
+ /// <param name="imdbid"> IMDb ID of movie this video is part of, belongs to.</param>
+ public SubtitleSearchParameters(string subLanguageId, string movieHash, long movieByteSize, string imdbid)
+ {
+ this.subLanguageId = subLanguageId;
+ this.movieHash = movieHash;
+ this.movieByteSize = movieByteSize;
+ this.imdbid = imdbid;
+ this._episode = "";
+ this._season = "";
+ this._query = "";
+ }
+
+ private string subLanguageId;
+ private string movieHash;
+ private long movieByteSize;
+ private string imdbid;
+ private string _query;
+ private string _episode;
+
+ public string Episode {
+ get { return _episode; }
+ set { _episode = value; }
+ }
+
+ public string Season {
+ get { return _season; }
+ set { _season = value; }
+ }
+
+ private string _season;
+
+ public string Query {
+ get { return _query; }
+ set { _query = value; }
+ }
+
+ /// <summary>
+ /// List of language ISO639-3 language codes to search for, divided by ',' (e.g. 'cze,eng,slo')
+ /// </summary>
+ public string SubLangaugeID { get { return subLanguageId; } set { subLanguageId = value; } }
+ /// <summary>
+ /// Video file hash as calculated by one of the implementation functions as seen on http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes
+ /// </summary>
+ public string MovieHash { get { return movieHash; } set { movieHash = value; } }
+ /// <summary>
+ /// Size of video file in bytes
+ /// </summary>
+ public long MovieByteSize { get { return movieByteSize; } set { movieByteSize = value; } }
+ /// <summary>
+ /// ​IMDb ID of movie this video is part of, belongs to.
+ /// </summary>
+ public string IMDbID { get { return imdbid; } set { imdbid = value; } }
+ }
+}