Shoko.Server/API/v3/Controllers/FileController.cs
/// <summary>
/// Rescan a file on AniDB.
/// </summary>
/// <param name="fileID">VideoLocal ID</param>
/// <returns></returns>
Rescan a file on AniDB.
Rescan a file on AniDB .
[HttpPost("{fileID}/Rescan")]
        public ActionResult RescanFile(int fileID)
        {
            var vl = RepoFactory.VideoLocal.GetByID(fileID);
            if (vl == null) return NotFound();
            var file = vl.GetBestVideoLocalPlace(true)?.FullServerPath;
            if (string.IsNullOrEmpty(file)) return this.NoContent();
            var command = new CommandRequest_ProcessFile(vl.VideoLocalID, true);
            command.Save();
            return Ok();
        }
[ HttpPost ( " " ) ] public ActionResult RescanFile ( int fileID ) { var vl = RepoFactory . VideoLocal . GetByID ( fileID ) ; if ( vl == null ) return NotFound ( ) ; var file = vl . GetBestVideoLocalPlace ( true ) ? . FullServerPath ; if ( string . IsNullOrEmpty ( file ) ) return this . NoContent ( ) ; var command = new CommandRequest_ProcessFile ( vl . VideoLocalID , true ) ; command . Save ( ) ; return Ok ( ) ; }
Rescan a file on AniDB.
Rescan a file on AniDB .
None
fileID
int
None