-
Notifications
You must be signed in to change notification settings - Fork 1
/
OpenuVideoData.cs
51 lines (43 loc) · 1.32 KB
/
OpenuVideoData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace openu_video_fetcher
{
public class OpenuVideoData
{
public string PlaylistUrl { get; set; }
public string VideoId { get; set; }
public string Title { get; set; }
public string ContextId { get; internal set; }
public string CourseId { get; internal set; }
public string formatCacheFileName()
{
return string.Format("{0}", Title);
}
public string formatPlaylistFile()
{
return formatCacheFileName() + "_options.m3u8";
}
private string formatChunksFile(string quality)
{
return formatCacheFileName() + "_chunks_" + quality + ".m3u8";
}
internal string formatChunksFileUrl(string wantedQuality)
{
return formatChunksFile(wantedQuality) + "_url";
}
internal string formatChunksFileContent(string wantedQuality)
{
return "chunklist.m3u8";
}
internal string formatFFmpegFile()
{
return formatCacheFileName() + ".m3u8";
}
internal string formatOutputFile()
{
return "combined_output.mp4";
}
}
}