main
1import os
2
3EMBY_PROXY = os.getenv("EMBY_PROXY", None)
4EMBY_KEEPALIVE_SECONDS = os.getenv("EMBY_KEEPALIVE_SECONDS", "300,600") # "start,end" 保活时长
5
6VERSION = "0.2.3"
7UA = f"Hills Windows/{VERSION} (windows; 26100.ge_release.240331-1435)"
8HEADERS = {"user-agent": UA, "accept": "*/*", "accept-encoding": "gzip, br"}
9DEVICE_ID = "ccf4470161bb48d09dd6228b2b0d0e8b" # str(uuid.uuid4()).replace("-", "")
10DEVICE_NAME = "Benny"
11ITEM_TYPE = {"Series": "📽", "Movie": "🎬"}
12DEVICE_PROFILE = {
13 "DeviceProfile": {
14 "MaxStaticBitrate": 200000000,
15 "MaxStreamingBitrate": 200000000,
16 "MusicStreamingTranscodingBitrate": 200000000,
17 "DirectPlayProfiles": [{"Type": "Video"}, {"Type": "Audio"}],
18 "TranscodingProfiles": [
19 {
20 "Container": "ts",
21 "Type": "Video",
22 "AudioCodec": "aac,mp3,wav,ac3,eac3,flac,opus",
23 "VideoCodec": "hevc,h264,h265,mpeg4",
24 "Context": "Streaming",
25 "Protocol": "hls",
26 "MaxAudioChannels": "6",
27 "MinSegments": "1",
28 "BreakOnNonKeyFrames": True,
29 "ManifestSubtitles": "vtt",
30 }
31 ],
32 "ContainerProfiles": [],
33 "SubtitleProfiles": [
34 {"Format": "vtt", "Method": "External"},
35 {"Format": "ass", "Method": "External"},
36 {"Format": "ssa", "Method": "External"},
37 {"Format": "srt", "Method": "External"},
38 {"Format": "sub", "Method": "External"},
39 {"Format": "subrip", "Method": "External"},
40 {"Format": "smi", "Method": "External"},
41 {"Format": "ttml", "Method": "External"},
42 {"Format": "webvtt", "Method": "External"},
43 {"Format": "dvdsub", "Method": "External"},
44 {"Format": "dvdsub", "Method": "Embed"},
45 {"Format": "vobsub", "Method": "Embed"},
46 {"Format": "vtt", "Method": "Embed"},
47 {"Format": "ass", "Method": "Embed"},
48 {"Format": "ssa", "Method": "Embed"},
49 {"Format": "srt", "Method": "Embed"},
50 {"Format": "sub", "Method": "Embed"},
51 {"Format": "pgssub", "Method": "Embed"},
52 {"Format": "pgs", "Method": "Embed"},
53 {"Format": "subrip", "Method": "Embed"},
54 {"Format": "smi", "Method": "Embed"},
55 {"Format": "ttml", "Method": "Embed"},
56 {"Format": "webvtt", "Method": "Embed"},
57 {"Format": "mov_text", "Method": "Embed"},
58 {"Format": "dvb_teletext", "Method": "Embed"},
59 {"Format": "dvb_subtitle", "Method": "Embed"},
60 {"Format": "dvbsub", "Method": "Embed"},
61 {"Format": "idx", "Method": "Embed"},
62 {"Format": "vtt", "Method": "Hls"},
63 {"Format": "vtt", "Method": "Hls"},
64 ],
65 }
66}