X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-streaming-playlist.ts;h=73bd898445a5a2d8be54f38bf28d0595494e26d0;hb=bb4ba6d94c5051fdd665ebe63fffcc105778b8be;hp=0099add4ef6b6a779bf1dece083d5ae39268ae7f;hpb=35f28e94c763370616d25d5820f4b9ef70cedca9;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts index 0099add4e..73bd89844 100644 --- a/server/models/video/video-streaming-playlist.ts +++ b/server/models/video/video-streaming-playlist.ts @@ -17,10 +17,12 @@ import { join } from 'path' import { sha1 } from '../../helpers/core-utils' import { isArrayOf } from '../../helpers/custom-validators/misc' import { Op, QueryTypes } from 'sequelize' -import { MStreamingPlaylist, MVideoFile } from '@server/typings/models' +import { MStreamingPlaylist, MStreamingPlaylistVideo, MVideoFile } from '@server/types/models' import { VideoFileModel } from '@server/models/video/video-file' -import { getTorrentFileName, getVideoFilename } from '@server/lib/video-paths' +import { getTorrentFileName, getTorrentFilePath, getVideoFilename } from '@server/lib/video-paths' import * as memoizee from 'memoizee' +import { remove } from 'fs-extra' +import { logger } from '@server/helpers/logger' @Table({ tableName: 'videoStreamingPlaylist', @@ -151,6 +153,17 @@ export class VideoStreamingPlaylistModel extends Model logger.warn('Cannot delete torrent %s.', torrentPath, { err })) + } }