SubtitleSearchParameters.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* This file is part of OpenSubtitles Handler
  2. A library that handle OpenSubtitles.org XML-RPC methods.
  3. Copyright © Ala Ibrahim Hadid 2013
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. namespace OpenSubtitlesHandler
  16. {
  17. /// <summary>
  18. /// Paramaters for subtitle search call
  19. /// </summary>
  20. public struct SubtitleSearchParameters
  21. {
  22. public SubtitleSearchParameters(string subLanguageId, string query = "", string season = "", string episode = "", string movieHash = "", long movieByteSize = 0, string imdbid = "")
  23. {
  24. this.subLanguageId = subLanguageId;
  25. this.movieHash = movieHash;
  26. this.movieByteSize = movieByteSize;
  27. this.imdbid = imdbid;
  28. this._episode = episode;
  29. this._season = season;
  30. this._query = query;
  31. }
  32. private string subLanguageId;
  33. private string movieHash;
  34. private long movieByteSize;
  35. private string imdbid;
  36. private string _query;
  37. private string _episode;
  38. public string Episode
  39. {
  40. get { return _episode; }
  41. set { _episode = value; }
  42. }
  43. public string Season
  44. {
  45. get { return _season; }
  46. set { _season = value; }
  47. }
  48. private string _season;
  49. public string Query
  50. {
  51. get { return _query; }
  52. set { _query = value; }
  53. }
  54. /// <summary>
  55. /// List of language ISO639-3 language codes to search for, divided by ',' (e.g. 'cze,eng,slo')
  56. /// </summary>
  57. public string SubLangaugeID { get { return subLanguageId; } set { subLanguageId = value; } }
  58. /// <summary>
  59. /// Video file hash as calculated by one of the implementation functions as seen on http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes
  60. /// </summary>
  61. public string MovieHash { get { return movieHash; } set { movieHash = value; } }
  62. /// <summary>
  63. /// Size of video file in bytes
  64. /// </summary>
  65. public long MovieByteSize { get { return movieByteSize; } set { movieByteSize = value; } }
  66. /// <summary>
  67. /// ​IMDb ID of movie this video is part of, belongs to.
  68. /// </summary>
  69. public string IMDbID { get { return imdbid; } set { imdbid = value; } }
  70. }
  71. }