hardcoded search error messages changed to string resources

This commit is contained in:
2024-03-03 16:23:45 +01:00
Unverified
parent 2da59382a3
commit c3724921f3
7 changed files with 202 additions and 21 deletions

View File

@@ -32,7 +32,7 @@ namespace VDownload.Sources.Common
return video;
}
}
throw new MediaSearchException("Invalid url"); // TODO : Change to string resource
throw CreateExceptionUnknownMediaType();
}
public async Task<Playlist> SearchPlaylist(string url, int maxVideoCount)
@@ -47,7 +47,7 @@ namespace VDownload.Sources.Common
return video;
}
}
throw new MediaSearchException("Invalid url"); // TODO : Change to string resource
throw CreateExceptionUnknownMediaType();
}
#endregion
@@ -60,6 +60,9 @@ namespace VDownload.Sources.Common
protected abstract IEnumerable<SearchRegexPlaylist> GetPlaylistRegexes();
protected MediaSearchException CreateExceptionUnknownMediaType() => new MediaSearchException("UnknownMediaType");
protected MediaSearchException CreateExceptionEmptyPlaylist() => new MediaSearchException("EmptyPlaylist");
#endregion
}
}