mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Cleanup and tests around ImportFile
This commit is contained in:
parent
0d51954e92
commit
01163a4f87
30 changed files with 1864 additions and 412 deletions
|
@ -31,11 +31,28 @@ namespace NzbDrone.Core.Providers
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public virtual int Add(EpisodeFile episodeFile)
|
||||
{
|
||||
return Convert.ToInt32(_database.Insert(episodeFile));
|
||||
}
|
||||
|
||||
public virtual void Update(EpisodeFile episodeFile)
|
||||
{
|
||||
_database.Update(episodeFile);
|
||||
}
|
||||
|
||||
public virtual void Delete(int episodeFileId)
|
||||
{
|
||||
_database.Delete(episodeFileId);
|
||||
}
|
||||
|
||||
public virtual bool Exists(string path)
|
||||
{
|
||||
return _database.Exists<EpisodeFile>("WHERE Path =@0", Parser.NormalizePath(path));
|
||||
}
|
||||
|
||||
public virtual EpisodeFile GetEpisodeFile(int episodeFileId)
|
||||
{
|
||||
return _database.Single<EpisodeFile>(episodeFileId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue