diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-01-13 12:14:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-13 12:14:53 -0500 |
| commit | 9dcaafe700b7130b49bafbadf0d47b37c6ecf53b (patch) | |
| tree | 6ca1b2b3decac1a86b886dafd2645954a13601fd /MediaBrowser.MediaEncoding/Subtitles | |
| parent | 17d8de4962ea9d78f6ddb557fe26465be1944b38 (diff) | |
| parent | b936c439321b55bf89c99dac96fc78cefe752e84 (diff) | |
Merge pull request #458 from EraYaN/code-cleanup
Clean up several minor issues and add TODOs
Diffstat (limited to 'MediaBrowser.MediaEncoding/Subtitles')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs b/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs index b62fa8398..1c1906de7 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs @@ -121,7 +121,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles { if (string.IsNullOrWhiteSpace(id)) { - throw new ArgumentNullException("id"); + throw new ArgumentNullException(nameof(id)); } var idParts = id.Split(new[] { '-' }, 3); diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs index 68faffa91..202623c8b 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs @@ -130,11 +130,11 @@ namespace MediaBrowser.MediaEncoding.Subtitles { if (item == null) { - throw new ArgumentNullException("item"); + throw new ArgumentNullException(nameof(item)); } if (string.IsNullOrWhiteSpace(mediaSourceId)) { - throw new ArgumentNullException("mediaSourceId"); + throw new ArgumentNullException(nameof(mediaSourceId)); } // TODO network path substition useful ? @@ -300,7 +300,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles { if (string.IsNullOrEmpty(format)) { - throw new ArgumentNullException("format"); + throw new ArgumentNullException(nameof(format)); } if (string.Equals(format, SubtitleFormat.SRT, StringComparison.OrdinalIgnoreCase)) @@ -328,7 +328,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles { if (string.IsNullOrEmpty(format)) { - throw new ArgumentNullException("format"); + throw new ArgumentNullException(nameof(format)); } if (string.Equals(format, "json", StringComparison.OrdinalIgnoreCase)) @@ -423,12 +423,12 @@ namespace MediaBrowser.MediaEncoding.Subtitles { if (string.IsNullOrEmpty(inputPath)) { - throw new ArgumentNullException("inputPath"); + throw new ArgumentNullException(nameof(inputPath)); } if (string.IsNullOrEmpty(outputPath)) { - throw new ArgumentNullException("outputPath"); + throw new ArgumentNullException(nameof(outputPath)); } _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(outputPath)); @@ -566,12 +566,12 @@ namespace MediaBrowser.MediaEncoding.Subtitles { if (string.IsNullOrEmpty(inputPath)) { - throw new ArgumentNullException("inputPath"); + throw new ArgumentNullException(nameof(inputPath)); } if (string.IsNullOrEmpty(outputPath)) { - throw new ArgumentNullException("outputPath"); + throw new ArgumentNullException(nameof(outputPath)); } _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(outputPath)); @@ -759,7 +759,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles return _fileSystem.ReadAllBytes(path); } - throw new ArgumentOutOfRangeException("protocol"); + throw new ArgumentOutOfRangeException(nameof(protocol)); } } } |
