SubtitleSearchParameters.cs 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. using System;
  16. namespace OpenSubtitlesHandler
  17. {
  18. /// <summary>
  19. /// Paramaters for subtitle search call
  20. /// </summary>
  21. public struct SubtitleSearchParameters
  22. {
  23. public SubtitleSearchParameters(string subLanguageId, string query = "", string season = "", string episode = "", string movieHash = "", long movieByteSize = 0, string imdbid = "")
  24. {
  25. this.subLanguageId = subLanguageId;
  26. this.movieHash = movieHash;
  27. this.movieByteSize = movieByteSize;
  28. this.imdbid = imdbid;
  29. this._episode = episode;
  30. this._season = season;
  31. this._query = query;
  32. }
  33. private string subLanguageId;
  34. private string movieHash;
  35. private long movieByteSize;
  36. private string imdbid;
  37. private string _query;
  38. private string _episode;
  39. public string Episode {
  40. get { return _episode; }
  41. set { _episode = value; }
  42. }
  43. public string Season {
  44. get { return _season; }
  45. set { _season = value; }
  46. }
  47. private string _season;
  48. public string Query {
  49. get { return _query; }
  50. set { _query = value; }
  51. }
  52. /// <summary>
  53. /// List of language ISO639-3 language codes to search for, divided by ',' (e.g. 'cze,eng,slo')
  54. /// </summary>
  55. public string SubLangaugeID { get { return subLanguageId; } set { subLanguageId = value; } }
  56. /// <summary>
  57. /// Video file hash as calculated by one of the implementation functions as seen on http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes
  58. /// </summary>
  59. public string MovieHash { get { return movieHash; } set { movieHash = value; } }
  60. /// <summary>
  61. /// Size of video file in bytes
  62. /// </summary>
  63. public long MovieByteSize { get { return movieByteSize; } set { movieByteSize = value; } }
  64. /// <summary>
  65. /// ​IMDb ID of movie this video is part of, belongs to.
  66. /// </summary>
  67. public string IMDbID { get { return imdbid; } set { imdbid = value; } }
  68. }
  69. }