SubtitleSearchParameters.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. get { return _episode; }
  40. set { _episode = value; }
  41. }
  42. public string Season {
  43. get { return _season; }
  44. set { _season = value; }
  45. }
  46. private string _season;
  47. public string Query {
  48. get { return _query; }
  49. set { _query = value; }
  50. }
  51. /// <summary>
  52. /// List of language ISO639-3 language codes to search for, divided by ',' (e.g. 'cze,eng,slo')
  53. /// </summary>
  54. public string SubLangaugeID { get { return subLanguageId; } set { subLanguageId = value; } }
  55. /// <summary>
  56. /// Video file hash as calculated by one of the implementation functions as seen on http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes
  57. /// </summary>
  58. public string MovieHash { get { return movieHash; } set { movieHash = value; } }
  59. /// <summary>
  60. /// Size of video file in bytes
  61. /// </summary>
  62. public long MovieByteSize { get { return movieByteSize; } set { movieByteSize = value; } }
  63. /// <summary>
  64. /// ​IMDb ID of movie this video is part of, belongs to.
  65. /// </summary>
  66. public string IMDbID { get { return imdbid; } set { imdbid = value; } }
  67. }
  68. }