Compare commits
860 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58e5931a32 | ||
|
|
fcd299965d | ||
|
|
b7fd68d366 | ||
|
|
1d1e6dede9 | ||
|
|
f384822aa5 | ||
|
|
8e5cccb22c | ||
|
|
500c0b9cba | ||
|
|
5054a77dcf | ||
|
|
dac2c98d8a | ||
|
|
aafed63c3f | ||
|
|
2e9a3d45c2 | ||
|
|
e281c79d6f | ||
|
|
38ec68c488 | ||
|
|
da61998ad6 | ||
|
|
f28dd79fb1 | ||
|
|
c2e57aba27 | ||
|
|
db54fe4c70 | ||
|
|
00fe66a38c | ||
|
|
406af5f086 | ||
|
|
f03e279382 | ||
|
|
1bc2b12ee3 | ||
|
|
469a17b3ca | ||
|
|
83948420a4 | ||
|
|
8c53407a9d | ||
|
|
69a81c0bc2 | ||
|
|
d978ae1996 | ||
|
|
6016a27736 | ||
|
|
566646ad8b | ||
|
|
6c1ca6f737 | ||
|
|
aa0c20afd5 | ||
|
|
46acff4113 | ||
|
|
de5c0bab70 | ||
|
|
5181427234 | ||
|
|
c79324154f | ||
|
|
77d4fec6eb | ||
|
|
29ff80d69c | ||
|
|
4a700778e3 | ||
|
|
f274d024ce | ||
|
|
c45b6aa53e | ||
|
|
4b4399fba6 | ||
|
|
c06598635f | ||
|
|
a15098dc00 | ||
|
|
86a4d15a32 | ||
|
|
b86f049e66 | ||
|
|
12fea24590 | ||
|
|
26e2ffdd31 | ||
|
|
d9ab654abe | ||
|
|
c44f96b727 | ||
|
|
c5ac36c886 | ||
|
|
ff9a0c7e55 | ||
|
|
056e19f350 | ||
|
|
f8ba55e202 | ||
|
|
4ea76f9cdc | ||
|
|
88f56cd0c4 | ||
|
|
6d74184cfb | ||
|
|
2845e7e101 | ||
|
|
c78298789d | ||
|
|
7bb8985f11 | ||
|
|
8414285b58 | ||
|
|
7ec42b89a0 | ||
|
|
c720504e39 | ||
|
|
af8f86b3de | ||
|
|
bfc3954995 | ||
|
|
4ed90d4658 | ||
|
|
3a6a5baa8e | ||
|
|
18f0d996c0 | ||
|
|
da2554bd53 | ||
|
|
f2811323c2 | ||
|
|
221a95c93c | ||
|
|
982ac32471 | ||
|
|
d48275a785 | ||
|
|
a4e98a0390 | ||
|
|
0fbdb79df7 | ||
|
|
87dc60d4aa | ||
|
|
d6b56dde62 | ||
|
|
0302144b22 | ||
|
|
269b94254b | ||
|
|
2f377e0a0f | ||
|
|
3b96c78515 | ||
|
|
e150174ece | ||
|
|
33e069e461 | ||
|
|
593b7327cf | ||
|
|
9d795adc3e | ||
|
|
0ff38b6012 | ||
|
|
fe43e279c8 | ||
|
|
d18823ced1 | ||
|
|
db4a72df10 | ||
|
|
406fb045c2 | ||
|
|
32992b6143 | ||
|
|
da169dddb5 | ||
|
|
250f03d2d9 | ||
|
|
d8cb34dbbc | ||
|
|
8fd9f5b6a4 | ||
|
|
2f4a00d322 | ||
|
|
9849c183ac | ||
|
|
bcb32ec6ad | ||
|
|
eb4b705167 | ||
|
|
d6c669a7c8 | ||
|
|
1b84446831 | ||
|
|
fb256b7aa0 | ||
|
|
382b8bb509 | ||
|
|
00234a5ece | ||
|
|
57cefb432a | ||
|
|
7be4a8500c | ||
|
|
74d2698c5f | ||
|
|
4727f69fc9 | ||
|
|
1e6c41e333 | ||
|
|
bee8f58265 | ||
|
|
a71040ba1b | ||
|
|
f1ef0b0b4c | ||
|
|
387b4dea25 | ||
|
|
3014866f65 | ||
|
|
37985c2e26 | ||
|
|
139e3c19ee | ||
|
|
da860e6e54 | ||
|
|
ce03662fa7 | ||
|
|
49923e50db | ||
|
|
c3c52b6682 | ||
|
|
80281e599d | ||
|
|
3a88a3c795 | ||
|
|
d6e98f9a50 | ||
|
|
2bcbffee0c | ||
|
|
22ffc5aee4 | ||
|
|
ee3a4531a0 | ||
|
|
aff740c596 | ||
|
|
38d9eeffbe | ||
|
|
d6d9fce898 | ||
|
|
f60ad53393 | ||
|
|
e8461d3317 | ||
|
|
9dd512df80 | ||
|
|
5b0bd88892 | ||
|
|
70c85925af | ||
|
|
e449182641 | ||
|
|
fcfe02ee73 | ||
|
|
b8b650540d | ||
|
|
e1d523ee45 | ||
|
|
ceb8b9f740 | ||
|
|
8413c56392 | ||
|
|
88038d9644 | ||
|
|
c846da4f9e | ||
|
|
546f4cd46f | ||
|
|
e216702bcf | ||
|
|
be89a5e719 | ||
|
|
84d56976ba | ||
|
|
0ef2b46106 | ||
|
|
52294881b1 | ||
|
|
5e8a2db029 | ||
|
|
262eefd8db | ||
|
|
73e8758d84 | ||
|
|
181de97ce5 | ||
|
|
ae5514afd6 | ||
|
|
83af2db679 | ||
|
|
0b3e6548db | ||
|
|
72beadc74d | ||
|
|
f0e74c2c6b | ||
|
|
d351fa0c1e | ||
|
|
20033f2275 | ||
|
|
c4c0894b29 | ||
|
|
c4f51e16a5 | ||
|
|
56dcc45dc0 | ||
|
|
be89d53a9e | ||
|
|
3ac7531385 | ||
|
|
cb1ff69585 | ||
|
|
a50fb922c5 | ||
|
|
593c6c071c | ||
|
|
d573f2d671 | ||
|
|
1ce5939362 | ||
|
|
4d335d8f13 | ||
|
|
c118f111b6 | ||
|
|
52e91243e5 | ||
|
|
9faa68b26f | ||
|
|
aadf7676d1 | ||
|
|
08ca1337a9 | ||
|
|
07072d9f7b | ||
|
|
7e3c45c917 | ||
|
|
548270772c | ||
|
|
cb7bffc233 | ||
|
|
da2caa2902 | ||
|
|
ab0e851db9 | ||
|
|
32f393d57f | ||
|
|
78e4e2ed92 | ||
|
|
42d5a48491 | ||
|
|
20dac6d6b8 | ||
|
|
1cdcace061 | ||
|
|
95ee3c72e3 | ||
|
|
66eabcdd39 | ||
|
|
1d94607a30 | ||
|
|
1385d89df6 | ||
|
|
8b073e2ba5 | ||
|
|
34da7de47d | ||
|
|
021a1887fb | ||
|
|
6772ac5603 | ||
|
|
b630e9de82 | ||
|
|
7774977cdd | ||
|
|
5ac6d0ae59 | ||
|
|
fa3a8108e5 | ||
|
|
660f6174b3 | ||
|
|
8af1e93cd4 | ||
|
|
cabb824f2a | ||
|
|
b4c5ff89fd | ||
|
|
78324ff797 | ||
|
|
885a000da7 | ||
|
|
aad34e62ca | ||
|
|
45d8ace9bb | ||
|
|
5e4697802f | ||
|
|
f6227e99cc | ||
|
|
ae24d644db | ||
|
|
b982d7c239 | ||
|
|
c713824bf9 | ||
|
|
ea851317e7 | ||
|
|
8985fb8d58 | ||
|
|
b5e8cce4cf | ||
|
|
211ae30188 | ||
|
|
e18b89ca27 | ||
|
|
ebd2a30087 | ||
|
|
fd361421b1 | ||
|
|
f7a46c7a56 | ||
|
|
2a1f6361a5 | ||
|
|
1ea219bf3f | ||
|
|
d0f2b3a747 | ||
|
|
ffcf6bdd3a | ||
|
|
795f2c8774 | ||
|
|
f8aff0c51d | ||
|
|
055e43eda7 | ||
|
|
c8cb908004 | ||
|
|
8ab08dd041 | ||
|
|
8487319374 | ||
|
|
91e99effc9 | ||
|
|
0e2e731103 | ||
|
|
6822975fd3 | ||
|
|
12e4c1c7ae | ||
|
|
6786dfcabd | ||
|
|
f06b9a14f3 | ||
|
|
838541b825 | ||
|
|
1d1d7e8a37 | ||
|
|
d3afa53191 | ||
|
|
450f246f95 | ||
|
|
b9a111432a | ||
|
|
581a7fe078 | ||
|
|
a430568082 | ||
|
|
d7c6d16250 | ||
|
|
3a831994f6 | ||
|
|
dc68d61491 | ||
|
|
a05d803d4c | ||
|
|
b4893b9ac9 | ||
|
|
b0608d26b4 | ||
|
|
67b1f9f716 | ||
|
|
39195aae09 | ||
|
|
cc598a86f1 | ||
|
|
ffe79c8982 | ||
|
|
05ad2e9b3f | ||
|
|
42abb5a993 | ||
|
|
a4055779f6 | ||
|
|
1a3543e5a5 | ||
|
|
42e0b32c7d | ||
|
|
85a58fd655 | ||
|
|
a709cbdc64 | ||
|
|
08b63a7c11 | ||
|
|
51edd5d067 | ||
|
|
ee89236fe8 | ||
|
|
fee42e883c | ||
|
|
cc3422b96b | ||
|
|
50279be686 | ||
|
|
0e617933f6 | ||
|
|
f74bfcb343 | ||
|
|
64b6cfa3dc | ||
|
|
bb056f4b59 | ||
|
|
ce11869a1a | ||
|
|
e3b19c22a7 | ||
|
|
05fd76c0fa | ||
|
|
7165868509 | ||
|
|
4190410c7e | ||
|
|
b673054c8d | ||
|
|
e051ca6ff6 | ||
|
|
d8d6c6f254 | ||
|
|
2ffab720fb | ||
|
|
07f163a4c3 | ||
|
|
883575893b | ||
|
|
d1a0497f55 | ||
|
|
ded9dee22c | ||
|
|
e8f6a61131 | ||
|
|
fd7f420af2 | ||
|
|
eaa6cb0ddc | ||
|
|
8af256f9c2 | ||
|
|
9f83ee7b3e | ||
|
|
e0315b5695 | ||
|
|
fd36bbede8 | ||
|
|
b4fdfb562d | ||
|
|
48ad18d12b | ||
|
|
fe197415ca | ||
|
|
0231bd88a7 | ||
|
|
15806de2aa | ||
|
|
68a7ed6b7c | ||
|
|
48e1a55d9e | ||
|
|
2c9e056d52 | ||
|
|
8191efb90c | ||
|
|
1d7d4c5738 | ||
|
|
3701ce4037 | ||
|
|
b2ffad9ce9 | ||
|
|
f4015f82e0 | ||
|
|
cab7fa2671 | ||
|
|
6a3ed5d519 | ||
|
|
f2d0d1f646 | ||
|
|
d6a729c119 | ||
|
|
4e7675e78f | ||
|
|
b6f5c33191 | ||
|
|
1cbcddfbd2 | ||
|
|
80d011bb4f | ||
|
|
59ff083f5d | ||
|
|
cc3b1e5cc8 | ||
|
|
58591da0b8 | ||
|
|
905a253ff5 | ||
|
|
3cd31cadf8 | ||
|
|
48da8f429e | ||
|
|
8d9428ebdc | ||
|
|
f6f0a8a481 | ||
|
|
a30687a15a | ||
|
|
404bd04cbc | ||
|
|
bd550ef996 | ||
|
|
e05e002b8b | ||
|
|
ede0439b12 | ||
|
|
becbad981c | ||
|
|
3d01aa1ae4 | ||
|
|
0fec7994a8 | ||
|
|
090fea21ea | ||
|
|
52dd570142 | ||
|
|
28483bdb54 | ||
|
|
722120af74 | ||
|
|
df5e87409a | ||
|
|
94789860b1 | ||
|
|
fd6d35e1d0 | ||
|
|
cce90d2b56 | ||
|
|
8106c8393b | ||
|
|
0b80902cc8 | ||
|
|
189b99df16 | ||
|
|
490e22c790 | ||
|
|
a356c1417a | ||
|
|
07cba6cbcf | ||
|
|
411139cd78 | ||
|
|
29f3330091 | ||
|
|
8108e295dc | ||
|
|
aa25dd1a0b | ||
|
|
23c52c3fb9 | ||
|
|
a5aa482b6c | ||
|
|
8d298e0e36 | ||
|
|
13f1ea2c19 | ||
|
|
9ad182502f | ||
|
|
b2767eceff | ||
|
|
bc8a0eeead | ||
|
|
73df5bdbe9 | ||
|
|
e6b95db132 | ||
|
|
e30cf63aef | ||
|
|
571afa4fe2 | ||
|
|
42f2799d66 | ||
|
|
384f867228 | ||
|
|
cf85e2327e | ||
|
|
2f8f9e6853 | ||
|
|
06d9423f00 | ||
|
|
37be6c87eb | ||
|
|
c9b88ab741 | ||
|
|
0dab69b551 | ||
|
|
ff4cbfc6df | ||
|
|
c72144111e | ||
|
|
3518400b22 | ||
|
|
adf037c44c | ||
|
|
73038ee3f7 | ||
|
|
920c39454c | ||
|
|
edcfd8b565 | ||
|
|
7327bb91a3 | ||
|
|
6a5488c651 | ||
|
|
1cf1e9bfa1 | ||
|
|
7469ed4e6e | ||
|
|
c7f648f86a | ||
|
|
3069c749b4 | ||
|
|
d02642bf7b | ||
|
|
803bf563d7 | ||
|
|
d16f38dbe1 | ||
|
|
e8813ced3c | ||
|
|
a1fcf4ea0d | ||
|
|
c8dd72886b | ||
|
|
c64cc733d2 | ||
|
|
190bc46c1b | ||
|
|
ae73f7b3e3 | ||
|
|
060eb98cc5 | ||
|
|
da16de48aa | ||
|
|
e62198650e | ||
|
|
88f13492c7 | ||
|
|
65cd3ed597 | ||
|
|
c27aff1c63 | ||
|
|
0586598d33 | ||
|
|
e8cf72e925 | ||
|
|
fc7c211025 | ||
|
|
3d441d4a73 | ||
|
|
35d97dc949 | ||
|
|
18189644e3 | ||
|
|
56365e9237 | ||
|
|
9da5d3acc2 | ||
|
|
3320d4feeb | ||
|
|
90b9a95619 | ||
|
|
3a6624f701 | ||
|
|
2b47006662 | ||
|
|
acb9afd908 | ||
|
|
7e4cc9f513 | ||
|
|
ca910325f3 | ||
|
|
8fc8fc0622 | ||
|
|
2dc14aa85d | ||
|
|
26e20d1cd5 | ||
|
|
217d35ee74 | ||
|
|
790266d314 | ||
|
|
eba1f05c03 | ||
|
|
b35dcbb9f0 | ||
|
|
3a5e3ade01 | ||
|
|
fbc82c88be | ||
|
|
9eada88545 | ||
|
|
6561021926 | ||
|
|
d72d0fb865 | ||
|
|
875392c77f | ||
|
|
449dd1a6a2 | ||
|
|
9a7a5ef50e | ||
|
|
bc18d5341c | ||
|
|
99dfb8549f | ||
|
|
4f14b479bb | ||
|
|
f229c641a1 | ||
|
|
235125df57 | ||
|
|
d7da475aad | ||
|
|
8de4eb7d19 | ||
|
|
8a5198e6a3 | ||
|
|
85966b54fb | ||
|
|
469590c9c5 | ||
|
|
e066a02403 | ||
|
|
924ec0c191 | ||
|
|
daaa007fea | ||
|
|
0addc9ef46 | ||
|
|
9f8b716f40 | ||
|
|
edfd950aad | ||
|
|
bb8df8dfa0 | ||
|
|
f952988fb3 | ||
|
|
97639e5c85 | ||
|
|
d42ef36bf9 | ||
|
|
1bd477e2e5 | ||
|
|
949393043d | ||
|
|
55538764fa | ||
|
|
3b52035ee0 | ||
|
|
c5430f86b0 | ||
|
|
1e94023927 | ||
|
|
a00c0defa8 | ||
|
|
e63b18f17d | ||
|
|
72ab479d1f | ||
|
|
bf7d8fdf4a | ||
|
|
582226c133 | ||
|
|
529d804414 | ||
|
|
d116efe1f7 | ||
|
|
c1f76eb8ab | ||
|
|
d00e43735f | ||
|
|
04d03c5cf9 | ||
|
|
e9e152d2fc | ||
|
|
cfd5d1a4f2 | ||
|
|
440350a3f6 | ||
|
|
fe4c3fddb4 | ||
|
|
38f96af079 | ||
|
|
321c440739 | ||
|
|
e241589969 | ||
|
|
47f08fbb12 | ||
|
|
a0195420df | ||
|
|
7aa975325a | ||
|
|
d0980f0da5 | ||
|
|
900dc851e6 | ||
|
|
933ef43889 | ||
|
|
2b1e3aa45f | ||
|
|
67465c6e10 | ||
|
|
5b1f36ef27 | ||
|
|
b30d702782 | ||
|
|
27f0633ed8 | ||
|
|
09606d0353 | ||
|
|
3051b2a1e4 | ||
|
|
0ca76597e5 | ||
|
|
5348fddc9e | ||
|
|
30fef79120 | ||
|
|
58af3d4f5c | ||
|
|
ce0c928ddb | ||
|
|
478306ca15 | ||
|
|
a90a85c306 | ||
|
|
44ec5d2631 | ||
|
|
18fae029d6 | ||
|
|
036dfc4168 | ||
|
|
bddfca6215 | ||
|
|
a358631040 | ||
|
|
49b61f238e | ||
|
|
99acf83dfa | ||
|
|
e5ffa45dbe | ||
|
|
22a64f37f5 | ||
|
|
0e422a33d6 | ||
|
|
256e6dc195 | ||
|
|
e0e5a487c3 | ||
|
|
801726ce38 | ||
|
|
19319e8eb6 | ||
|
|
d707e969fa | ||
|
|
4a03ac4022 | ||
|
|
eca3c099d9 | ||
|
|
8ea0c72070 | ||
|
|
351bac44c5 | ||
|
|
9c4239af01 | ||
|
|
9b224d7080 | ||
|
|
ca320ba7ac | ||
|
|
ae0732136f | ||
|
|
d7b7be395b | ||
|
|
9d0a08571e | ||
|
|
f8dd182e42 | ||
|
|
23f5c1d90b | ||
|
|
e867446437 | ||
|
|
f50a997e40 | ||
|
|
006e81588a | ||
|
|
65bd052f3e | ||
|
|
17c60f46db | ||
|
|
a36658f6f0 | ||
|
|
f11a4368bb | ||
|
|
9fa60ec934 | ||
|
|
089ad8e7c2 | ||
|
|
b062577d81 | ||
|
|
8f41ba4d3a | ||
|
|
ba610b5094 | ||
|
|
e566d9a231 | ||
|
|
742bef5b5f | ||
|
|
aacafee1de | ||
|
|
382e8699a2 | ||
|
|
3ed6f37030 | ||
|
|
51ed47f4c4 | ||
|
|
5b3d8a6d76 | ||
|
|
cc719fd77c | ||
|
|
8fd0bc63b9 | ||
|
|
9014e16037 | ||
|
|
9741817af4 | ||
|
|
f4ae36b2a8 | ||
|
|
587bb85b41 | ||
|
|
1a4b271314 | ||
|
|
f2e50f50bd | ||
|
|
22879a603e | ||
|
|
26ca4b607b | ||
|
|
106d1d18ed | ||
|
|
b67c1b933e | ||
|
|
f0acc0446c | ||
|
|
80691e53b0 | ||
|
|
d655283ef0 | ||
|
|
25f0315e91 | ||
|
|
0efc699e3d | ||
|
|
39ef1106d7 | ||
|
|
58b582bdcb | ||
|
|
c5c7a3c4ee | ||
|
|
a5288115a8 | ||
|
|
dd15c808cb | ||
|
|
decc475f7c | ||
|
|
5665933849 | ||
|
|
25a428373c | ||
|
|
009c95d972 | ||
|
|
9d37fd96f1 | ||
|
|
8bfb54a41b | ||
|
|
17703c8bd2 | ||
|
|
1077570ca8 | ||
|
|
e8d93b3485 | ||
|
|
56de8c893a | ||
|
|
9dcaafe700 | ||
|
|
17d8de4962 | ||
|
|
b936c43932 | ||
|
|
c8e3c1737a | ||
|
|
f2dae8ee51 | ||
|
|
3a2a0fbfe8 | ||
|
|
81475e361b | ||
|
|
50c127fd9a | ||
|
|
bf4de012da | ||
|
|
debb8e56fd | ||
|
|
ddc18a1ca7 | ||
|
|
0abdfbb526 | ||
|
|
e9519de07d | ||
|
|
783e74d9c9 | ||
|
|
78a5d999f4 | ||
|
|
846456b41e | ||
|
|
41343b9220 | ||
|
|
2421cbd9cb | ||
|
|
36e09949be | ||
|
|
016bad1ea3 | ||
|
|
e04f652eff | ||
|
|
03ec62e478 | ||
|
|
dadd6e11b1 | ||
|
|
c28283aa7c | ||
|
|
2e53f4c2e9 | ||
|
|
f1d6f04572 | ||
|
|
f818053a43 | ||
|
|
874a6bf38b | ||
|
|
deb9d97d37 | ||
|
|
678e0b357b | ||
|
|
c44c4b2eb9 | ||
|
|
3f273632a0 | ||
|
|
672013c23d | ||
|
|
b73d081bd2 | ||
|
|
ba671569b4 | ||
|
|
2d9cf14a72 | ||
|
|
53b8aa52e1 | ||
|
|
7a3b01da1b | ||
|
|
b1406d33f1 | ||
|
|
2c65fe53f2 | ||
|
|
2c62f8dbd5 | ||
|
|
4b00b0cc87 | ||
|
|
74507099ad | ||
|
|
0bb08b3f8d | ||
|
|
21098eb861 | ||
|
|
94933722c4 | ||
|
|
3f9b005885 | ||
|
|
559ecb2afc | ||
|
|
862fe1a290 | ||
|
|
5ffea816a1 | ||
|
|
7bda212958 | ||
|
|
101f47b6d4 | ||
|
|
b6c0e5d472 | ||
|
|
40e509588e | ||
|
|
fa01c4f02e | ||
|
|
cb328e4b6f | ||
|
|
fa4c6ee8b2 | ||
|
|
8eb2fe1b58 | ||
|
|
c888879599 | ||
|
|
e2751d42e8 | ||
|
|
2f31f9a382 | ||
|
|
54e2feabba | ||
|
|
2e39a80c63 | ||
|
|
7cbff8d3f1 | ||
|
|
e5c2dbdf23 | ||
|
|
15c89d281e | ||
|
|
9659decef0 | ||
|
|
fddd72a3bd | ||
|
|
8489febcc7 | ||
|
|
ec1f5dc317 | ||
|
|
47e36b6791 | ||
|
|
399a079dd4 | ||
|
|
5900ab8c68 | ||
|
|
0abe5b6ec3 | ||
|
|
3d867c2c46 | ||
|
|
7a832045d6 | ||
|
|
7603b8d0fe | ||
|
|
04ab1daa02 | ||
|
|
41da58206f | ||
|
|
909409bb6d | ||
|
|
f454b753f2 | ||
|
|
9de66e9e87 | ||
|
|
dbceef97fd | ||
|
|
932fcb0a9c | ||
|
|
f822d1c871 | ||
|
|
61aeb0e9a8 | ||
|
|
803226acef | ||
|
|
cdefc046e6 | ||
|
|
9156b21714 | ||
|
|
b3bd238d29 | ||
|
|
67300c65dc | ||
|
|
432be01934 | ||
|
|
4e7f475491 | ||
|
|
ad36f9ec89 | ||
|
|
7f4a073b05 | ||
|
|
f520ddc966 | ||
|
|
c5c44744fc | ||
|
|
f9e52fed81 | ||
|
|
bd169e4fd4 | ||
|
|
ba1794f64b | ||
|
|
82a801c9ae | ||
|
|
880825514a | ||
|
|
0e455b0f62 | ||
|
|
cbff18edb5 | ||
|
|
672e635742 | ||
|
|
4ab82f7436 | ||
|
|
ae4a82570c | ||
|
|
483e74ec8f | ||
|
|
1f5b9a04fb | ||
|
|
e1379610e5 | ||
|
|
c986340c02 | ||
|
|
0b804629b8 | ||
|
|
1c326fe7d4 | ||
|
|
169709096f | ||
|
|
d6d8c40450 | ||
|
|
edfc3cb8c6 | ||
|
|
237187bfc0 | ||
|
|
6ebd01b637 | ||
|
|
9f7bebc728 | ||
|
|
1dde747267 | ||
|
|
12112ea25d | ||
|
|
5af4d4d071 | ||
|
|
e60dc805d6 | ||
|
|
0a715f9196 | ||
|
|
72798ebd0c | ||
|
|
b48ed8faf4 | ||
|
|
e93896f7a4 | ||
|
|
21ac54fde9 | ||
|
|
423ad4a20b | ||
|
|
7bee88280c | ||
|
|
73fd0cd8c6 | ||
|
|
1273da5af9 | ||
|
|
d4182e761c | ||
|
|
a827dcaced | ||
|
|
07a8e49c4b | ||
|
|
e9b44a3d6e | ||
|
|
5623d4b632 | ||
|
|
ec2d3ef603 | ||
|
|
c07d5a6963 | ||
|
|
b27315bc08 | ||
|
|
e5a97f1df2 | ||
|
|
4e8149bc86 | ||
|
|
a74996f06b | ||
|
|
37b19cb386 | ||
|
|
177c4835a5 | ||
|
|
3f65cb4f48 | ||
|
|
263274e1ae | ||
|
|
56f9572b03 | ||
|
|
16d99bdb43 | ||
|
|
1ccc0131a5 | ||
|
|
7630e58218 | ||
|
|
8ff89fdc0c | ||
|
|
b39585cbf6 | ||
|
|
73c6a3f29a | ||
|
|
d5d9dfd8e6 | ||
|
|
f2fedb9f34 | ||
|
|
af6c4279ee | ||
|
|
7af3754a11 | ||
|
|
bb879fff33 | ||
|
|
79229fe3ae | ||
|
|
c5eb782c7b | ||
|
|
f911aca082 | ||
|
|
abddc4786c | ||
|
|
4d25b3ad8b | ||
|
|
90ab6a40fc | ||
|
|
b3de385d5b | ||
|
|
f6d50c411f | ||
|
|
23267bb08f | ||
|
|
f57ad728a5 | ||
|
|
2850ff7b8a | ||
|
|
1e1918af4f | ||
|
|
0eafc3fd11 | ||
|
|
a8da00f0a2 | ||
|
|
af0451b6ac | ||
|
|
a968913e9f | ||
|
|
a2c1ec0de3 | ||
|
|
d3b0ba978c | ||
|
|
893e7c5a65 | ||
|
|
cc4d17edbd | ||
|
|
227f9da3e5 | ||
|
|
4c03616aff | ||
|
|
bf61c20408 | ||
|
|
08a67f9ea1 | ||
|
|
80c3832610 | ||
|
|
f93cd97f9b | ||
|
|
a997bb609f | ||
|
|
391b48614d | ||
|
|
e4a041b832 | ||
|
|
72ee4b189d | ||
|
|
c13c326171 | ||
|
|
d92bf3398e | ||
|
|
2961dc0bdd | ||
|
|
59d8d9a82c | ||
|
|
e4c81f763b | ||
|
|
c39ca7dba3 | ||
|
|
dca274afea | ||
|
|
340a2c6512 | ||
|
|
a640d437c8 | ||
|
|
6a8b94b0c7 | ||
|
|
c6618d0a5f | ||
|
|
22adb838e6 | ||
|
|
d15af6eb35 | ||
|
|
4875d49fa2 | ||
|
|
db6b3f07b4 | ||
|
|
30a19d345a | ||
|
|
d2be83dc44 | ||
|
|
8f9b0c9209 | ||
|
|
64a79341a7 | ||
|
|
89a3db9346 | ||
|
|
db62648510 | ||
|
|
635dd36727 | ||
|
|
0a3862ff80 | ||
|
|
3d6dac26f4 | ||
|
|
0bbc4f8219 | ||
|
|
a1b96a3135 | ||
|
|
efa3a234e9 | ||
|
|
86275bcc55 | ||
|
|
8adcce5c64 | ||
|
|
e0d54ed4b5 | ||
|
|
a06a5c8d18 | ||
|
|
0cafd7dfef | ||
|
|
1d6987c713 | ||
|
|
8e7a88335d | ||
|
|
b756390887 | ||
|
|
f1bf87665f | ||
|
|
1fb975c6e7 | ||
|
|
2073396d93 | ||
|
|
e12888c2c5 | ||
|
|
3fa751e9bb | ||
|
|
141661573a | ||
|
|
78dafb5399 | ||
|
|
36a109cb0f | ||
|
|
a064a93a8e | ||
|
|
7679ed037f | ||
|
|
40563dc6cc | ||
|
|
32469b3f65 | ||
|
|
3a65fb1da2 | ||
|
|
ec47c5b0f7 | ||
|
|
f3030812ea | ||
|
|
d6f3ca859e | ||
|
|
c05e8088d6 | ||
|
|
12c43cd769 | ||
|
|
0042b96c80 | ||
|
|
96ad22a009 | ||
|
|
07e7b13b75 | ||
|
|
cdcdeb5996 | ||
|
|
6c27e3a7f7 | ||
|
|
d22324d68d | ||
|
|
87812d1e7f | ||
|
|
68715bb1dc | ||
|
|
4eaeee7be2 | ||
|
|
6643ac3ea4 | ||
|
|
a445233192 | ||
|
|
c99b45dbe0 | ||
|
|
cf7e365610 | ||
|
|
5d855ee84c | ||
|
|
76d6b1fc2a | ||
|
|
9ccc259c99 | ||
|
|
95a5dd8810 | ||
|
|
33889e5352 | ||
|
|
a44936f97f | ||
|
|
75efe9cf0a | ||
|
|
e094c45abb | ||
|
|
443218e3f1 | ||
|
|
cff0ece073 | ||
|
|
d046c4f5f2 | ||
|
|
67cfd43c67 | ||
|
|
7d0ae2bca2 | ||
|
|
b27ad9af0b | ||
|
|
cd251799a4 | ||
|
|
1f02cf4b7e | ||
|
|
7ad0231430 | ||
|
|
4c95aee52e | ||
|
|
bbe2ca412b | ||
|
|
88aa5da354 | ||
|
|
b1ccd6bad9 | ||
|
|
79d18cf5a5 | ||
|
|
ea4c914123 | ||
|
|
bf01918659 | ||
|
|
0c1b9d3bff | ||
|
|
a8fde5e89c | ||
|
|
6d9ee138d6 | ||
|
|
a51798dd8d | ||
|
|
88f5471fe3 | ||
|
|
b7ebb67cbb | ||
|
|
3d3ec3588b | ||
|
|
0f8b3c6347 | ||
|
|
b0fd432126 | ||
|
|
170dd3adac | ||
|
|
9986a3d22c | ||
|
|
0584700a76 | ||
|
|
00ef953b8e | ||
|
|
f31457a457 | ||
|
|
9ff45cf969 | ||
|
|
589aa2416a | ||
|
|
baa2afb61e | ||
|
|
6ebb00549b | ||
|
|
76d3f60f06 | ||
|
|
69cf9e8fc4 | ||
|
|
6ffde49760 |
8
.copr/Makefile
Normal file
@@ -0,0 +1,8 @@
|
||||
srpm:
|
||||
dnf -y install git
|
||||
git submodule update --init --recursive
|
||||
cd deployment/fedora-package-x64; \
|
||||
./create_tarball.sh; \
|
||||
rpmbuild -bs pkg-src/jellyfin.spec \
|
||||
--define "_sourcedir $$PWD/pkg-src/" \
|
||||
--define "_srcrpmdir $(outdir)"
|
||||
@@ -1 +1,10 @@
|
||||
.git
|
||||
.dockerignore
|
||||
Dockerfile
|
||||
Dockerfile.arm
|
||||
Dockerfile.arm64
|
||||
CONTRIBUTORS.md
|
||||
README.md
|
||||
deployment/*/dist
|
||||
deployment/*/pkg-dist
|
||||
deployment/collect-dist/
|
||||
|
||||
28
.drone.yml
@@ -1,32 +1,12 @@
|
||||
kind: pipeline
|
||||
name: build:debian
|
||||
name: build
|
||||
|
||||
steps:
|
||||
- name: submodules
|
||||
image: docker:git
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
- name: build:debian
|
||||
image: plugins/docker
|
||||
group: build
|
||||
settings:
|
||||
repo: jellyfin/jellyfin
|
||||
dry_run: true
|
||||
dockerfile: Dockerfile.debian_package
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: build:docker
|
||||
|
||||
steps:
|
||||
- name: submodules
|
||||
image: docker:git
|
||||
- name: build
|
||||
image: microsoft/dotnet:2-sdk
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
- name: build:docker
|
||||
image: plugins/docker
|
||||
group: build
|
||||
settings:
|
||||
repo: jellyfin/jellyfin
|
||||
dry_run: true
|
||||
- dotnet publish --configuration release --output /release Jellyfin.Server
|
||||
|
||||
131
.editorconfig
Normal file
@@ -0,0 +1,131 @@
|
||||
# With more recent updates Visual Studio 2017 supports EditorConfig files out of the box
|
||||
# Visual Studio Code needs an extension: https://github.com/editorconfig/editorconfig-vscode
|
||||
# For emacs, vim, np++ and other editors, see here: https://github.com/editorconfig
|
||||
###############################
|
||||
# Core EditorConfig Options #
|
||||
###############################
|
||||
root = true
|
||||
# All files
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
max_line_length = null
|
||||
|
||||
# XML indentation
|
||||
[*.{csproj,xml}]
|
||||
indent_size = 2
|
||||
###############################
|
||||
# .NET Coding Conventions #
|
||||
###############################
|
||||
[*.{cs,vb}]
|
||||
# Organize usings
|
||||
dotnet_sort_system_directives_first = true
|
||||
# this. preferences
|
||||
dotnet_style_qualification_for_field = false:silent
|
||||
dotnet_style_qualification_for_property = false:silent
|
||||
dotnet_style_qualification_for_method = false:silent
|
||||
dotnet_style_qualification_for_event = false:silent
|
||||
# Language keywords vs BCL types preferences
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||
dotnet_style_predefined_type_for_member_access = true:silent
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
||||
# Modifier preferences
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
|
||||
dotnet_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||
###############################
|
||||
# Naming Conventions #
|
||||
###############################
|
||||
# Style Definitions
|
||||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
|
||||
# Use PascalCase for constant fields
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
|
||||
dotnet_naming_symbols.constant_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
|
||||
dotnet_naming_symbols.constant_fields.required_modifiers = const
|
||||
###############################
|
||||
# C# Coding Conventions #
|
||||
###############################
|
||||
[*.cs]
|
||||
# var preferences
|
||||
csharp_style_var_for_built_in_types = true:silent
|
||||
csharp_style_var_when_type_is_apparent = true:silent
|
||||
csharp_style_var_elsewhere = true:silent
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
# Pattern matching preferences
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
# Null-checking preferences
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
# Modifier preferences
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
|
||||
# Expression-level preferences
|
||||
csharp_prefer_braces = true:silent
|
||||
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||
csharp_prefer_simple_default_expression = true:suggestion
|
||||
csharp_style_pattern_local_over_anonymous_function = true:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
###############################
|
||||
# C# Formatting Rules #
|
||||
###############################
|
||||
# New line preferences
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
# Indentation preferences
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_indent_labels = flush_left
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
# Wrapping preferences
|
||||
csharp_preserve_single_line_statements = true
|
||||
csharp_preserve_single_line_blocks = true
|
||||
###############################
|
||||
# VB Coding Conventions #
|
||||
###############################
|
||||
[*.vb]
|
||||
# Modifier preferences
|
||||
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
|
||||
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a bug report
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
|
||||
**To Reproduce**
|
||||
<!-- Steps to reproduce the behavior: -->
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
**Logs**
|
||||
<!-- Please paste any log errors. -->
|
||||
|
||||
**Screenshots**
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
|
||||
**System (please complete the following information):**
|
||||
- OS: [e.g. Docker, Debian, Windows]
|
||||
- Browser: [e.g. Firefox, Chrome, Safari]
|
||||
- Jellyfin Version: [e.g. 10.0.1]
|
||||
|
||||
**Additional context**
|
||||
<!-- Add any other context about the problem here. -->
|
||||
20
.github/ISSUE_TEMPLATE/enhancement-request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Enhancement request
|
||||
about: Suggest an modification to an existing feature
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
**Describe the solution you'd like**
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||
|
||||
**Additional context**
|
||||
<!-- Add any other context or screenshots about the feature request here. -->
|
||||
14
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest a new feature
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the feature you'd like**
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
|
||||
**Additional context**
|
||||
<!-- Add any other context or screenshots about the feature request here. -->
|
||||
11
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<!--
|
||||
Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y).
|
||||
For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our https://jellyfin.readthedocs.io/en/latest/developer-docs/contributing/ page.
|
||||
-->
|
||||
|
||||
**Changes**
|
||||
<!-- Describe your changes here in 1-5 sentences. -->
|
||||
|
||||
**Issues**
|
||||
<!-- Tag any issues that this PR solves here.
|
||||
ex. Fixes # -->
|
||||
35
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
!*
|
||||
.directory
|
||||
|
||||
#################
|
||||
## Eclipse
|
||||
@@ -47,6 +47,8 @@ ProgramData-UI*/
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
.vs/
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
@@ -202,7 +204,6 @@ $RECYCLE.BIN/
|
||||
# Mac crap
|
||||
.DS_Store
|
||||
|
||||
|
||||
#############
|
||||
## Python
|
||||
#############
|
||||
@@ -232,22 +233,34 @@ pip-log.txt
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
||||
MediaBrowser.WebDashboard/dashboard-ui/.idea/
|
||||
/.vs
|
||||
|
||||
##########
|
||||
# Rider
|
||||
##########
|
||||
.idea/
|
||||
|
||||
##########
|
||||
# Visual Studio Code
|
||||
##########
|
||||
.vscode/
|
||||
|
||||
#########################
|
||||
# Debian build artifacts
|
||||
# Build artifacts
|
||||
#########################
|
||||
|
||||
debian/.debhelper/
|
||||
debian/files
|
||||
debian/jellyfin.substvars
|
||||
debian/jellyfin/
|
||||
|
||||
# Artifacts for debian-x64
|
||||
deployment/debian-package-x64/pkg-src/.debhelper/
|
||||
deployment/debian-package-x64/pkg-src/*.debhelper
|
||||
deployment/debian-package-x64/pkg-src/debhelper-build-stamp
|
||||
deployment/debian-package-x64/pkg-src/files
|
||||
deployment/debian-package-x64/pkg-src/jellyfin.substvars
|
||||
deployment/debian-package-x64/pkg-src/jellyfin/
|
||||
# Don't ignore the debian/bin folder
|
||||
!debian/bin/
|
||||
!deployment/debian-package-x64/pkg-src/bin/
|
||||
|
||||
deployment/**/dist/
|
||||
deployment/**/pkg-dist/
|
||||
deployment/**/pkg-dist-tmp/
|
||||
deployment/collect-dist/
|
||||
|
||||
jellyfin_version.ini
|
||||
|
||||
7
.gitmodules
vendored
@@ -1,3 +1,4 @@
|
||||
[submodule "ThirdParty/taglib-sharp"]
|
||||
path = ThirdParty/taglib-sharp
|
||||
url = https://github.com/mono/taglib-sharp.git
|
||||
[submodule "MediaBrowser.WebDashboard/jellyfin-web"]
|
||||
path = MediaBrowser.WebDashboard/jellyfin-web
|
||||
url = https://github.com/jellyfin/jellyfin-web.git
|
||||
branch = .
|
||||
|
||||
28
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||
// Use hover for the description of the existing attributes
|
||||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": ".NET Core Launch (console)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/Jellyfin.Server/bin/Debug/netcoreapp2.1/jellyfin.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/Jellyfin.Server",
|
||||
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
|
||||
"console": "internalConsole",
|
||||
"stopAtEntry": false,
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": ".NET Core Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processId": "${command:pickProcess}"
|
||||
}
|
||||
,]
|
||||
}
|
||||
15
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/Jellyfin.Server/Jellyfin.Server.csproj"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SharedVersion.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
|
||||
|
||||
@@ -1,105 +1,33 @@
|
||||
|
||||
|
||||
namespace BDInfo
|
||||
{
|
||||
class BDInfoSettings
|
||||
{
|
||||
public static bool GenerateStreamDiagnostics
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public static bool GenerateStreamDiagnostics => true;
|
||||
|
||||
public static bool EnableSSIF
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public static bool EnableSSIF => true;
|
||||
|
||||
public static bool AutosaveReport
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static bool AutosaveReport => false;
|
||||
|
||||
public static bool GenerateFrameDataFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static bool GenerateFrameDataFile => false;
|
||||
|
||||
public static bool FilterLoopingPlaylists
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public static bool FilterLoopingPlaylists => true;
|
||||
|
||||
public static bool FilterShortPlaylists
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static bool FilterShortPlaylists => false;
|
||||
|
||||
public static int FilterShortPlaylistsValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
public static int FilterShortPlaylistsValue => 0;
|
||||
|
||||
public static bool UseImagePrefix
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static bool UseImagePrefix => false;
|
||||
|
||||
public static string UseImagePrefixValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static string UseImagePrefixValue => null;
|
||||
|
||||
/// <summary>
|
||||
/// Setting this to false throws an IComparer error on some discs.
|
||||
/// </summary>
|
||||
public static bool KeepStreamOrder
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public static bool KeepStreamOrder => true;
|
||||
|
||||
public static bool GenerateTextSummary
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static bool GenerateTextSummary => false;
|
||||
|
||||
public static string LastPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
public static string LastPath => string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -22,7 +22,6 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Text;
|
||||
|
||||
namespace BDInfo
|
||||
{
|
||||
@@ -72,12 +71,11 @@ namespace BDInfo
|
||||
|
||||
public event OnPlaylistFileScanError PlaylistFileScanError;
|
||||
|
||||
public BDROM(
|
||||
string path, IFileSystem fileSystem, ITextEncoding textEncoding)
|
||||
public BDROM(string path, IFileSystem fileSystem)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
throw new ArgumentNullException("path");
|
||||
throw new ArgumentNullException(nameof(path));
|
||||
}
|
||||
|
||||
_fileSystem = fileSystem;
|
||||
@@ -94,7 +92,7 @@ namespace BDInfo
|
||||
}
|
||||
|
||||
DirectoryRoot =
|
||||
_fileSystem.GetDirectoryInfo(_fileSystem.GetDirectoryName(DirectoryBDMV.FullName));
|
||||
_fileSystem.GetDirectoryInfo(Path.GetDirectoryName(DirectoryBDMV.FullName));
|
||||
DirectoryBDJO =
|
||||
GetDirectory("BDJO", DirectoryBDMV, 0);
|
||||
DirectoryCLIPINF =
|
||||
@@ -152,7 +150,7 @@ namespace BDInfo
|
||||
Is3D = true;
|
||||
}
|
||||
|
||||
if (_fileSystem.FileExists(Path.Combine(DirectoryRoot.FullName, "FilmIndex.xml")))
|
||||
if (File.Exists(Path.Combine(DirectoryRoot.FullName, "FilmIndex.xml")))
|
||||
{
|
||||
IsDBOX = true;
|
||||
}
|
||||
@@ -164,17 +162,17 @@ namespace BDInfo
|
||||
if (DirectoryPLAYLIST != null)
|
||||
{
|
||||
FileSystemMetadata[] files = GetFiles(DirectoryPLAYLIST.FullName, ".mpls").ToArray();
|
||||
foreach (FileSystemMetadata file in files)
|
||||
foreach (var file in files)
|
||||
{
|
||||
PlaylistFiles.Add(
|
||||
file.Name.ToUpper(), new TSPlaylistFile(this, file, _fileSystem, textEncoding));
|
||||
file.Name.ToUpper(), new TSPlaylistFile(this, file, _fileSystem));
|
||||
}
|
||||
}
|
||||
|
||||
if (DirectorySTREAM != null)
|
||||
{
|
||||
FileSystemMetadata[] files = GetFiles(DirectorySTREAM.FullName, ".m2ts").ToArray();
|
||||
foreach (FileSystemMetadata file in files)
|
||||
foreach (var file in files)
|
||||
{
|
||||
StreamFiles.Add(
|
||||
file.Name.ToUpper(), new TSStreamFile(file, _fileSystem));
|
||||
@@ -184,17 +182,17 @@ namespace BDInfo
|
||||
if (DirectoryCLIPINF != null)
|
||||
{
|
||||
FileSystemMetadata[] files = GetFiles(DirectoryCLIPINF.FullName, ".clpi").ToArray();
|
||||
foreach (FileSystemMetadata file in files)
|
||||
foreach (var file in files)
|
||||
{
|
||||
StreamClipFiles.Add(
|
||||
file.Name.ToUpper(), new TSStreamClipFile(file, _fileSystem, textEncoding));
|
||||
file.Name.ToUpper(), new TSStreamClipFile(file, _fileSystem));
|
||||
}
|
||||
}
|
||||
|
||||
if (DirectorySSIF != null)
|
||||
{
|
||||
FileSystemMetadata[] files = GetFiles(DirectorySSIF.FullName, ".ssif").ToArray();
|
||||
foreach (FileSystemMetadata file in files)
|
||||
foreach (var file in files)
|
||||
{
|
||||
InterleavedFiles.Add(
|
||||
file.Name.ToUpper(), new TSInterleavedFile(file));
|
||||
@@ -214,8 +212,8 @@ namespace BDInfo
|
||||
|
||||
public void Scan()
|
||||
{
|
||||
List<TSStreamClipFile> errorStreamClipFiles = new List<TSStreamClipFile>();
|
||||
foreach (TSStreamClipFile streamClipFile in StreamClipFiles.Values)
|
||||
var errorStreamClipFiles = new List<TSStreamClipFile>();
|
||||
foreach (var streamClipFile in StreamClipFiles.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -235,11 +233,11 @@ namespace BDInfo
|
||||
break;
|
||||
}
|
||||
}
|
||||
else throw ex;
|
||||
else throw;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (TSStreamFile streamFile in StreamFiles.Values)
|
||||
foreach (var streamFile in StreamFiles.Values)
|
||||
{
|
||||
string ssifName = Path.GetFileNameWithoutExtension(streamFile.Name) + ".SSIF";
|
||||
if (InterleavedFiles.ContainsKey(ssifName))
|
||||
@@ -252,8 +250,8 @@ namespace BDInfo
|
||||
StreamFiles.Values.CopyTo(streamFiles, 0);
|
||||
Array.Sort(streamFiles, CompareStreamFiles);
|
||||
|
||||
List<TSPlaylistFile> errorPlaylistFiles = new List<TSPlaylistFile>();
|
||||
foreach (TSPlaylistFile playlistFile in PlaylistFiles.Values)
|
||||
var errorPlaylistFiles = new List<TSPlaylistFile>();
|
||||
foreach (var playlistFile in PlaylistFiles.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -273,19 +271,19 @@ namespace BDInfo
|
||||
break;
|
||||
}
|
||||
}
|
||||
else throw ex;
|
||||
else throw;
|
||||
}
|
||||
}
|
||||
|
||||
List<TSStreamFile> errorStreamFiles = new List<TSStreamFile>();
|
||||
foreach (TSStreamFile streamFile in streamFiles)
|
||||
var errorStreamFiles = new List<TSStreamFile>();
|
||||
foreach (var streamFile in streamFiles)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<TSPlaylistFile> playlists = new List<TSPlaylistFile>();
|
||||
foreach (TSPlaylistFile playlist in PlaylistFiles.Values)
|
||||
var playlists = new List<TSPlaylistFile>();
|
||||
foreach (var playlist in PlaylistFiles.Values)
|
||||
{
|
||||
foreach (TSStreamClip streamClip in playlist.StreamClips)
|
||||
foreach (var streamClip in playlist.StreamClips)
|
||||
{
|
||||
if (streamClip.Name == streamFile.Name)
|
||||
{
|
||||
@@ -310,16 +308,16 @@ namespace BDInfo
|
||||
break;
|
||||
}
|
||||
}
|
||||
else throw ex;
|
||||
else throw;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (TSPlaylistFile playlistFile in PlaylistFiles.Values)
|
||||
foreach (var playlistFile in PlaylistFiles.Values)
|
||||
{
|
||||
playlistFile.Initialize();
|
||||
if (!Is50Hz)
|
||||
{
|
||||
foreach (TSVideoStream videoStream in playlistFile.VideoStreams)
|
||||
foreach (var videoStream in playlistFile.VideoStreams)
|
||||
{
|
||||
if (videoStream.FrameRate == TSFrameRate.FRAMERATE_25 ||
|
||||
videoStream.FrameRate == TSFrameRate.FRAMERATE_50)
|
||||
@@ -336,7 +334,7 @@ namespace BDInfo
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
throw new ArgumentNullException("path");
|
||||
throw new ArgumentNullException(nameof(path));
|
||||
}
|
||||
|
||||
FileSystemMetadata dir = _fileSystem.GetDirectoryInfo(path);
|
||||
@@ -347,7 +345,7 @@ namespace BDInfo
|
||||
{
|
||||
return dir;
|
||||
}
|
||||
var parentFolder = _fileSystem.GetDirectoryName(dir.FullName);
|
||||
var parentFolder = Path.GetDirectoryName(dir.FullName);
|
||||
if (string.IsNullOrEmpty(parentFolder))
|
||||
{
|
||||
dir = null;
|
||||
@@ -369,7 +367,7 @@ namespace BDInfo
|
||||
if (dir != null)
|
||||
{
|
||||
FileSystemMetadata[] children = _fileSystem.GetDirectories(dir.FullName).ToArray();
|
||||
foreach (FileSystemMetadata child in children)
|
||||
foreach (var child in children)
|
||||
{
|
||||
if (string.Equals(child.Name, name, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -378,7 +376,7 @@ namespace BDInfo
|
||||
}
|
||||
if (searchDepth > 0)
|
||||
{
|
||||
foreach (FileSystemMetadata child in children)
|
||||
foreach (var child in children)
|
||||
{
|
||||
GetDirectory(
|
||||
name, child, searchDepth - 1);
|
||||
@@ -395,7 +393,7 @@ namespace BDInfo
|
||||
//if (!ExcludeDirs.Contains(directoryInfo.Name.ToUpper())) // TODO: Keep?
|
||||
{
|
||||
FileSystemMetadata[] pathFiles = _fileSystem.GetFiles(directoryInfo.FullName).ToArray();
|
||||
foreach (FileSystemMetadata pathFile in pathFiles)
|
||||
foreach (var pathFile in pathFiles)
|
||||
{
|
||||
if (pathFile.Extension.ToUpper() == ".SSIF")
|
||||
{
|
||||
@@ -405,7 +403,7 @@ namespace BDInfo
|
||||
}
|
||||
|
||||
FileSystemMetadata[] pathChildren = _fileSystem.GetDirectories(directoryInfo.FullName).ToArray();
|
||||
foreach (FileSystemMetadata pathChild in pathChildren)
|
||||
foreach (var pathChild in pathChildren)
|
||||
{
|
||||
size += GetDirectorySize(pathChild);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
|
||||
@@ -1,29 +1,21 @@
|
||||
using System.Resources;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Resources;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("BDInfo")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("BDInfo")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyCompany("Jellyfin Project")]
|
||||
[assembly: AssemblyProduct("Jellyfin: The Free Software Media System")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016 CinemaSquid. Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License Version 2")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: NeutralResourcesLanguage("en")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.1")]
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
The source is taken from the BDRom folder of this project:
|
||||
The source is taken from the BDRom folder of this project:
|
||||
|
||||
http://www.cinemasquid.com/blu-ray/tools/bdinfo
|
||||
|
||||
BDInfoSettings was taken from the FormSettings class, and changed so that the settings all return defaults.
|
||||
BDInfoSettings was taken from the FormSettings class, and changed so that the settings all return defaults.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -24,7 +24,7 @@ namespace BDInfo
|
||||
{
|
||||
public abstract class TSCodecAC3
|
||||
{
|
||||
private static byte[] eac3_blocks = new byte[] { 1, 2, 3, 6 };
|
||||
private static byte[] eac3_blocks = new byte[] { 1, 2, 3, 6 };
|
||||
|
||||
public static void Scan(
|
||||
TSAudioStream stream,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -148,7 +148,7 @@ namespace BDInfo
|
||||
stream.IsVBR = true;
|
||||
stream.IsInitialized = true;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
stream.IsVBR = false;
|
||||
stream.IsInitialized = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -22,9 +22,9 @@ namespace BDInfo
|
||||
{
|
||||
public abstract class TSCodecDTSHD
|
||||
{
|
||||
private static int[] SampleRates = new int[]
|
||||
private static int[] SampleRates = new int[]
|
||||
{ 0x1F40, 0x3E80, 0x7D00, 0x0FA00, 0x1F400, 0x5622, 0x0AC44, 0x15888, 0x2B110, 0x56220, 0x2EE0, 0x5DC0, 0x0BB80, 0x17700, 0x2EE00, 0x5DC00 };
|
||||
|
||||
|
||||
public static void Scan(
|
||||
TSAudioStream stream,
|
||||
TSStreamBuffer buffer,
|
||||
@@ -131,7 +131,7 @@ namespace BDInfo
|
||||
else
|
||||
{
|
||||
AssetSizes[i] = buffer.ReadBits(16) + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < nuNumAssets; i++)
|
||||
{
|
||||
@@ -189,7 +189,7 @@ namespace BDInfo
|
||||
}
|
||||
stream.SampleRate = SampleRates[nuMaxSampleRate];
|
||||
stream.BitDepth = nuBitResolution;
|
||||
|
||||
|
||||
stream.LFE = 0;
|
||||
if ((nuSpkrActivityMask & 0x8) == 0x8)
|
||||
{
|
||||
@@ -211,7 +211,7 @@ namespace BDInfo
|
||||
// TODO
|
||||
if (stream.CoreStream != null)
|
||||
{
|
||||
TSAudioStream coreStream = (TSAudioStream)stream.CoreStream;
|
||||
var coreStream = (TSAudioStream)stream.CoreStream;
|
||||
if (coreStream.AudioMode == TSAudioMode.Extended &&
|
||||
stream.ChannelCount == 5)
|
||||
{
|
||||
@@ -240,7 +240,7 @@ namespace BDInfo
|
||||
stream.IsInitialized = true;
|
||||
}
|
||||
stream.IsInitialized = (stream.BitRate > 0 ? true : false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -33,7 +33,7 @@ namespace BDInfo
|
||||
int pictureParse = 0;
|
||||
int sequenceHeaderParse = 0;
|
||||
int extensionParse = 0;
|
||||
int sequenceExtensionParse = 0;
|
||||
int sequenceExtensionParse = 0;
|
||||
|
||||
for (int i = 0; i < buffer.Length; i++)
|
||||
{
|
||||
@@ -189,7 +189,7 @@ namespace BDInfo
|
||||
#if DEBUG
|
||||
if (sequenceExtensionParse == 0)
|
||||
{
|
||||
uint sequenceExtension =
|
||||
uint sequenceExtension =
|
||||
((parse & 0x8) >> 3);
|
||||
if (sequenceExtension == 0)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -36,7 +36,7 @@ namespace BDInfo
|
||||
for (int i = 0; i < buffer.Length; i++)
|
||||
{
|
||||
sync = (sync << 8) + buffer.ReadByte();
|
||||
if (sync == 0xF8726FBA)
|
||||
if (sync == 0xF8726FBA)
|
||||
{
|
||||
syncFound = true;
|
||||
break;
|
||||
@@ -63,7 +63,7 @@ namespace BDInfo
|
||||
int ratebits = buffer.ReadBits(4);
|
||||
if (ratebits != 0xF)
|
||||
{
|
||||
stream.SampleRate =
|
||||
stream.SampleRate =
|
||||
(((ratebits & 8) > 0 ? 44100 : 48000) << (ratebits & 7));
|
||||
}
|
||||
int temp1 = buffer.ReadBits(8);
|
||||
@@ -149,9 +149,9 @@ namespace BDInfo
|
||||
int peak_bitrate = buffer.ReadBits(15);
|
||||
peak_bitrate = (peak_bitrate * stream.SampleRate) >> 4;
|
||||
|
||||
double peak_bitdepth =
|
||||
(double)peak_bitrate /
|
||||
(stream.ChannelCount + stream.LFE) /
|
||||
double peak_bitdepth =
|
||||
(double)peak_bitrate /
|
||||
(stream.ChannelCount + stream.LFE) /
|
||||
stream.SampleRate;
|
||||
if (peak_bitdepth > 14)
|
||||
{
|
||||
@@ -164,7 +164,7 @@ namespace BDInfo
|
||||
|
||||
#if DEBUG
|
||||
System.Diagnostics.Debug.WriteLine(string.Format(
|
||||
"{0}\t{1}\t{2:F2}",
|
||||
"{0}\t{1}\t{2:F2}",
|
||||
stream.PID, peak_bitrate, peak_bitdepth));
|
||||
#endif
|
||||
/*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -50,18 +50,18 @@ namespace BDInfo
|
||||
{
|
||||
if ((parse & 0x80000000) == 0)
|
||||
{
|
||||
pictureType =
|
||||
pictureType =
|
||||
(uint)((parse & 0x78000000) >> 13);
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureType =
|
||||
pictureType =
|
||||
(uint)((parse & 0x3c000000) >> 12);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureType =
|
||||
pictureType =
|
||||
(uint)((parse & 0xf0000000) >> 14);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -17,7 +17,6 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//=============================================================================
|
||||
|
||||
using System.IO;
|
||||
using MediaBrowser.Model.IO;
|
||||
|
||||
// TODO: Do more interesting things here...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -23,14 +23,12 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Text;
|
||||
|
||||
namespace BDInfo
|
||||
{
|
||||
public class TSPlaylistFile
|
||||
{
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ITextEncoding _textEncoding;
|
||||
private FileSystemMetadata FileInfo = null;
|
||||
public string FileType = null;
|
||||
public bool IsInitialized = false;
|
||||
@@ -42,7 +40,7 @@ namespace BDInfo
|
||||
|
||||
public List<double> Chapters = new List<double>();
|
||||
|
||||
public Dictionary<ushort, TSStream> Streams =
|
||||
public Dictionary<ushort, TSStream> Streams =
|
||||
new Dictionary<ushort, TSStream>();
|
||||
public Dictionary<ushort, TSStream> PlaylistStreams =
|
||||
new Dictionary<ushort, TSStream>();
|
||||
@@ -50,45 +48,41 @@ namespace BDInfo
|
||||
new List<TSStreamClip>();
|
||||
public List<Dictionary<ushort, TSStream>> AngleStreams =
|
||||
new List<Dictionary<ushort, TSStream>>();
|
||||
public List<Dictionary<double, TSStreamClip>> AngleClips =
|
||||
public List<Dictionary<double, TSStreamClip>> AngleClips =
|
||||
new List<Dictionary<double, TSStreamClip>>();
|
||||
public int AngleCount = 0;
|
||||
|
||||
public List<TSStream> SortedStreams =
|
||||
public List<TSStream> SortedStreams =
|
||||
new List<TSStream>();
|
||||
public List<TSVideoStream> VideoStreams =
|
||||
public List<TSVideoStream> VideoStreams =
|
||||
new List<TSVideoStream>();
|
||||
public List<TSAudioStream> AudioStreams =
|
||||
public List<TSAudioStream> AudioStreams =
|
||||
new List<TSAudioStream>();
|
||||
public List<TSTextStream> TextStreams =
|
||||
public List<TSTextStream> TextStreams =
|
||||
new List<TSTextStream>();
|
||||
public List<TSGraphicsStream> GraphicsStreams =
|
||||
public List<TSGraphicsStream> GraphicsStreams =
|
||||
new List<TSGraphicsStream>();
|
||||
|
||||
public TSPlaylistFile(
|
||||
BDROM bdrom,
|
||||
FileSystemMetadata fileInfo, IFileSystem fileSystem, ITextEncoding textEncoding)
|
||||
public TSPlaylistFile(BDROM bdrom,
|
||||
FileSystemMetadata fileInfo, IFileSystem fileSystem)
|
||||
{
|
||||
BDROM = bdrom;
|
||||
FileInfo = fileInfo;
|
||||
_fileSystem = fileSystem;
|
||||
_textEncoding = textEncoding;
|
||||
Name = fileInfo.Name.ToUpper();
|
||||
}
|
||||
|
||||
public TSPlaylistFile(
|
||||
BDROM bdrom,
|
||||
public TSPlaylistFile(BDROM bdrom,
|
||||
string name,
|
||||
List<TSStreamClip> clips, IFileSystem fileSystem, ITextEncoding textEncoding)
|
||||
List<TSStreamClip> clips, IFileSystem fileSystem)
|
||||
{
|
||||
BDROM = bdrom;
|
||||
Name = name;
|
||||
_fileSystem = fileSystem;
|
||||
_textEncoding = textEncoding;
|
||||
IsCustom = true;
|
||||
foreach (TSStreamClip clip in clips)
|
||||
foreach (var clip in clips)
|
||||
{
|
||||
TSStreamClip newClip = new TSStreamClip(
|
||||
var newClip = new TSStreamClip(
|
||||
clip.StreamFile, clip.StreamClipFile);
|
||||
|
||||
newClip.Name = clip.Name;
|
||||
@@ -124,7 +118,7 @@ namespace BDInfo
|
||||
get
|
||||
{
|
||||
ulong size = 0;
|
||||
foreach (TSStreamClip clip in StreamClips)
|
||||
foreach (var clip in StreamClips)
|
||||
{
|
||||
size += clip.InterleavedFileSize;
|
||||
}
|
||||
@@ -136,7 +130,7 @@ namespace BDInfo
|
||||
get
|
||||
{
|
||||
ulong size = 0;
|
||||
foreach (TSStreamClip clip in StreamClips)
|
||||
foreach (var clip in StreamClips)
|
||||
{
|
||||
size += clip.FileSize;
|
||||
}
|
||||
@@ -148,7 +142,7 @@ namespace BDInfo
|
||||
get
|
||||
{
|
||||
double length = 0;
|
||||
foreach (TSStreamClip clip in StreamClips)
|
||||
foreach (var clip in StreamClips)
|
||||
{
|
||||
if (clip.AngleIndex == 0)
|
||||
{
|
||||
@@ -164,7 +158,7 @@ namespace BDInfo
|
||||
get
|
||||
{
|
||||
double length = 0;
|
||||
foreach (TSStreamClip clip in StreamClips)
|
||||
foreach (var clip in StreamClips)
|
||||
{
|
||||
length += clip.Length;
|
||||
}
|
||||
@@ -177,7 +171,7 @@ namespace BDInfo
|
||||
get
|
||||
{
|
||||
ulong size = 0;
|
||||
foreach (TSStreamClip clip in StreamClips)
|
||||
foreach (var clip in StreamClips)
|
||||
{
|
||||
if (clip.AngleIndex == 0)
|
||||
{
|
||||
@@ -193,7 +187,7 @@ namespace BDInfo
|
||||
get
|
||||
{
|
||||
ulong size = 0;
|
||||
foreach (TSStreamClip clip in StreamClips)
|
||||
foreach (var clip in StreamClips)
|
||||
{
|
||||
size += clip.PacketSize;
|
||||
}
|
||||
@@ -237,7 +231,7 @@ namespace BDInfo
|
||||
Streams.Clear();
|
||||
StreamClips.Clear();
|
||||
|
||||
fileStream = _fileSystem.OpenRead(FileInfo.FullName);
|
||||
fileStream = File.OpenRead(FileInfo.FullName);
|
||||
fileReader = new BinaryReader(fileStream);
|
||||
|
||||
byte[] data = new byte[fileStream.Length];
|
||||
@@ -264,7 +258,7 @@ namespace BDInfo
|
||||
int itemCount = ReadInt16(data, ref pos);
|
||||
int subitemCount = ReadInt16(data, ref pos);
|
||||
|
||||
List<TSStreamClip> chapterClips = new List<TSStreamClip>();
|
||||
var chapterClips = new List<TSStreamClip>();
|
||||
for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
|
||||
{
|
||||
int itemStart = pos;
|
||||
@@ -311,7 +305,7 @@ namespace BDInfo
|
||||
if (outTime < 0) outTime &= 0x7FFFFFFF;
|
||||
double timeOut = (double)outTime / 45000;
|
||||
|
||||
TSStreamClip streamClip = new TSStreamClip(
|
||||
var streamClip = new TSStreamClip(
|
||||
streamFile, streamClipFile);
|
||||
|
||||
streamClip.Name = streamFileName; //TODO
|
||||
@@ -362,7 +356,7 @@ namespace BDInfo
|
||||
FileInfo.Name, angleClipFileName));
|
||||
}
|
||||
|
||||
TSStreamClip angleClip =
|
||||
var angleClip =
|
||||
new TSStreamClip(angleFile, angleClipFile);
|
||||
angleClip.AngleIndex = angle + 1;
|
||||
angleClip.TimeIn = streamClip.TimeIn;
|
||||
@@ -388,46 +382,46 @@ namespace BDInfo
|
||||
|
||||
#if DEBUG
|
||||
Debug.WriteLine(string.Format(
|
||||
"{0} : {1} -> V:{2} A:{3} PG:{4} IG:{5} 2A:{6} 2V:{7} PIP:{8}",
|
||||
Name, streamFileName, streamCountVideo, streamCountAudio, streamCountPG, streamCountIG,
|
||||
"{0} : {1} -> V:{2} A:{3} PG:{4} IG:{5} 2A:{6} 2V:{7} PIP:{8}",
|
||||
Name, streamFileName, streamCountVideo, streamCountAudio, streamCountPG, streamCountIG,
|
||||
streamCountSecondaryAudio, streamCountSecondaryVideo, streamCountPIP));
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < streamCountVideo; i++)
|
||||
{
|
||||
TSStream stream = CreatePlaylistStream(data, ref pos);
|
||||
var stream = CreatePlaylistStream(data, ref pos);
|
||||
if (stream != null) PlaylistStreams[stream.PID] = stream;
|
||||
}
|
||||
for (int i = 0; i < streamCountAudio; i++)
|
||||
{
|
||||
TSStream stream = CreatePlaylistStream(data, ref pos);
|
||||
var stream = CreatePlaylistStream(data, ref pos);
|
||||
if (stream != null) PlaylistStreams[stream.PID] = stream;
|
||||
}
|
||||
for (int i = 0; i < streamCountPG; i++)
|
||||
{
|
||||
TSStream stream = CreatePlaylistStream(data, ref pos);
|
||||
var stream = CreatePlaylistStream(data, ref pos);
|
||||
if (stream != null) PlaylistStreams[stream.PID] = stream;
|
||||
}
|
||||
for (int i = 0; i < streamCountIG; i++)
|
||||
{
|
||||
TSStream stream = CreatePlaylistStream(data, ref pos);
|
||||
var stream = CreatePlaylistStream(data, ref pos);
|
||||
if (stream != null) PlaylistStreams[stream.PID] = stream;
|
||||
}
|
||||
for (int i = 0; i < streamCountSecondaryAudio; i++)
|
||||
{
|
||||
TSStream stream = CreatePlaylistStream(data, ref pos);
|
||||
var stream = CreatePlaylistStream(data, ref pos);
|
||||
if (stream != null) PlaylistStreams[stream.PID] = stream;
|
||||
pos += 2;
|
||||
}
|
||||
for (int i = 0; i < streamCountSecondaryVideo; i++)
|
||||
{
|
||||
TSStream stream = CreatePlaylistStream(data, ref pos);
|
||||
var stream = CreatePlaylistStream(data, ref pos);
|
||||
if (stream != null) PlaylistStreams[stream.PID] = stream;
|
||||
pos += 6;
|
||||
}
|
||||
/*
|
||||
* TODO
|
||||
*
|
||||
*
|
||||
for (int i = 0; i < streamCountPIP; i++)
|
||||
{
|
||||
TSStream stream = CreatePlaylistStream(data, ref pos);
|
||||
@@ -446,7 +440,7 @@ namespace BDInfo
|
||||
chapterIndex < chapterCount;
|
||||
chapterIndex++)
|
||||
{
|
||||
int chapterType = data[pos+1];
|
||||
int chapterType = data[pos + 1];
|
||||
|
||||
if (chapterType == 1)
|
||||
{
|
||||
@@ -459,7 +453,7 @@ namespace BDInfo
|
||||
((long)data[pos + 6] << 8) +
|
||||
((long)data[pos + 7]);
|
||||
|
||||
TSStreamClip streamClip = chapterClips[streamFileIndex];
|
||||
var streamClip = chapterClips[streamFileIndex];
|
||||
|
||||
double chapterSeconds = (double)chapterTime / 45000;
|
||||
|
||||
@@ -499,8 +493,8 @@ namespace BDInfo
|
||||
{
|
||||
LoadStreamClips();
|
||||
|
||||
Dictionary<string, List<double>> clipTimes = new Dictionary<string, List<double>>();
|
||||
foreach (TSStreamClip clip in StreamClips)
|
||||
var clipTimes = new Dictionary<string, List<double>>();
|
||||
foreach (var clip in StreamClips)
|
||||
{
|
||||
if (clip.AngleIndex == 0)
|
||||
{
|
||||
@@ -568,7 +562,7 @@ namespace BDInfo
|
||||
int streamLength = data[pos++];
|
||||
int streamPos = pos;
|
||||
|
||||
TSStreamType streamType = (TSStreamType)data[pos++];
|
||||
var streamType = (TSStreamType)data[pos++];
|
||||
switch (streamType)
|
||||
{
|
||||
case TSStreamType.MVC_VIDEO:
|
||||
@@ -580,11 +574,11 @@ namespace BDInfo
|
||||
case TSStreamType.MPEG2_VIDEO:
|
||||
case TSStreamType.VC1_VIDEO:
|
||||
|
||||
TSVideoFormat videoFormat = (TSVideoFormat)
|
||||
var videoFormat = (TSVideoFormat)
|
||||
(data[pos] >> 4);
|
||||
TSFrameRate frameRate = (TSFrameRate)
|
||||
var frameRate = (TSFrameRate)
|
||||
(data[pos] & 0xF);
|
||||
TSAspectRatio aspectRatio = (TSAspectRatio)
|
||||
var aspectRatio = (TSAspectRatio)
|
||||
(data[pos + 1] >> 4);
|
||||
|
||||
stream = new TSVideoStream();
|
||||
@@ -618,9 +612,9 @@ namespace BDInfo
|
||||
|
||||
int audioFormat = ReadByte(data, ref pos);
|
||||
|
||||
TSChannelLayout channelLayout = (TSChannelLayout)
|
||||
var channelLayout = (TSChannelLayout)
|
||||
(audioFormat >> 4);
|
||||
TSSampleRate sampleRate = (TSSampleRate)
|
||||
var sampleRate = (TSSampleRate)
|
||||
(audioFormat & 0xF);
|
||||
|
||||
string audioLanguage = ReadString(data, 3, ref pos);
|
||||
@@ -713,7 +707,7 @@ namespace BDInfo
|
||||
{
|
||||
referenceClip = StreamClips[0];
|
||||
}
|
||||
foreach (TSStreamClip clip in StreamClips)
|
||||
foreach (var clip in StreamClips)
|
||||
{
|
||||
if (clip.StreamClipFile.Streams.Count > referenceClip.StreamClipFile.Streams.Count)
|
||||
{
|
||||
@@ -739,12 +733,12 @@ namespace BDInfo
|
||||
}
|
||||
}
|
||||
|
||||
foreach (TSStream clipStream
|
||||
foreach (var clipStream
|
||||
in referenceClip.StreamClipFile.Streams.Values)
|
||||
{
|
||||
if (!Streams.ContainsKey(clipStream.PID))
|
||||
{
|
||||
TSStream stream = clipStream.Clone();
|
||||
var stream = clipStream.Clone();
|
||||
Streams[clipStream.PID] = stream;
|
||||
|
||||
if (!IsCustom && !PlaylistStreams.ContainsKey(stream.PID))
|
||||
@@ -780,7 +774,7 @@ namespace BDInfo
|
||||
referenceClip.StreamFile.Streams.ContainsKey(4114) &&
|
||||
!Streams.ContainsKey(4114))
|
||||
{
|
||||
TSStream stream = referenceClip.StreamFile.Streams[4114].Clone();
|
||||
var stream = referenceClip.StreamFile.Streams[4114].Clone();
|
||||
Streams[4114] = stream;
|
||||
if (stream.IsVideoStream)
|
||||
{
|
||||
@@ -788,12 +782,12 @@ namespace BDInfo
|
||||
}
|
||||
}
|
||||
|
||||
foreach (TSStream clipStream
|
||||
foreach (var clipStream
|
||||
in referenceClip.StreamFile.Streams.Values)
|
||||
{
|
||||
if (Streams.ContainsKey(clipStream.PID))
|
||||
{
|
||||
TSStream stream = Streams[clipStream.PID];
|
||||
var stream = Streams[clipStream.PID];
|
||||
|
||||
if (stream.StreamType != clipStream.StreamType) continue;
|
||||
|
||||
@@ -812,8 +806,8 @@ namespace BDInfo
|
||||
else if (stream.IsAudioStream &&
|
||||
clipStream.IsAudioStream)
|
||||
{
|
||||
TSAudioStream audioStream = (TSAudioStream)stream;
|
||||
TSAudioStream clipAudioStream = (TSAudioStream)clipStream;
|
||||
var audioStream = (TSAudioStream)stream;
|
||||
var clipAudioStream = (TSAudioStream)clipStream;
|
||||
|
||||
if (clipAudioStream.ChannelCount > audioStream.ChannelCount)
|
||||
{
|
||||
@@ -864,7 +858,7 @@ namespace BDInfo
|
||||
SortedStreams.Add(stream);
|
||||
for (int i = 0; i < AngleCount; i++)
|
||||
{
|
||||
TSStream angleStream = stream.Clone();
|
||||
var angleStream = stream.Clone();
|
||||
angleStream.AngleIndex = i + 1;
|
||||
AngleStreams[i][angleStream.PID] = angleStream;
|
||||
SortedStreams.Add(angleStream);
|
||||
@@ -901,7 +895,7 @@ namespace BDInfo
|
||||
|
||||
public void ClearBitrates()
|
||||
{
|
||||
foreach (TSStreamClip clip in StreamClips)
|
||||
foreach (var clip in StreamClips)
|
||||
{
|
||||
clip.PayloadBytes = 0;
|
||||
clip.PacketCount = 0;
|
||||
@@ -909,7 +903,7 @@ namespace BDInfo
|
||||
|
||||
if (clip.StreamFile != null)
|
||||
{
|
||||
foreach (TSStream stream in clip.StreamFile.Streams.Values)
|
||||
foreach (var stream in clip.StreamFile.Streams.Values)
|
||||
{
|
||||
stream.PayloadBytes = 0;
|
||||
stream.PacketCount = 0;
|
||||
@@ -924,7 +918,7 @@ namespace BDInfo
|
||||
}
|
||||
}
|
||||
|
||||
foreach (TSStream stream in SortedStreams)
|
||||
foreach (var stream in SortedStreams)
|
||||
{
|
||||
stream.PayloadBytes = 0;
|
||||
stream.PacketCount = 0;
|
||||
@@ -955,7 +949,7 @@ namespace BDInfo
|
||||
}
|
||||
|
||||
public int CompareVideoStreams(
|
||||
TSVideoStream x,
|
||||
TSVideoStream x,
|
||||
TSVideoStream y)
|
||||
{
|
||||
if (x == null && y == null)
|
||||
@@ -996,7 +990,7 @@ namespace BDInfo
|
||||
}
|
||||
|
||||
public int CompareAudioStreams(
|
||||
TSAudioStream x,
|
||||
TSAudioStream x,
|
||||
TSAudioStream y)
|
||||
{
|
||||
if (x == y)
|
||||
@@ -1246,8 +1240,7 @@ namespace BDInfo
|
||||
int count,
|
||||
ref int pos)
|
||||
{
|
||||
string val =
|
||||
_textEncoding.GetASCIIEncoding().GetString(data, pos, count);
|
||||
string val = Encoding.ASCII.GetString(data, pos, count);
|
||||
|
||||
pos += count;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -109,7 +109,7 @@ namespace BDInfo
|
||||
|
||||
public TSDescriptor Clone()
|
||||
{
|
||||
TSDescriptor descriptor =
|
||||
var descriptor =
|
||||
new TSDescriptor(Name, (byte)Value.Length);
|
||||
Value.CopyTo(descriptor.Value, 0);
|
||||
return descriptor;
|
||||
@@ -142,26 +142,17 @@ namespace BDInfo
|
||||
public double PacketSeconds = 0;
|
||||
public int AngleIndex = 0;
|
||||
|
||||
public ulong PacketSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return PacketCount * 192;
|
||||
}
|
||||
}
|
||||
public ulong PacketSize => PacketCount * 192;
|
||||
|
||||
private string _LanguageCode;
|
||||
public string LanguageCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return _LanguageCode;
|
||||
}
|
||||
set
|
||||
get => _LanguageCode;
|
||||
set
|
||||
{
|
||||
_LanguageCode = value;
|
||||
LanguageName = LanguageCodes.GetName(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsVideoStream
|
||||
@@ -398,16 +389,10 @@ namespace BDInfo
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
public virtual string Description => "";
|
||||
|
||||
public abstract TSStream Clone();
|
||||
|
||||
|
||||
protected void CopyTo(TSStream stream)
|
||||
{
|
||||
stream.PID = PID;
|
||||
@@ -419,7 +404,7 @@ namespace BDInfo
|
||||
if (Descriptors != null)
|
||||
{
|
||||
stream.Descriptors = new List<TSDescriptor>();
|
||||
foreach (TSDescriptor descriptor in Descriptors)
|
||||
foreach (var descriptor in Descriptors)
|
||||
{
|
||||
stream.Descriptors.Add(descriptor.Clone());
|
||||
}
|
||||
@@ -435,7 +420,7 @@ namespace BDInfo
|
||||
|
||||
public int Width;
|
||||
public int Height;
|
||||
public bool IsInterlaced;
|
||||
public bool IsInterlaced;
|
||||
public int FrameRateEnumerator;
|
||||
public int FrameRateDenominator;
|
||||
public TSAspectRatio AspectRatio;
|
||||
@@ -444,10 +429,7 @@ namespace BDInfo
|
||||
private TSVideoFormat _VideoFormat;
|
||||
public TSVideoFormat VideoFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
return _VideoFormat;
|
||||
}
|
||||
get => _VideoFormat;
|
||||
set
|
||||
{
|
||||
_VideoFormat = value;
|
||||
@@ -488,10 +470,7 @@ namespace BDInfo
|
||||
private TSFrameRate _FrameRate;
|
||||
public TSFrameRate FrameRate
|
||||
{
|
||||
get
|
||||
{
|
||||
return _FrameRate;
|
||||
}
|
||||
get => _FrameRate;
|
||||
set
|
||||
{
|
||||
_FrameRate = value;
|
||||
@@ -574,14 +553,14 @@ namespace BDInfo
|
||||
|
||||
public override TSStream Clone()
|
||||
{
|
||||
TSVideoStream stream = new TSVideoStream();
|
||||
var stream = new TSVideoStream();
|
||||
CopyTo(stream);
|
||||
|
||||
stream.VideoFormat = _VideoFormat;
|
||||
stream.FrameRate = _FrameRate;
|
||||
stream.Width = Width;
|
||||
stream.Height = Height;
|
||||
stream.IsInterlaced = IsInterlaced;
|
||||
stream.IsInterlaced = IsInterlaced;
|
||||
stream.FrameRateEnumerator = FrameRateEnumerator;
|
||||
stream.FrameRateDenominator = FrameRateDenominator;
|
||||
stream.AspectRatio = AspectRatio;
|
||||
@@ -748,7 +727,7 @@ namespace BDInfo
|
||||
|
||||
public override TSStream Clone()
|
||||
{
|
||||
TSAudioStream stream = new TSAudioStream();
|
||||
var stream = new TSAudioStream();
|
||||
CopyTo(stream);
|
||||
|
||||
stream.SampleRate = SampleRate;
|
||||
@@ -777,7 +756,7 @@ namespace BDInfo
|
||||
|
||||
public override TSStream Clone()
|
||||
{
|
||||
TSGraphicsStream stream = new TSGraphicsStream();
|
||||
var stream = new TSGraphicsStream();
|
||||
CopyTo(stream);
|
||||
return stream;
|
||||
}
|
||||
@@ -793,7 +772,7 @@ namespace BDInfo
|
||||
|
||||
public override TSStream Clone()
|
||||
{
|
||||
TSTextStream stream = new TSTextStream();
|
||||
var stream = new TSTextStream();
|
||||
CopyTo(stream);
|
||||
return stream;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -37,21 +37,9 @@ namespace BDInfo
|
||||
Stream = new MemoryStream(Buffer);
|
||||
}
|
||||
|
||||
public long Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)BufferLength;
|
||||
}
|
||||
}
|
||||
public long Length => (long)BufferLength;
|
||||
|
||||
public long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return Stream.Position;
|
||||
}
|
||||
}
|
||||
public long Position => Stream.Position;
|
||||
|
||||
public void Add(
|
||||
byte[] buffer,
|
||||
@@ -123,7 +111,7 @@ namespace BDInfo
|
||||
data += (Stream.ReadByte() << shift);
|
||||
shift -= 8;
|
||||
}
|
||||
BitVector32 vector = new BitVector32(data);
|
||||
var vector = new BitVector32(data);
|
||||
|
||||
int value = 0;
|
||||
for (int i = SkipBits; i < SkipBits + bits; i++)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -74,13 +74,7 @@ namespace BDInfo
|
||||
}
|
||||
}
|
||||
|
||||
public ulong PacketSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return PacketCount * 192;
|
||||
}
|
||||
}
|
||||
public ulong PacketSize => PacketCount * 192;
|
||||
|
||||
public ulong PacketBitRate
|
||||
{
|
||||
@@ -96,11 +90,11 @@ namespace BDInfo
|
||||
|
||||
public bool IsCompatible(TSStreamClip clip)
|
||||
{
|
||||
foreach (TSStream stream1 in StreamFile.Streams.Values)
|
||||
foreach (var stream1 in StreamFile.Streams.Values)
|
||||
{
|
||||
if (clip.StreamFile.Streams.ContainsKey(stream1.PID))
|
||||
{
|
||||
TSStream stream2 = clip.StreamFile.Streams[stream1.PID];
|
||||
var stream2 = clip.StreamFile.Streams[stream1.PID];
|
||||
if (stream1.StreamType != stream2.StreamType)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -23,28 +23,24 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Text;
|
||||
|
||||
namespace BDInfo
|
||||
{
|
||||
public class TSStreamClipFile
|
||||
{
|
||||
private readonly IFileSystem _fileSystem;
|
||||
private readonly ITextEncoding _textEncoding;
|
||||
public FileSystemMetadata FileInfo = null;
|
||||
public string FileType = null;
|
||||
public bool IsValid = false;
|
||||
public string Name = null;
|
||||
|
||||
public Dictionary<ushort, TSStream> Streams =
|
||||
new Dictionary<ushort,TSStream>();
|
||||
new Dictionary<ushort, TSStream>();
|
||||
|
||||
public TSStreamClipFile(
|
||||
FileSystemMetadata fileInfo, IFileSystem fileSystem, ITextEncoding textEncoding)
|
||||
public TSStreamClipFile(FileSystemMetadata fileInfo, IFileSystem fileSystem)
|
||||
{
|
||||
FileInfo = fileInfo;
|
||||
_fileSystem = fileSystem;
|
||||
_textEncoding = textEncoding;
|
||||
Name = fileInfo.Name.ToUpper();
|
||||
}
|
||||
|
||||
@@ -61,7 +57,7 @@ namespace BDInfo
|
||||
#endif
|
||||
Streams.Clear();
|
||||
|
||||
fileStream = _fileSystem.OpenRead(FileInfo.FullName);
|
||||
fileStream = File.OpenRead(FileInfo.FullName);
|
||||
fileReader = new BinaryReader(fileStream);
|
||||
|
||||
byte[] data = new byte[fileStream.Length];
|
||||
@@ -69,8 +65,8 @@ namespace BDInfo
|
||||
|
||||
byte[] fileType = new byte[8];
|
||||
Array.Copy(data, 0, fileType, 0, fileType.Length);
|
||||
|
||||
FileType = _textEncoding.GetASCIIEncoding().GetString(fileType, 0, fileType.Length);
|
||||
|
||||
FileType = Encoding.ASCII.GetString(fileType, 0, fileType.Length);
|
||||
if (FileType != "HDMV0100" &&
|
||||
FileType != "HDMV0200")
|
||||
{
|
||||
@@ -78,7 +74,7 @@ namespace BDInfo
|
||||
"Clip info file {0} has an unknown file type {1}.",
|
||||
FileInfo.Name, FileType));
|
||||
}
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
Debug.WriteLine(string.Format(
|
||||
"\tFileType: {0}", FileType));
|
||||
#endif
|
||||
@@ -110,12 +106,12 @@ namespace BDInfo
|
||||
TSStream stream = null;
|
||||
|
||||
ushort PID = (ushort)
|
||||
((clipData[streamOffset] << 8) +
|
||||
((clipData[streamOffset] << 8) +
|
||||
clipData[streamOffset + 1]);
|
||||
|
||||
|
||||
streamOffset += 2;
|
||||
|
||||
TSStreamType streamType = (TSStreamType)
|
||||
var streamType = (TSStreamType)
|
||||
clipData[streamOffset + 1];
|
||||
switch (streamType)
|
||||
{
|
||||
@@ -127,18 +123,18 @@ namespace BDInfo
|
||||
case TSStreamType.MPEG1_VIDEO:
|
||||
case TSStreamType.MPEG2_VIDEO:
|
||||
case TSStreamType.VC1_VIDEO:
|
||||
{
|
||||
TSVideoFormat videoFormat = (TSVideoFormat)
|
||||
(clipData[streamOffset + 2] >> 4);
|
||||
TSFrameRate frameRate = (TSFrameRate)
|
||||
(clipData[streamOffset + 2] & 0xF);
|
||||
TSAspectRatio aspectRatio = (TSAspectRatio)
|
||||
(clipData[streamOffset + 3] >> 4);
|
||||
{
|
||||
var videoFormat = (TSVideoFormat)
|
||||
(clipData[streamOffset + 2] >> 4);
|
||||
var frameRate = (TSFrameRate)
|
||||
(clipData[streamOffset + 2] & 0xF);
|
||||
var aspectRatio = (TSAspectRatio)
|
||||
(clipData[streamOffset + 3] >> 4);
|
||||
|
||||
stream = new TSVideoStream();
|
||||
((TSVideoStream)stream).VideoFormat = videoFormat;
|
||||
((TSVideoStream)stream).AspectRatio = aspectRatio;
|
||||
((TSVideoStream)stream).FrameRate = frameRate;
|
||||
stream = new TSVideoStream();
|
||||
((TSVideoStream)stream).VideoFormat = videoFormat;
|
||||
((TSVideoStream)stream).AspectRatio = aspectRatio;
|
||||
((TSVideoStream)stream).FrameRate = frameRate;
|
||||
#if DEBUG
|
||||
Debug.WriteLine(string.Format(
|
||||
"\t{0} {1} {2} {3} {4}",
|
||||
@@ -148,8 +144,8 @@ namespace BDInfo
|
||||
frameRate,
|
||||
aspectRatio));
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case TSStreamType.AC3_AUDIO:
|
||||
case TSStreamType.AC3_PLUS_AUDIO:
|
||||
@@ -162,23 +158,22 @@ namespace BDInfo
|
||||
case TSStreamType.LPCM_AUDIO:
|
||||
case TSStreamType.MPEG1_AUDIO:
|
||||
case TSStreamType.MPEG2_AUDIO:
|
||||
{
|
||||
byte[] languageBytes = new byte[3];
|
||||
Array.Copy(clipData, streamOffset + 3,
|
||||
languageBytes, 0, languageBytes.Length);
|
||||
string languageCode =
|
||||
_textEncoding.GetASCIIEncoding().GetString(languageBytes, 0, languageBytes.Length);
|
||||
{
|
||||
byte[] languageBytes = new byte[3];
|
||||
Array.Copy(clipData, streamOffset + 3,
|
||||
languageBytes, 0, languageBytes.Length);
|
||||
string languageCode = Encoding.ASCII.GetString(languageBytes, 0, languageBytes.Length);
|
||||
|
||||
TSChannelLayout channelLayout = (TSChannelLayout)
|
||||
(clipData[streamOffset + 2] >> 4);
|
||||
TSSampleRate sampleRate = (TSSampleRate)
|
||||
(clipData[streamOffset + 2] & 0xF);
|
||||
var channelLayout = (TSChannelLayout)
|
||||
(clipData[streamOffset + 2] >> 4);
|
||||
var sampleRate = (TSSampleRate)
|
||||
(clipData[streamOffset + 2] & 0xF);
|
||||
|
||||
stream = new TSAudioStream();
|
||||
((TSAudioStream)stream).LanguageCode = languageCode;
|
||||
((TSAudioStream)stream).ChannelLayout = channelLayout;
|
||||
((TSAudioStream)stream).SampleRate = TSAudioStream.ConvertSampleRate(sampleRate);
|
||||
((TSAudioStream)stream).LanguageCode = languageCode;
|
||||
stream = new TSAudioStream();
|
||||
((TSAudioStream)stream).LanguageCode = languageCode;
|
||||
((TSAudioStream)stream).ChannelLayout = channelLayout;
|
||||
((TSAudioStream)stream).SampleRate = TSAudioStream.ConvertSampleRate(sampleRate);
|
||||
((TSAudioStream)stream).LanguageCode = languageCode;
|
||||
#if DEBUG
|
||||
Debug.WriteLine(string.Format(
|
||||
"\t{0} {1} {2} {3} {4}",
|
||||
@@ -188,20 +183,19 @@ namespace BDInfo
|
||||
channelLayout,
|
||||
sampleRate));
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case TSStreamType.INTERACTIVE_GRAPHICS:
|
||||
case TSStreamType.PRESENTATION_GRAPHICS:
|
||||
{
|
||||
byte[] languageBytes = new byte[3];
|
||||
Array.Copy(clipData, streamOffset + 2,
|
||||
languageBytes, 0, languageBytes.Length);
|
||||
string languageCode =
|
||||
_textEncoding.GetASCIIEncoding().GetString(languageBytes, 0, languageBytes.Length);
|
||||
{
|
||||
byte[] languageBytes = new byte[3];
|
||||
Array.Copy(clipData, streamOffset + 2,
|
||||
languageBytes, 0, languageBytes.Length);
|
||||
string languageCode = Encoding.ASCII.GetString(languageBytes, 0, languageBytes.Length);
|
||||
|
||||
stream = new TSGraphicsStream();
|
||||
stream.LanguageCode = languageCode;
|
||||
stream.LanguageCode = languageCode;
|
||||
#if DEBUG
|
||||
Debug.WriteLine(string.Format(
|
||||
"\t{0} {1} {2}",
|
||||
@@ -209,16 +203,15 @@ namespace BDInfo
|
||||
streamType,
|
||||
languageCode));
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case TSStreamType.SUBTITLE:
|
||||
{
|
||||
byte[] languageBytes = new byte[3];
|
||||
Array.Copy(clipData, streamOffset + 3,
|
||||
languageBytes, 0, languageBytes.Length);
|
||||
string languageCode =
|
||||
_textEncoding.GetASCIIEncoding().GetString(languageBytes, 0, languageBytes.Length);
|
||||
{
|
||||
byte[] languageBytes = new byte[3];
|
||||
Array.Copy(clipData, streamOffset + 3,
|
||||
languageBytes, 0, languageBytes.Length);
|
||||
string languageCode = Encoding.ASCII.GetString(languageBytes, 0, languageBytes.Length);
|
||||
#if DEBUG
|
||||
Debug.WriteLine(string.Format(
|
||||
"\t{0} {1} {2}",
|
||||
@@ -227,9 +220,9 @@ namespace BDInfo
|
||||
languageCode));
|
||||
#endif
|
||||
stream = new TSTextStream();
|
||||
stream.LanguageCode = languageCode;
|
||||
}
|
||||
break;
|
||||
stream.LanguageCode = languageCode;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (stream != null)
|
||||
@@ -240,7 +233,7 @@ namespace BDInfo
|
||||
}
|
||||
|
||||
streamOffset += clipData[streamOffset] + 1;
|
||||
}
|
||||
}
|
||||
IsValid = true;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//============================================================================
|
||||
//============================================================================
|
||||
// BDInfo - Blu-ray Video and Audio Analysis Tool
|
||||
// Copyright © 2010 Cinema Squid
|
||||
//
|
||||
@@ -283,7 +283,7 @@ namespace BDInfo
|
||||
|
||||
bool isAVC = false;
|
||||
bool isMVC = false;
|
||||
foreach (TSStream finishedStream in Streams.Values)
|
||||
foreach (var finishedStream in Streams.Values)
|
||||
{
|
||||
if (!finishedStream.IsInitialized)
|
||||
{
|
||||
@@ -327,10 +327,10 @@ namespace BDInfo
|
||||
UpdateStreamBitrate(PID, PTSPID, PTS, PTSDiff);
|
||||
}
|
||||
|
||||
foreach (TSPlaylistFile playlist in Playlists)
|
||||
foreach (var playlist in Playlists)
|
||||
{
|
||||
double packetSeconds = 0;
|
||||
foreach (TSStreamClip clip in playlist.StreamClips)
|
||||
foreach (var clip in playlist.StreamClips)
|
||||
{
|
||||
if (clip.AngleIndex == 0)
|
||||
{
|
||||
@@ -339,7 +339,7 @@ namespace BDInfo
|
||||
}
|
||||
if (packetSeconds > 0)
|
||||
{
|
||||
foreach (TSStream playlistStream in playlist.SortedStreams)
|
||||
foreach (var playlistStream in playlist.SortedStreams)
|
||||
{
|
||||
if (playlistStream.IsVBR)
|
||||
{
|
||||
@@ -366,14 +366,14 @@ namespace BDInfo
|
||||
{
|
||||
if (Playlists == null) return;
|
||||
|
||||
TSStreamState streamState = StreamStates[PID];
|
||||
var streamState = StreamStates[PID];
|
||||
double streamTime = (double)PTS / 90000;
|
||||
double streamInterval = (double)PTSDiff / 90000;
|
||||
double streamOffset = streamTime + streamInterval;
|
||||
|
||||
foreach (TSPlaylistFile playlist in Playlists)
|
||||
foreach (var playlist in Playlists)
|
||||
{
|
||||
foreach (TSStreamClip clip in playlist.StreamClips)
|
||||
foreach (var clip in playlist.StreamClips)
|
||||
{
|
||||
if (clip.Name != this.Name) continue;
|
||||
|
||||
@@ -390,15 +390,15 @@ namespace BDInfo
|
||||
clip.PacketSeconds = streamOffset - clip.TimeIn;
|
||||
}
|
||||
|
||||
Dictionary<ushort, TSStream> playlistStreams = playlist.Streams;
|
||||
if (clip.AngleIndex > 0 &&
|
||||
var playlistStreams = playlist.Streams;
|
||||
if (clip.AngleIndex > 0 &&
|
||||
clip.AngleIndex < playlist.AngleStreams.Count + 1)
|
||||
{
|
||||
playlistStreams = playlist.AngleStreams[clip.AngleIndex - 1];
|
||||
}
|
||||
if (playlistStreams.ContainsKey(PID))
|
||||
{
|
||||
TSStream stream = playlistStreams[PID];
|
||||
var stream = playlistStreams[PID];
|
||||
|
||||
stream.PayloadBytes += streamState.WindowBytes;
|
||||
stream.PacketCount += streamState.WindowPackets;
|
||||
@@ -425,13 +425,13 @@ namespace BDInfo
|
||||
|
||||
if (Streams.ContainsKey(PID))
|
||||
{
|
||||
TSStream stream = Streams[PID];
|
||||
var stream = Streams[PID];
|
||||
stream.PayloadBytes += streamState.WindowBytes;
|
||||
stream.PacketCount += streamState.WindowPackets;
|
||||
|
||||
|
||||
if (stream.IsVideoStream)
|
||||
{
|
||||
TSStreamDiagnostics diag = new TSStreamDiagnostics();
|
||||
var diag = new TSStreamDiagnostics();
|
||||
diag.Marker = (double)PTS / 90000;
|
||||
diag.Interval = (double)PTSDiff / 90000;
|
||||
diag.Bytes = streamState.WindowBytes;
|
||||
@@ -457,7 +457,7 @@ namespace BDInfo
|
||||
int dataSize = 16384;
|
||||
Stream fileStream = null;
|
||||
try
|
||||
{
|
||||
{
|
||||
string fileName;
|
||||
if (BDInfoSettings.EnableSSIF &&
|
||||
InterleavedFile != null)
|
||||
@@ -482,13 +482,13 @@ namespace BDInfo
|
||||
StreamStates.Clear();
|
||||
StreamDiagnostics.Clear();
|
||||
|
||||
TSPacketParser parser =
|
||||
var parser =
|
||||
new TSPacketParser();
|
||||
|
||||
|
||||
long fileLength = (uint)fileStream.Length;
|
||||
byte[] buffer = new byte[dataSize];
|
||||
int bufferLength = 0;
|
||||
while ((bufferLength =
|
||||
while ((bufferLength =
|
||||
fileStream.Read(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
int offset = 0;
|
||||
@@ -536,80 +536,80 @@ namespace BDInfo
|
||||
switch (parser.HeaderParse)
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
parser.TransportErrorIndicator =
|
||||
(byte)((buffer[i] >> 7) & 0x1);
|
||||
parser.PayloadUnitStartIndicator =
|
||||
(byte)((buffer[i] >> 6) & 0x1);
|
||||
parser.TransportPriority =
|
||||
(byte)((buffer[i] >> 5) & 0x1);
|
||||
parser.PID =
|
||||
(ushort)((buffer[i] & 0x1f) << 8);
|
||||
}
|
||||
break;
|
||||
{
|
||||
parser.TransportErrorIndicator =
|
||||
(byte)((buffer[i] >> 7) & 0x1);
|
||||
parser.PayloadUnitStartIndicator =
|
||||
(byte)((buffer[i] >> 6) & 0x1);
|
||||
parser.TransportPriority =
|
||||
(byte)((buffer[i] >> 5) & 0x1);
|
||||
parser.PID =
|
||||
(ushort)((buffer[i] & 0x1f) << 8);
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
{
|
||||
parser.PID |= (ushort)buffer[i];
|
||||
if (Streams.ContainsKey(parser.PID))
|
||||
{
|
||||
parser.Stream = Streams[parser.PID];
|
||||
parser.PID |= (ushort)buffer[i];
|
||||
if (Streams.ContainsKey(parser.PID))
|
||||
{
|
||||
parser.Stream = Streams[parser.PID];
|
||||
}
|
||||
else
|
||||
{
|
||||
parser.Stream = null;
|
||||
}
|
||||
if (!StreamStates.ContainsKey(parser.PID))
|
||||
{
|
||||
StreamStates[parser.PID] = new TSStreamState();
|
||||
}
|
||||
parser.StreamState = StreamStates[parser.PID];
|
||||
parser.StreamState.TotalPackets++;
|
||||
parser.StreamState.WindowPackets++;
|
||||
parser.TotalPackets++;
|
||||
}
|
||||
else
|
||||
{
|
||||
parser.Stream = null;
|
||||
}
|
||||
if (!StreamStates.ContainsKey(parser.PID))
|
||||
{
|
||||
StreamStates[parser.PID] = new TSStreamState();
|
||||
}
|
||||
parser.StreamState = StreamStates[parser.PID];
|
||||
parser.StreamState.TotalPackets++;
|
||||
parser.StreamState.WindowPackets++;
|
||||
parser.TotalPackets++;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
{
|
||||
parser.TransportScramblingControl =
|
||||
(byte)((buffer[i] >> 6) & 0x3);
|
||||
parser.AdaptionFieldControl =
|
||||
(byte)((buffer[i] >> 4) & 0x3);
|
||||
|
||||
if ((parser.AdaptionFieldControl & 0x2) == 0x2)
|
||||
{
|
||||
parser.AdaptionFieldState = true;
|
||||
}
|
||||
if (parser.PayloadUnitStartIndicator == 1)
|
||||
{
|
||||
if (parser.PID == 0)
|
||||
{
|
||||
parser.PATSectionStart = true;
|
||||
}
|
||||
else if (parser.PID == parser.PMTPID)
|
||||
{
|
||||
parser.PMTSectionStart = true;
|
||||
}
|
||||
else if (parser.StreamState != null &&
|
||||
parser.StreamState.TransferState)
|
||||
{
|
||||
parser.StreamState.TransferState = false;
|
||||
parser.StreamState.TransferCount++;
|
||||
parser.TransportScramblingControl =
|
||||
(byte)((buffer[i] >> 6) & 0x3);
|
||||
parser.AdaptionFieldControl =
|
||||
(byte)((buffer[i] >> 4) & 0x3);
|
||||
|
||||
bool isFinished = ScanStream(
|
||||
parser.Stream,
|
||||
parser.StreamState,
|
||||
parser.StreamState.StreamBuffer);
|
||||
|
||||
if (!isFullScan && isFinished)
|
||||
if ((parser.AdaptionFieldControl & 0x2) == 0x2)
|
||||
{
|
||||
parser.AdaptionFieldState = true;
|
||||
}
|
||||
if (parser.PayloadUnitStartIndicator == 1)
|
||||
{
|
||||
if (parser.PID == 0)
|
||||
{
|
||||
return;
|
||||
parser.PATSectionStart = true;
|
||||
}
|
||||
else if (parser.PID == parser.PMTPID)
|
||||
{
|
||||
parser.PMTSectionStart = true;
|
||||
}
|
||||
else if (parser.StreamState != null &&
|
||||
parser.StreamState.TransferState)
|
||||
{
|
||||
parser.StreamState.TransferState = false;
|
||||
parser.StreamState.TransferCount++;
|
||||
|
||||
bool isFinished = ScanStream(
|
||||
parser.Stream,
|
||||
parser.StreamState,
|
||||
parser.StreamState.StreamBuffer);
|
||||
|
||||
if (!isFullScan && isFinished)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (parser.AdaptionFieldState)
|
||||
@@ -670,7 +670,8 @@ namespace BDInfo
|
||||
parser.PAT[parser.PATOffset++] = buffer[i++];
|
||||
parser.PATSectionLength--;
|
||||
parser.PacketLength--;
|
||||
} --i;
|
||||
}
|
||||
--i;
|
||||
|
||||
if (parser.PATSectionLength == 0)
|
||||
{
|
||||
@@ -680,10 +681,10 @@ namespace BDInfo
|
||||
for (int k = 0; k < (parser.PATOffset - 4); k += 4)
|
||||
{
|
||||
uint programNumber = (uint)
|
||||
((parser.PAT[k] << 8) +
|
||||
((parser.PAT[k] << 8) +
|
||||
parser.PAT[k + 1]);
|
||||
|
||||
ushort programPID = (ushort)
|
||||
ushort programPID = (ushort)
|
||||
(((parser.PAT[k + 2] & 0x1F) << 8) +
|
||||
parser.PAT[k + 3]);
|
||||
|
||||
@@ -801,7 +802,8 @@ namespace BDInfo
|
||||
PMT[parser.PMTOffset++] = buffer[i++];
|
||||
--parser.PMTSectionLength;
|
||||
--parser.PacketLength;
|
||||
} --i;
|
||||
}
|
||||
--i;
|
||||
|
||||
if (parser.PMTSectionLength == 0)
|
||||
{
|
||||
@@ -837,7 +839,7 @@ namespace BDInfo
|
||||
|
||||
if (!Streams.ContainsKey(streamPID))
|
||||
{
|
||||
List<TSDescriptor> streamDescriptors =
|
||||
var streamDescriptors =
|
||||
new List<TSDescriptor>();
|
||||
|
||||
/*
|
||||
@@ -985,7 +987,7 @@ namespace BDInfo
|
||||
parser.PMTProgramDescriptorLength = buffer[i];
|
||||
parser.PMTProgramDescriptors.Add(
|
||||
new TSDescriptor(
|
||||
parser.PMTProgramDescriptor,
|
||||
parser.PMTProgramDescriptor,
|
||||
parser.PMTProgramDescriptorLength));
|
||||
break;
|
||||
}
|
||||
@@ -994,11 +996,11 @@ namespace BDInfo
|
||||
{
|
||||
--parser.PMTProgramDescriptorLength;
|
||||
|
||||
TSDescriptor descriptor = parser.PMTProgramDescriptors[
|
||||
var descriptor = parser.PMTProgramDescriptors[
|
||||
parser.PMTProgramDescriptors.Count - 1];
|
||||
|
||||
int valueIndex =
|
||||
descriptor.Value.Length -
|
||||
descriptor.Value.Length -
|
||||
parser.PMTProgramDescriptorLength - 1;
|
||||
|
||||
descriptor.Value[valueIndex] = buffer[i];
|
||||
@@ -1020,19 +1022,19 @@ namespace BDInfo
|
||||
parser.SyncState = false;
|
||||
}
|
||||
}
|
||||
else if (parser.Stream != null &&
|
||||
parser.StreamState != null &&
|
||||
else if (parser.Stream != null &&
|
||||
parser.StreamState != null &&
|
||||
parser.TransportScramblingControl == 0)
|
||||
{
|
||||
TSStream stream = parser.Stream;
|
||||
TSStreamState streamState = parser.StreamState;
|
||||
var stream = parser.Stream;
|
||||
var streamState = parser.StreamState;
|
||||
|
||||
streamState.Parse =
|
||||
(streamState.Parse << 8) + buffer[i];
|
||||
|
||||
if (streamState.TransferState)
|
||||
{
|
||||
if ((bufferLength - i) >= streamState.PacketLength &&
|
||||
if ((bufferLength - i) >= streamState.PacketLength &&
|
||||
streamState.PacketLength > 0)
|
||||
{
|
||||
offset = streamState.PacketLength;
|
||||
@@ -1085,7 +1087,7 @@ namespace BDInfo
|
||||
--parser.PacketLength;
|
||||
|
||||
bool headerFound = false;
|
||||
if (stream.IsVideoStream &&
|
||||
if (stream.IsVideoStream &&
|
||||
streamState.Parse == 0x000001FD)
|
||||
{
|
||||
headerFound = true;
|
||||
@@ -1170,18 +1172,18 @@ namespace BDInfo
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
streamState.PESHeaderFlags =
|
||||
streamState.PESHeaderFlags =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 0:
|
||||
streamState.PESHeaderLength =
|
||||
streamState.PESHeaderLength =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
@@ -1211,48 +1213,48 @@ namespace BDInfo
|
||||
switch (streamState.PTSParse)
|
||||
{
|
||||
case 4:
|
||||
streamState.PTSTemp =
|
||||
streamState.PTSTemp =
|
||||
((streamState.Parse & 0xE) << 29);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xff);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
streamState.PTSTemp |=
|
||||
streamState.PTSTemp |=
|
||||
((streamState.Parse & 0xFF) << 22);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
streamState.PTSTemp |=
|
||||
streamState.PTSTemp |=
|
||||
((streamState.Parse & 0xFE) << 14);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
streamState.PTSTemp |=
|
||||
streamState.PTSTemp |=
|
||||
((streamState.Parse & 0xFF) << 7);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 0:
|
||||
streamState.PTSTemp |=
|
||||
streamState.PTSTemp |=
|
||||
((streamState.Parse & 0xFE) >> 1);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xff);
|
||||
#endif
|
||||
#endif
|
||||
streamState.PTS = streamState.PTSTemp;
|
||||
|
||||
if (streamState.PTS > streamState.PTSLast)
|
||||
@@ -1260,13 +1262,13 @@ namespace BDInfo
|
||||
if (streamState.PTSLast > 0)
|
||||
{
|
||||
streamState.PTSTransfer = (streamState.PTS - streamState.PTSLast);
|
||||
}
|
||||
}
|
||||
streamState.PTSLast = streamState.PTS;
|
||||
}
|
||||
|
||||
streamState.PTSDiff = streamState.PTS - streamState.DTSPrev;
|
||||
|
||||
if (streamState.PTSCount > 0 &&
|
||||
if (streamState.PTSCount > 0 &&
|
||||
stream.IsVideoStream)
|
||||
{
|
||||
UpdateStreamBitrates(stream.PID, streamState.PTS, streamState.PTSDiff);
|
||||
@@ -1280,7 +1282,7 @@ namespace BDInfo
|
||||
}
|
||||
Length = (double)(parser.PTSLast - parser.PTSFirst) / 90000;
|
||||
}
|
||||
|
||||
|
||||
streamState.DTSPrev = streamState.PTS;
|
||||
streamState.PTSCount++;
|
||||
if (streamState.PESHeaderLength == 0)
|
||||
@@ -1299,46 +1301,46 @@ namespace BDInfo
|
||||
switch (streamState.DTSParse)
|
||||
{
|
||||
case 9:
|
||||
streamState.PTSTemp =
|
||||
streamState.PTSTemp =
|
||||
((streamState.Parse & 0xE) << 29);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 8:
|
||||
streamState.PTSTemp |=
|
||||
streamState.PTSTemp |=
|
||||
((streamState.Parse & 0xFF) << 22);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 7:
|
||||
streamState.PTSTemp |=
|
||||
streamState.PTSTemp |=
|
||||
((streamState.Parse & 0xFE) << 14);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xff);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 6:
|
||||
streamState.PTSTemp |=
|
||||
streamState.PTSTemp |=
|
||||
((streamState.Parse & 0xFF) << 7);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 5:
|
||||
streamState.PTSTemp |=
|
||||
streamState.PTSTemp |=
|
||||
((streamState.Parse & 0xFE) >> 1);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xff);
|
||||
#endif
|
||||
streamState.PTS = streamState.PTSTemp;
|
||||
@@ -1347,48 +1349,48 @@ namespace BDInfo
|
||||
streamState.PTSLast = streamState.PTS;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 4:
|
||||
streamState.DTSTemp =
|
||||
streamState.DTSTemp =
|
||||
((streamState.Parse & 0xE) << 29);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xff);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
streamState.DTSTemp |=
|
||||
streamState.DTSTemp |=
|
||||
((streamState.Parse & 0xFF) << 22);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xff);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
streamState.DTSTemp |=
|
||||
streamState.DTSTemp |=
|
||||
((streamState.Parse & 0xFE) << 14);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xff);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
streamState.DTSTemp |=
|
||||
streamState.DTSTemp |=
|
||||
((streamState.Parse & 0xFF) << 7);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xFF);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case 0:
|
||||
streamState.DTSTemp |=
|
||||
streamState.DTSTemp |=
|
||||
((streamState.Parse & 0xFE) >> 1);
|
||||
#if DEBUG
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
streamState.PESHeader[streamState.PESHeaderIndex++] =
|
||||
(byte)(streamState.Parse & 0xff);
|
||||
#endif
|
||||
streamState.PTSDiff = streamState.DTSTemp - streamState.DTSPrev;
|
||||
@@ -1459,7 +1461,7 @@ namespace BDInfo
|
||||
|
||||
ulong PTSLast = 0;
|
||||
ulong PTSDiff = 0;
|
||||
foreach (TSStream stream in Streams.Values)
|
||||
foreach (var stream in Streams.Values)
|
||||
{
|
||||
if (!stream.IsVideoStream) continue;
|
||||
|
||||
@@ -1482,8 +1484,8 @@ namespace BDInfo
|
||||
}
|
||||
|
||||
private TSStream CreateStream(
|
||||
ushort streamPID,
|
||||
byte streamType,
|
||||
ushort streamPID,
|
||||
byte streamType,
|
||||
List<TSDescriptor> streamDescriptors)
|
||||
{
|
||||
TSStream stream = null;
|
||||
@@ -1495,10 +1497,10 @@ namespace BDInfo
|
||||
case TSStreamType.MPEG1_VIDEO:
|
||||
case TSStreamType.MPEG2_VIDEO:
|
||||
case TSStreamType.VC1_VIDEO:
|
||||
{
|
||||
stream = new TSVideoStream();
|
||||
}
|
||||
break;
|
||||
{
|
||||
stream = new TSVideoStream();
|
||||
}
|
||||
break;
|
||||
|
||||
case TSStreamType.AC3_AUDIO:
|
||||
case TSStreamType.AC3_PLUS_AUDIO:
|
||||
@@ -1511,23 +1513,23 @@ namespace BDInfo
|
||||
case TSStreamType.LPCM_AUDIO:
|
||||
case TSStreamType.MPEG1_AUDIO:
|
||||
case TSStreamType.MPEG2_AUDIO:
|
||||
{
|
||||
stream = new TSAudioStream();
|
||||
}
|
||||
break;
|
||||
{
|
||||
stream = new TSAudioStream();
|
||||
}
|
||||
break;
|
||||
|
||||
case TSStreamType.INTERACTIVE_GRAPHICS:
|
||||
case TSStreamType.PRESENTATION_GRAPHICS:
|
||||
{
|
||||
stream = new TSGraphicsStream();
|
||||
}
|
||||
break;
|
||||
{
|
||||
stream = new TSGraphicsStream();
|
||||
}
|
||||
break;
|
||||
|
||||
case TSStreamType.SUBTITLE:
|
||||
{
|
||||
stream = new TSTextStream();
|
||||
}
|
||||
break;
|
||||
{
|
||||
stream = new TSTextStream();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -1548,6 +1550,6 @@ namespace BDInfo
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,15 +7,27 @@
|
||||
- [EraYaN](https://github.com/EraYaN)
|
||||
- [flemse](https://github.com/flemse)
|
||||
- [bfayers](https://github.com/bfayers)
|
||||
- [Bond_009](https://github.com/Bond-009)
|
||||
- [AnthonyLavado](https://github.com/anthonylavado)
|
||||
- [sparky8251](https://github.com/sparky8251)
|
||||
- [LeoVerto](https://github.com/LeoVerto)
|
||||
- [grafixeyehero](https://github.com/grafixeyehero)
|
||||
- [cvium](https://github.com/cvium)
|
||||
- [wtayl0r](https://github.com/wtayl0r)
|
||||
- [TtheCreator](https://github.com/Tthecreator)
|
||||
- [dkanada](https://github.com/dkanada)
|
||||
- [LogicalPhallacy](https://github.com/LogicalPhallacy/)
|
||||
- [RazeLighter777](https://github.com/RazeLighter777)
|
||||
- [WillWill56](https://github.com/WillWill56)
|
||||
|
||||
# Emby Contributors
|
||||
|
||||
- [LukePulverenti](https://github.com/LukePulverenti)
|
||||
- [ebr11](https://github.com/ebr11)
|
||||
- [lalmanzar](https://github.com/lalmanzar)
|
||||
- [schneifu](https://github.com/schneifu)
|
||||
- [Mark2xv](https://github.com/Mark2xv)
|
||||
- [ScottRapsey](https://github.com/ScottRapsey)
|
||||
- [LukePulverenti](https://github.com/LukePulverenti)
|
||||
- [ebr11](https://github.com/ebr11)
|
||||
- [lalmanzar](https://github.com/lalmanzar)
|
||||
- [schneifu](https://github.com/schneifu)
|
||||
- [Mark2xv](https://github.com/Mark2xv)
|
||||
- [ScottRapsey](https://github.com/ScottRapsey)
|
||||
- [skynet600](https://github.com/skynet600)
|
||||
- [Cheesegeezer](https://githum.com/Cheesegeezer)
|
||||
- [Radeon](https://github.com/radeonorama)
|
||||
|
||||
29
Dockerfile
@@ -3,16 +3,27 @@ ARG DOTNET_VERSION=2
|
||||
FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
|
||||
WORKDIR /repo
|
||||
COPY . .
|
||||
RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \
|
||||
&& dotnet clean \
|
||||
&& dotnet publish --configuration release --output /jellyfin
|
||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
RUN bash -c "source deployment/common.build.sh && \
|
||||
build_jellyfin Jellyfin.Server Release linux-x64 /jellyfin"
|
||||
|
||||
FROM jellyfin/ffmpeg as ffmpeg
|
||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
|
||||
# libfontconfig1 is required for Skia
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
libfontconfig1 \
|
||||
&& apt-get clean autoclean \
|
||||
&& apt-get autoremove \
|
||||
&& rm -rf /var/lib/{apt,dpkg,cache,log} \
|
||||
&& mkdir -p /cache /config /media \
|
||||
&& chmod 777 /cache /config /media
|
||||
COPY --from=ffmpeg / /
|
||||
COPY --from=builder /jellyfin /jellyfin
|
||||
EXPOSE 8096
|
||||
RUN apt update \
|
||||
&& apt install -y ffmpeg
|
||||
VOLUME /config /media
|
||||
ENTRYPOINT if [ -n "$PUID$PGUID" ]; \
|
||||
then echo "PUID/PGID are deprecated. Use Docker user param." >&2; exit 1; \
|
||||
else dotnet /jellyfin/jellyfin.dll -programdata /config; fi
|
||||
VOLUME /cache /config /media
|
||||
ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
|
||||
--datadir /config \
|
||||
--cachedir /cache \
|
||||
--ffmpeg /usr/local/bin/ffmpeg \
|
||||
--ffprobe /usr/local/bin/ffprobe
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
ARG DOTNET_VERSION=3.0
|
||||
|
||||
FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
|
||||
WORKDIR /repo
|
||||
COPY . .
|
||||
RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \
|
||||
&& find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \; \
|
||||
&& dotnet clean \
|
||||
&& dotnet publish --configuration release --output /jellyfin
|
||||
|
||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
|
||||
COPY --from=builder /jellyfin /jellyfin
|
||||
EXPOSE 8096
|
||||
RUN apt update \
|
||||
&& apt install -y ffmpeg
|
||||
VOLUME /config /media
|
||||
ENTRYPOINT dotnet /jellyfin/jellyfin.dll -programdata /config
|
||||
37
Dockerfile.arm
Normal file
@@ -0,0 +1,37 @@
|
||||
# Requires binfm_misc registration
|
||||
# https://github.com/multiarch/qemu-user-static#binfmt_misc-register
|
||||
ARG DOTNET_VERSION=3.0
|
||||
|
||||
|
||||
FROM multiarch/qemu-user-static:x86_64-arm as qemu
|
||||
FROM alpine as qemu_extract
|
||||
COPY --from=qemu /usr/bin qemu-arm-static.tar.gz
|
||||
RUN tar -xzvf qemu-arm-static.tar.gz
|
||||
|
||||
FROM microsoft/dotnet:${DOTNET_VERSION}-sdk-stretch as builder
|
||||
WORKDIR /repo
|
||||
COPY . .
|
||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
# TODO Remove or update the sed line when we update dotnet version.
|
||||
RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \;
|
||||
# Discard objs - may cause failures if exists
|
||||
RUN find . -type d -name obj | xargs -r rm -r
|
||||
# Build
|
||||
RUN bash -c "source deployment/common.build.sh && \
|
||||
build_jellyfin Jellyfin.Server Release linux-arm /jellyfin"
|
||||
|
||||
|
||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm32v7
|
||||
COPY --from=qemu_extract qemu-arm-static /usr/bin
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
|
||||
&& mkdir -p /cache /config /media \
|
||||
&& chmod 777 /cache /config /media
|
||||
COPY --from=builder /jellyfin /jellyfin
|
||||
EXPOSE 8096
|
||||
VOLUME /cache /config /media
|
||||
ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
|
||||
--datadir /config \
|
||||
--cachedir /cache \
|
||||
--ffmpeg /usr/bin/ffmpeg \
|
||||
--ffprobe /usr/bin/ffprobe
|
||||
38
Dockerfile.arm64
Normal file
@@ -0,0 +1,38 @@
|
||||
# Requires binfm_misc registration
|
||||
# https://github.com/multiarch/qemu-user-static#binfmt_misc-register
|
||||
ARG DOTNET_VERSION=3.0
|
||||
|
||||
|
||||
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
|
||||
FROM alpine as qemu_extract
|
||||
COPY --from=qemu /usr/bin qemu-aarch64-static.tar.gz
|
||||
RUN tar -xzvf qemu-aarch64-static.tar.gz
|
||||
|
||||
|
||||
FROM microsoft/dotnet:${DOTNET_VERSION}-sdk-stretch as builder
|
||||
WORKDIR /repo
|
||||
COPY . .
|
||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
# TODO Remove or update the sed line when we update dotnet version.
|
||||
RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \;
|
||||
# Discard objs - may cause failures if exists
|
||||
RUN find . -type d -name obj | xargs -r rm -r
|
||||
# Build
|
||||
RUN bash -c "source deployment/common.build.sh && \
|
||||
build_jellyfin Jellyfin.Server Release linux-arm64 /jellyfin"
|
||||
|
||||
|
||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8
|
||||
COPY --from=qemu_extract qemu-aarch64-static /usr/bin
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
|
||||
&& mkdir -p /cache /config /media \
|
||||
&& chmod 777 /cache /config /media
|
||||
COPY --from=builder /jellyfin /jellyfin
|
||||
EXPOSE 8096
|
||||
VOLUME /cache /config /media
|
||||
ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
|
||||
--datadir /config \
|
||||
--cachedir /cache \
|
||||
--ffmpeg /usr/bin/ffmpeg \
|
||||
--ffprobe /usr/bin/ffprobe
|
||||
@@ -1,22 +0,0 @@
|
||||
FROM debian:9
|
||||
|
||||
# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y apt-transport-https debhelper gnupg wget devscripts \
|
||||
&& wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg \
|
||||
&& mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ \
|
||||
&& wget -q https://packages.microsoft.com/config/debian/9/prod.list \
|
||||
&& mv prod.list /etc/apt/sources.list.d/microsoft-prod.list \
|
||||
&& chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg \
|
||||
&& chown root:root /etc/apt/sources.list.d/microsoft-prod.list \
|
||||
&& apt-get update
|
||||
|
||||
WORKDIR /repo
|
||||
COPY . .
|
||||
|
||||
RUN yes|mk-build-deps -i \
|
||||
&& dpkg-buildpackage -us -uc \
|
||||
&& mkdir /dist \
|
||||
&& mv /jellyfin*deb /dist
|
||||
|
||||
WORKDIR /dist
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace DvdLib
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SharedVersion.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
{
|
||||
public enum AudioCodec
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
{
|
||||
public class Chapter
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.IO;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
@@ -33,10 +31,9 @@ namespace DvdLib.Ifo
|
||||
foreach (var ifo in allIfos)
|
||||
{
|
||||
var num = ifo.Name.Split('_').ElementAtOrDefault(1);
|
||||
ushort ifoNumber;
|
||||
var numbersRead = new List<ushort>();
|
||||
|
||||
if (!string.IsNullOrEmpty(num) && ushort.TryParse(num, out ifoNumber) && !numbersRead.Contains(ifoNumber))
|
||||
if (!string.IsNullOrEmpty(num) && ushort.TryParse(num, out var ifoNumber) && !numbersRead.Contains(ifoNumber))
|
||||
{
|
||||
ReadVTS(ifoNumber, ifo.FullName);
|
||||
numbersRead.Add(ifoNumber);
|
||||
@@ -47,7 +44,7 @@ namespace DvdLib.Ifo
|
||||
{
|
||||
using (var vmgFs = _fileSystem.GetFileStream(vmgPath.FullName, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read))
|
||||
{
|
||||
using (BigEndianBinaryReader vmgRead = new BigEndianBinaryReader(vmgFs))
|
||||
using (var vmgRead = new BigEndianBinaryReader(vmgFs))
|
||||
{
|
||||
vmgFs.Seek(0x3E, SeekOrigin.Begin);
|
||||
_titleSetCount = vmgRead.ReadUInt16();
|
||||
@@ -73,7 +70,7 @@ namespace DvdLib.Ifo
|
||||
read.BaseStream.Seek(6, SeekOrigin.Current);
|
||||
for (uint titleNum = 1; titleNum <= _titleCount; titleNum++)
|
||||
{
|
||||
Title t = new Title(titleNum);
|
||||
var t = new Title(titleNum);
|
||||
t.ParseTT_SRPT(read);
|
||||
Titles.Add(t);
|
||||
}
|
||||
@@ -81,7 +78,7 @@ namespace DvdLib.Ifo
|
||||
|
||||
private void ReadVTS(ushort vtsNum, List<FileSystemMetadata> allFiles)
|
||||
{
|
||||
var filename = String.Format("VTS_{0:00}_0.IFO", vtsNum);
|
||||
var filename = string.Format("VTS_{0:00}_0.IFO", vtsNum);
|
||||
|
||||
var vtsPath = allFiles.FirstOrDefault(i => string.Equals(i.Name, filename, StringComparison.OrdinalIgnoreCase)) ??
|
||||
allFiles.FirstOrDefault(i => string.Equals(i.Name, Path.ChangeExtension(filename, ".bup"), StringComparison.OrdinalIgnoreCase));
|
||||
@@ -100,7 +97,7 @@ namespace DvdLib.Ifo
|
||||
|
||||
using (var vtsFs = _fileSystem.GetFileStream(vtsPath, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read))
|
||||
{
|
||||
using (BigEndianBinaryReader vtsRead = new BigEndianBinaryReader(vtsFs))
|
||||
using (var vtsRead = new BigEndianBinaryReader(vtsFs))
|
||||
{
|
||||
// Read VTS_PTT_SRPT
|
||||
vtsFs.Seek(0xC8, SeekOrigin.Begin);
|
||||
@@ -121,7 +118,7 @@ namespace DvdLib.Ifo
|
||||
{
|
||||
uint chapNum = 1;
|
||||
vtsFs.Seek(baseAddr + offsets[titleNum], SeekOrigin.Begin);
|
||||
Title t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum + 1));
|
||||
var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum + 1));
|
||||
if (t == null) continue;
|
||||
|
||||
do
|
||||
@@ -151,11 +148,11 @@ namespace DvdLib.Ifo
|
||||
vtsFs.Seek(3, SeekOrigin.Current);
|
||||
uint vtsPgcOffset = vtsRead.ReadUInt32();
|
||||
|
||||
Title t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum));
|
||||
var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum));
|
||||
if (t != null) t.AddPgc(vtsRead, startByte + vtsPgcOffset, entryPgc, pgcNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
{
|
||||
@@ -20,7 +17,7 @@ namespace DvdLib.Ifo
|
||||
else if ((data[3] & 0x40) != 0) FrameRate = 25;
|
||||
}
|
||||
|
||||
private byte GetBCDValue(byte data)
|
||||
private static byte GetBCDValue(byte data)
|
||||
{
|
||||
return (byte)((((data & 0xF0) >> 4) * 10) + (data & 0x0F));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
{
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
{
|
||||
@@ -68,7 +66,7 @@ namespace DvdLib.Ifo
|
||||
ProhibitedUserOperations = (UserOperation)br.ReadUInt32();
|
||||
AudioStreamControl = br.ReadBytes(16);
|
||||
SubpictureStreamControl = br.ReadBytes(128);
|
||||
|
||||
|
||||
_nextProgramNumber = br.ReadUInt16();
|
||||
_prevProgramNumber = br.ReadUInt16();
|
||||
_goupProgramNumber = br.ReadUInt16();
|
||||
@@ -89,7 +87,7 @@ namespace DvdLib.Ifo
|
||||
br.BaseStream.Seek(startPos + _cellPositionOffset, SeekOrigin.Begin);
|
||||
for (int cellNum = 0; cellNum < _cellCount; cellNum++)
|
||||
{
|
||||
Cell c = new Cell();
|
||||
var c = new Cell();
|
||||
c.ParsePosition(br);
|
||||
Cells.Add(c);
|
||||
}
|
||||
@@ -101,12 +99,12 @@ namespace DvdLib.Ifo
|
||||
}
|
||||
|
||||
br.BaseStream.Seek(startPos + _programMapOffset, SeekOrigin.Begin);
|
||||
List<int> cellNumbers = new List<int>();
|
||||
var cellNumbers = new List<int>();
|
||||
for (int progNum = 0; progNum < _programCount; progNum++) cellNumbers.Add(br.ReadByte() - 1);
|
||||
|
||||
for (int i = 0; i < cellNumbers.Count; i++)
|
||||
{
|
||||
int max = (i + 1 == cellNumbers.Count) ? _cellCount : cellNumbers[i+1];
|
||||
int max = (i + 1 == cellNumbers.Count) ? _cellCount : cellNumbers[i + 1];
|
||||
Programs.Add(new Program(Cells.Where((c, idx) => idx >= cellNumbers[i] && idx < max).ToList()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
@@ -20,7 +17,7 @@ namespace DvdLib.Ifo
|
||||
public ProgramChain EntryProgramChain { get; private set; }
|
||||
public readonly List<ProgramChain> ProgramChains;
|
||||
|
||||
public readonly List<Chapter> Chapters;
|
||||
public readonly List<Chapter> Chapters;
|
||||
|
||||
public Title(uint titleNum)
|
||||
{
|
||||
@@ -53,7 +50,7 @@ namespace DvdLib.Ifo
|
||||
long curPos = br.BaseStream.Position;
|
||||
br.BaseStream.Seek(startByte, SeekOrigin.Begin);
|
||||
|
||||
ProgramChain pgc = new ProgramChain(pgcNum);
|
||||
var pgc = new ProgramChain(pgcNum);
|
||||
pgc.ParseHeader(br);
|
||||
ProgramChains.Add(pgc);
|
||||
if (entryPgc) EntryProgramChain = pgc;
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
{
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DvdLib.Ifo
|
||||
{
|
||||
public enum VideoCodec
|
||||
|
||||
@@ -1,29 +1,21 @@
|
||||
using System.Resources;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Resources;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("DvdLib")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DvdLib")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyCompany("Jellyfin Project")]
|
||||
[assembly: AssemblyProduct("Jellyfin: The Free Software Media System")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License Version 2")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: NeutralResourcesLanguage("en")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.1")]
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Services;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using System.Text;
|
||||
using MediaBrowser.Controller.Net;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Dlna.Main;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Net;
|
||||
using MediaBrowser.Model.Services;
|
||||
|
||||
namespace Emby.Dlna.Api
|
||||
{
|
||||
@@ -115,29 +115,11 @@ namespace Emby.Dlna.Api
|
||||
public IRequest Request { get; set; }
|
||||
private IHttpResultFactory _resultFactory;
|
||||
|
||||
private IContentDirectory ContentDirectory
|
||||
{
|
||||
get
|
||||
{
|
||||
return DlnaEntryPoint.Current.ContentDirectory;
|
||||
}
|
||||
}
|
||||
private IContentDirectory ContentDirectory => DlnaEntryPoint.Current.ContentDirectory;
|
||||
|
||||
private IConnectionManager ConnectionManager
|
||||
{
|
||||
get
|
||||
{
|
||||
return DlnaEntryPoint.Current.ConnectionManager;
|
||||
}
|
||||
}
|
||||
private IConnectionManager ConnectionManager => DlnaEntryPoint.Current.ConnectionManager;
|
||||
|
||||
private IMediaReceiverRegistrar MediaReceiverRegistrar
|
||||
{
|
||||
get
|
||||
{
|
||||
return DlnaEntryPoint.Current.MediaReceiverRegistrar;
|
||||
}
|
||||
}
|
||||
private IMediaReceiverRegistrar MediaReceiverRegistrar => DlnaEntryPoint.Current.MediaReceiverRegistrar;
|
||||
|
||||
public DlnaServerService(IDlnaManager dlnaManager, IHttpResultFactory httpResultFactory)
|
||||
{
|
||||
@@ -227,7 +209,7 @@ namespace Emby.Dlna.Api
|
||||
// TODO: Work out what this is doing.
|
||||
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(first, "jellyfin", StringComparison.OrdinalIgnoreCase ))
|
||||
string.Equals(first, "jellyfin", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
index++;
|
||||
}
|
||||
@@ -254,12 +236,14 @@ namespace Emby.Dlna.Api
|
||||
|
||||
public object Get(GetIcon request)
|
||||
{
|
||||
var contentType = "image/" + Path.GetExtension(request.Filename).TrimStart('.').ToLower();
|
||||
var contentType = "image/" + Path.GetExtension(request.Filename)
|
||||
.TrimStart('.')
|
||||
.ToLowerInvariant();
|
||||
|
||||
var cacheLength = TimeSpan.FromDays(365);
|
||||
var cacheKey = Request.RawUrl.GetMD5();
|
||||
|
||||
return _resultFactory.GetStaticResult(Request, cacheKey, null, cacheLength, contentType, () => Task.FromResult<Stream>(_dlnaManager.GetIcon(request.Filename).Stream));
|
||||
return _resultFactory.GetStaticResult(Request, cacheKey, null, cacheLength, contentType, () => Task.FromResult(_dlnaManager.GetIcon(request.Filename).Stream));
|
||||
}
|
||||
|
||||
public object Subscribe(ProcessContentDirectoryEventRequest request)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Net;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
@@ -80,4 +80,4 @@ namespace Emby.Dlna.Api
|
||||
_dlnaManager.CreateProfile(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
|
||||
namespace Emby.Dlna.Common
|
||||
{
|
||||
{
|
||||
public class Argument
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Direction { get; set; }
|
||||
public string Direction { get; set; }
|
||||
|
||||
public string RelatedStateVariable { get; set; }
|
||||
public string RelatedStateVariable { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
namespace Emby.Dlna.Common
|
||||
{
|
||||
public class DeviceIcon
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
namespace Emby.Dlna.Common
|
||||
{
|
||||
public class DeviceService
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Emby.Dlna.Common
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace Emby.Dlna.Common
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
namespace Emby.Dlna.Configuration
|
||||
{
|
||||
public class DlnaOptions
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using Emby.Dlna.Configuration;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Configuration;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
|
||||
namespace Emby.Dlna
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using MediaBrowser.Common.Net;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Xml;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Dlna.ConnectionManager
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Emby.Dlna.Common;
|
||||
using Emby.Dlna.Service;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Common;
|
||||
using Emby.Dlna.Service;
|
||||
|
||||
namespace Emby.Dlna.ConnectionManager
|
||||
{
|
||||
@@ -11,7 +11,7 @@ namespace Emby.Dlna.ConnectionManager
|
||||
return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(), GetStateVariables());
|
||||
}
|
||||
|
||||
private IEnumerable<StateVariable> GetStateVariables()
|
||||
private static IEnumerable<StateVariable> GetStateVariables()
|
||||
{
|
||||
var list = new List<StateVariable>();
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using Emby.Dlna.Server;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Xml;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Dlna.ConnectionManager
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Emby.Dlna.Common;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Common;
|
||||
|
||||
namespace Emby.Dlna.ConnectionManager
|
||||
{
|
||||
@@ -19,7 +19,7 @@ namespace Emby.Dlna.ConnectionManager
|
||||
return list;
|
||||
}
|
||||
|
||||
private ServiceAction PrepareForConnection()
|
||||
private static ServiceAction PrepareForConnection()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
@@ -77,8 +77,8 @@ namespace Emby.Dlna.ConnectionManager
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
private ServiceAction GetCurrentConnectionInfo()
|
||||
|
||||
private static ServiceAction GetCurrentConnectionInfo()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
using MediaBrowser.Common.Net;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Controller.TV;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Xml;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Dlna.ContentDirectory
|
||||
{
|
||||
@@ -76,7 +76,6 @@ namespace Emby.Dlna.ContentDirectory
|
||||
_dlna.GetDefaultProfile();
|
||||
|
||||
var serverAddress = request.RequestedUrl.Substring(0, request.RequestedUrl.IndexOf("/dlna", StringComparison.OrdinalIgnoreCase));
|
||||
string accessToken = null;
|
||||
|
||||
var user = GetUser(profile);
|
||||
|
||||
@@ -85,7 +84,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
_libraryManager,
|
||||
profile,
|
||||
serverAddress,
|
||||
accessToken,
|
||||
null,
|
||||
_imageProcessor,
|
||||
_userDataManager,
|
||||
user,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Emby.Dlna.Common;
|
||||
using Emby.Dlna.Service;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Common;
|
||||
using Emby.Dlna.Service;
|
||||
|
||||
namespace Emby.Dlna.ContentDirectory
|
||||
{
|
||||
@@ -8,11 +8,11 @@ namespace Emby.Dlna.ContentDirectory
|
||||
{
|
||||
public string GetXml()
|
||||
{
|
||||
return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(),
|
||||
return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(),
|
||||
GetStateVariables());
|
||||
}
|
||||
|
||||
private IEnumerable<StateVariable> GetStateVariables()
|
||||
private static IEnumerable<StateVariable> GetStateVariables()
|
||||
{
|
||||
var list = new List<StateVariable>();
|
||||
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Channels;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using Emby.Dlna.Didl;
|
||||
using Emby.Dlna.Server;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
@@ -21,17 +5,28 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using Emby.Dlna.Didl;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Controller.Playlists;
|
||||
using MediaBrowser.Controller.TV;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using MediaBrowser.Model.Xml;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Dlna.ContentDirectory
|
||||
{
|
||||
@@ -68,7 +63,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
_profile = profile;
|
||||
_config = config;
|
||||
|
||||
_didlBuilder = new DidlBuilder(profile, user, imageProcessor, serverAddress, accessToken, userDataManager, localization, mediaSourceManager, Logger, libraryManager, mediaEncoder);
|
||||
_didlBuilder = new DidlBuilder(profile, user, imageProcessor, serverAddress, accessToken, userDataManager, localization, mediaSourceManager, _logger, mediaEncoder);
|
||||
}
|
||||
|
||||
protected override IEnumerable<KeyValuePair<string, string>> GetResult(string methodName, IDictionary<string, string> methodParams)
|
||||
@@ -197,9 +192,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
|
||||
public string GetValueOrDefault(IDictionary<string, string> sparams, string key, string defaultValue)
|
||||
{
|
||||
string val;
|
||||
|
||||
if (sparams.TryGetValue(key, out val))
|
||||
if (sparams.TryGetValue(key, out string val))
|
||||
{
|
||||
return val;
|
||||
}
|
||||
@@ -221,14 +214,12 @@ namespace Emby.Dlna.ContentDirectory
|
||||
int? requestedCount = null;
|
||||
int? start = 0;
|
||||
|
||||
int requestedVal;
|
||||
if (sparams.ContainsKey("RequestedCount") && int.TryParse(sparams["RequestedCount"], out requestedVal) && requestedVal > 0)
|
||||
if (sparams.ContainsKey("RequestedCount") && int.TryParse(sparams["RequestedCount"], out var requestedVal) && requestedVal > 0)
|
||||
{
|
||||
requestedCount = requestedVal;
|
||||
}
|
||||
|
||||
int startVal;
|
||||
if (sparams.ContainsKey("StartingIndex") && int.TryParse(sparams["StartingIndex"], out startVal) && startVal > 0)
|
||||
if (sparams.ContainsKey("StartingIndex") && int.TryParse(sparams["StartingIndex"], out var startVal) && startVal > 0)
|
||||
{
|
||||
start = startVal;
|
||||
}
|
||||
@@ -247,7 +238,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
|
||||
var dlnaOptions = _config.GetDlnaConfiguration();
|
||||
|
||||
using (XmlWriter writer = XmlWriter.Create(builder, settings))
|
||||
using (var writer = XmlWriter.Create(builder, settings))
|
||||
{
|
||||
//writer.WriteStartDocument();
|
||||
|
||||
@@ -311,7 +302,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
|
||||
var resXML = builder.ToString();
|
||||
|
||||
return new []
|
||||
return new[]
|
||||
{
|
||||
new KeyValuePair<string,string>("Result", resXML),
|
||||
new KeyValuePair<string,string>("NumberReturned", provided.ToString(_usCulture)),
|
||||
@@ -339,14 +330,12 @@ namespace Emby.Dlna.ContentDirectory
|
||||
int? requestedCount = null;
|
||||
int? start = 0;
|
||||
|
||||
int requestedVal;
|
||||
if (sparams.ContainsKey("RequestedCount") && int.TryParse(sparams["RequestedCount"], out requestedVal) && requestedVal > 0)
|
||||
if (sparams.ContainsKey("RequestedCount") && int.TryParse(sparams["RequestedCount"], out var requestedVal) && requestedVal > 0)
|
||||
{
|
||||
requestedCount = requestedVal;
|
||||
}
|
||||
|
||||
int startVal;
|
||||
if (sparams.ContainsKey("StartingIndex") && int.TryParse(sparams["StartingIndex"], out startVal) && startVal > 0)
|
||||
if (sparams.ContainsKey("StartingIndex") && int.TryParse(sparams["StartingIndex"], out var startVal) && startVal > 0)
|
||||
{
|
||||
start = startVal;
|
||||
}
|
||||
@@ -363,7 +352,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
int totalCount = 0;
|
||||
int provided = 0;
|
||||
|
||||
using (XmlWriter writer = XmlWriter.Create(builder, settings))
|
||||
using (var writer = XmlWriter.Create(builder, settings))
|
||||
{
|
||||
//writer.WriteStartDocument();
|
||||
|
||||
@@ -465,7 +454,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
User = user,
|
||||
Recursive = true,
|
||||
IsMissing = false,
|
||||
ExcludeItemTypes = new[] { typeof(Game).Name, typeof(Book).Name },
|
||||
ExcludeItemTypes = new[] { typeof(Book).Name },
|
||||
IsFolder = isFolder,
|
||||
MediaTypes = mediaTypes.ToArray(),
|
||||
DtoOptions = GetDtoOptions()
|
||||
@@ -494,27 +483,26 @@ namespace Emby.Dlna.ContentDirectory
|
||||
return GetGenreItems(item, Guid.Empty, user, sort, startIndex, limit);
|
||||
}
|
||||
|
||||
if (!stubType.HasValue || stubType.Value != StubType.Folder)
|
||||
if ((!stubType.HasValue || stubType.Value != StubType.Folder)
|
||||
&& item is IHasCollectionType collectionFolder)
|
||||
{
|
||||
var collectionFolder = item as IHasCollectionType;
|
||||
if (collectionFolder != null && string.Equals(CollectionType.Music, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
if (string.Equals(CollectionType.Music, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return GetMusicFolders(item, user, stubType, sort, startIndex, limit);
|
||||
}
|
||||
if (collectionFolder != null && string.Equals(CollectionType.Movies, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
else if (string.Equals(CollectionType.Movies, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return GetMovieFolders(item, user, stubType, sort, startIndex, limit);
|
||||
}
|
||||
if (collectionFolder != null && string.Equals(CollectionType.TvShows, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
else if (string.Equals(CollectionType.TvShows, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return GetTvFolders(item, user, stubType, sort, startIndex, limit);
|
||||
}
|
||||
|
||||
if (collectionFolder != null && string.Equals(CollectionType.Folders, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
else if (string.Equals(CollectionType.Folders, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return GetFolders(item, user, stubType, sort, startIndex, limit);
|
||||
}
|
||||
if (collectionFolder != null && string.Equals(CollectionType.LiveTv, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
else if (string.Equals(CollectionType.LiveTv, collectionFolder.CollectionType, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return GetLiveTvChannels(item, user, stubType, sort, startIndex, limit);
|
||||
}
|
||||
@@ -535,7 +523,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
Limit = limit,
|
||||
StartIndex = startIndex,
|
||||
IsVirtualItem = false,
|
||||
ExcludeItemTypes = new[] { typeof(Game).Name, typeof(Book).Name },
|
||||
ExcludeItemTypes = new[] { typeof(Book).Name },
|
||||
IsPlaceHolder = false,
|
||||
DtoOptions = GetDtoOptions()
|
||||
};
|
||||
@@ -1144,7 +1132,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
StartIndex = query.StartIndex,
|
||||
UserId = query.User.Id
|
||||
|
||||
}, new [] { parent }, query.DtoOptions);
|
||||
}, new[] { parent }, query.DtoOptions);
|
||||
|
||||
return ToResult(result);
|
||||
}
|
||||
@@ -1298,7 +1286,6 @@ namespace Emby.Dlna.ContentDirectory
|
||||
|
||||
private ServerItem ParseItemId(string id, User user)
|
||||
{
|
||||
Guid itemId;
|
||||
StubType? stubType = null;
|
||||
|
||||
// After using PlayTo, MediaMonkey sends a request to the server trying to get item info
|
||||
@@ -1324,7 +1311,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
}
|
||||
}
|
||||
|
||||
if (Guid.TryParse(id, out itemId))
|
||||
if (Guid.TryParse(id, out var itemId))
|
||||
{
|
||||
var item = _libraryManager.GetItemById(itemId);
|
||||
|
||||
@@ -1334,7 +1321,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
};
|
||||
}
|
||||
|
||||
Logger.Error("Error parsing item Id: {0}. Returning user root folder.", id);
|
||||
_logger.LogError("Error parsing item Id: {id}. Returning user root folder.", id);
|
||||
|
||||
return new ServerItem(_libraryManager.GetUserRootFolder());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Emby.Dlna.Common;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Common;
|
||||
|
||||
namespace Emby.Dlna.ContentDirectory
|
||||
{
|
||||
@@ -7,7 +7,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
{
|
||||
public IEnumerable<ServiceAction> GetActions()
|
||||
{
|
||||
return new []
|
||||
return new[]
|
||||
{
|
||||
GetSearchCapabilitiesAction(),
|
||||
GetSortCapabilitiesAction(),
|
||||
@@ -20,7 +20,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
};
|
||||
}
|
||||
|
||||
private ServiceAction GetGetSystemUpdateIDAction()
|
||||
private static ServiceAction GetGetSystemUpdateIDAction()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
@@ -37,7 +37,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
return action;
|
||||
}
|
||||
|
||||
private ServiceAction GetSearchCapabilitiesAction()
|
||||
private static ServiceAction GetSearchCapabilitiesAction()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
@@ -54,7 +54,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
return action;
|
||||
}
|
||||
|
||||
private ServiceAction GetSortCapabilitiesAction()
|
||||
private static ServiceAction GetSortCapabilitiesAction()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
@@ -71,7 +71,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
return action;
|
||||
}
|
||||
|
||||
private ServiceAction GetX_GetFeatureListAction()
|
||||
private static ServiceAction GetX_GetFeatureListAction()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
@@ -88,7 +88,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
return action;
|
||||
}
|
||||
|
||||
private ServiceAction GetSearchAction()
|
||||
private static ServiceAction GetSearchAction()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
@@ -334,7 +334,7 @@ namespace Emby.Dlna.ContentDirectory
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
|
||||
private ServiceAction GetXSetBookmarkAction()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Emby.Dlna
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Emby.Dlna
|
||||
{
|
||||
@@ -15,4 +15,4 @@ namespace Emby.Dlna
|
||||
Headers = new Dictionary<string, string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using Emby.Dlna.Configuration;
|
||||
using Emby.Dlna.ContentDirectory;
|
||||
using MediaBrowser.Controller.Channels;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
@@ -6,23 +13,15 @@ using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Controller.Playlists;
|
||||
using Emby.Dlna.ContentDirectory;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.Net;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using Emby.Dlna.Configuration;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Net;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Dlna.Didl
|
||||
{
|
||||
@@ -44,22 +43,30 @@ namespace Emby.Dlna.Didl
|
||||
private readonly ILocalizationManager _localization;
|
||||
private readonly IMediaSourceManager _mediaSourceManager;
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
|
||||
public DidlBuilder(DeviceProfile profile, User user, IImageProcessor imageProcessor, string serverAddress, string accessToken, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, ILogger logger, ILibraryManager libraryManager, IMediaEncoder mediaEncoder)
|
||||
public DidlBuilder(
|
||||
DeviceProfile profile,
|
||||
User user,
|
||||
IImageProcessor imageProcessor,
|
||||
string serverAddress,
|
||||
string accessToken,
|
||||
IUserDataManager userDataManager,
|
||||
ILocalizationManager localization,
|
||||
IMediaSourceManager mediaSourceManager,
|
||||
ILogger logger,
|
||||
IMediaEncoder mediaEncoder)
|
||||
{
|
||||
_profile = profile;
|
||||
_user = user;
|
||||
_imageProcessor = imageProcessor;
|
||||
_serverAddress = serverAddress;
|
||||
_accessToken = accessToken;
|
||||
_userDataManager = userDataManager;
|
||||
_localization = localization;
|
||||
_mediaSourceManager = mediaSourceManager;
|
||||
_logger = logger;
|
||||
_libraryManager = libraryManager;
|
||||
_mediaEncoder = mediaEncoder;
|
||||
_accessToken = accessToken;
|
||||
_user = user;
|
||||
}
|
||||
|
||||
public static string NormalizeDlnaMediaUrl(string url)
|
||||
@@ -79,7 +86,7 @@ namespace Emby.Dlna.Didl
|
||||
|
||||
using (StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8))
|
||||
{
|
||||
using (XmlWriter writer = XmlWriter.Create(builder, settings))
|
||||
using (var writer = XmlWriter.Create(builder, settings))
|
||||
{
|
||||
//writer.WriteStartDocument();
|
||||
|
||||
@@ -118,7 +125,8 @@ namespace Emby.Dlna.Didl
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteItemElement(DlnaOptions options,
|
||||
public void WriteItemElement(
|
||||
DlnaOptions options,
|
||||
XmlWriter writer,
|
||||
BaseItem item,
|
||||
User user,
|
||||
@@ -173,16 +181,6 @@ namespace Emby.Dlna.Didl
|
||||
writer.WriteFullEndElement();
|
||||
}
|
||||
|
||||
private ILogger GetStreamBuilderLogger(DlnaOptions options)
|
||||
{
|
||||
if (options.EnableDebugLog)
|
||||
{
|
||||
return _logger;
|
||||
}
|
||||
|
||||
return new NullLogger();
|
||||
}
|
||||
|
||||
private string GetMimeType(string input)
|
||||
{
|
||||
var mime = MimeTypes.GetMimeType(input);
|
||||
@@ -202,7 +200,7 @@ namespace Emby.Dlna.Didl
|
||||
{
|
||||
var sources = _mediaSourceManager.GetStaticMediaSources(video, true, _user);
|
||||
|
||||
streamInfo = new StreamBuilder(_mediaEncoder, GetStreamBuilderLogger(options)).BuildVideoItem(new VideoOptions
|
||||
streamInfo = new StreamBuilder(_mediaEncoder, _logger).BuildVideoItem(new VideoOptions
|
||||
{
|
||||
ItemId = video.Id,
|
||||
MediaSources = sources.ToArray(),
|
||||
@@ -243,12 +241,15 @@ namespace Emby.Dlna.Didl
|
||||
AddVideoResource(writer, video, deviceId, filter, contentFeature, streamInfo);
|
||||
}
|
||||
|
||||
var subtitleProfiles = streamInfo.GetSubtitleProfiles(_mediaEncoder, false, _serverAddress, _accessToken)
|
||||
.Where(subtitle => subtitle.DeliveryMethod == SubtitleDeliveryMethod.External)
|
||||
.ToList();
|
||||
var subtitleProfiles = streamInfo.GetSubtitleProfiles(_mediaEncoder, false, _serverAddress, _accessToken);
|
||||
|
||||
foreach (var subtitle in subtitleProfiles)
|
||||
{
|
||||
if (subtitle.DeliveryMethod != SubtitleDeliveryMethod.External)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var subtitleAdded = AddSubtitleElement(writer, subtitle);
|
||||
|
||||
if (subtitleAdded && _profile.EnableSingleSubtitleLimit)
|
||||
@@ -261,7 +262,8 @@ namespace Emby.Dlna.Didl
|
||||
private bool AddSubtitleElement(XmlWriter writer, SubtitleStreamInfo info)
|
||||
{
|
||||
var subtitleProfile = _profile.SubtitleProfiles
|
||||
.FirstOrDefault(i => string.Equals(info.Format, i.Format, StringComparison.OrdinalIgnoreCase) && i.Method == SubtitleDeliveryMethod.External);
|
||||
.FirstOrDefault(i => string.Equals(info.Format, i.Format, StringComparison.OrdinalIgnoreCase)
|
||||
&& i.Method == SubtitleDeliveryMethod.External);
|
||||
|
||||
if (subtitleProfile == null)
|
||||
{
|
||||
@@ -276,7 +278,7 @@ namespace Emby.Dlna.Didl
|
||||
// <sec:CaptionInfo sec:type="srt">http://192.168.1.3:9999/video.srt</sec:CaptionInfo>
|
||||
|
||||
writer.WriteStartElement("sec", "CaptionInfoEx", null);
|
||||
writer.WriteAttributeString("sec", "type", null, info.Format.ToLower());
|
||||
writer.WriteAttributeString("sec", "type", null, info.Format.ToLowerInvariant());
|
||||
|
||||
writer.WriteString(info.Url);
|
||||
writer.WriteFullEndElement();
|
||||
@@ -293,7 +295,7 @@ namespace Emby.Dlna.Didl
|
||||
else
|
||||
{
|
||||
writer.WriteStartElement(string.Empty, "res", NS_DIDL);
|
||||
var protocolInfo = string.Format("http-get:*:text/{0}:*", info.Format.ToLower());
|
||||
var protocolInfo = string.Format("http-get:*:text/{0}:*", info.Format.ToLowerInvariant());
|
||||
writer.WriteAttributeString("protocolInfo", protocolInfo);
|
||||
|
||||
writer.WriteString(info.Url);
|
||||
@@ -385,7 +387,7 @@ namespace Emby.Dlna.Didl
|
||||
? GetMimeType(filename)
|
||||
: mediaProfile.MimeType;
|
||||
|
||||
writer.WriteAttributeString("protocolInfo", String.Format(
|
||||
writer.WriteAttributeString("protocolInfo", string.Format(
|
||||
"http-get:*:{0}:{1}",
|
||||
mimeType,
|
||||
contentFeatures
|
||||
@@ -398,91 +400,39 @@ namespace Emby.Dlna.Didl
|
||||
|
||||
private string GetDisplayName(BaseItem item, StubType? itemStubType, BaseItem context)
|
||||
{
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Latest)
|
||||
if (itemStubType.HasValue)
|
||||
{
|
||||
return _localization.GetLocalizedString("Latest");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Playlists)
|
||||
{
|
||||
return _localization.GetLocalizedString("Playlists");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.AlbumArtists)
|
||||
{
|
||||
return _localization.GetLocalizedString("HeaderAlbumArtists");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Albums)
|
||||
{
|
||||
return _localization.GetLocalizedString("Albums");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Artists)
|
||||
{
|
||||
return _localization.GetLocalizedString("Artists");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Songs)
|
||||
{
|
||||
return _localization.GetLocalizedString("Songs");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Genres)
|
||||
{
|
||||
return _localization.GetLocalizedString("Genres");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteAlbums)
|
||||
{
|
||||
return _localization.GetLocalizedString("HeaderFavoriteAlbums");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteArtists)
|
||||
{
|
||||
return _localization.GetLocalizedString("HeaderFavoriteArtists");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteSongs)
|
||||
{
|
||||
return _localization.GetLocalizedString("HeaderFavoriteSongs");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.ContinueWatching)
|
||||
{
|
||||
return _localization.GetLocalizedString("HeaderContinueWatching");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Movies)
|
||||
{
|
||||
return _localization.GetLocalizedString("Movies");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Collections)
|
||||
{
|
||||
return _localization.GetLocalizedString("Collections");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Favorites)
|
||||
{
|
||||
return _localization.GetLocalizedString("Favorites");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.NextUp)
|
||||
{
|
||||
return _localization.GetLocalizedString("HeaderNextUp");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteSeries)
|
||||
{
|
||||
return _localization.GetLocalizedString("HeaderFavoriteShows");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteEpisodes)
|
||||
{
|
||||
return _localization.GetLocalizedString("HeaderFavoriteEpisodes");
|
||||
}
|
||||
if (itemStubType.HasValue && itemStubType.Value == StubType.Series)
|
||||
{
|
||||
return _localization.GetLocalizedString("Shows");
|
||||
switch (itemStubType.Value)
|
||||
{
|
||||
case StubType.Latest: return _localization.GetLocalizedString("Latest");
|
||||
case StubType.Playlists: return _localization.GetLocalizedString("Playlists");
|
||||
case StubType.AlbumArtists: return _localization.GetLocalizedString("HeaderAlbumArtists");
|
||||
case StubType.Albums: return _localization.GetLocalizedString("Albums");
|
||||
case StubType.Artists: return _localization.GetLocalizedString("Artists");
|
||||
case StubType.Songs: return _localization.GetLocalizedString("Songs");
|
||||
case StubType.Genres: return _localization.GetLocalizedString("Genres");
|
||||
case StubType.FavoriteAlbums: return _localization.GetLocalizedString("HeaderFavoriteAlbums");
|
||||
case StubType.FavoriteArtists: return _localization.GetLocalizedString("HeaderFavoriteArtists");
|
||||
case StubType.FavoriteSongs: return _localization.GetLocalizedString("HeaderFavoriteSongs");
|
||||
case StubType.ContinueWatching: return _localization.GetLocalizedString("HeaderContinueWatching");
|
||||
case StubType.Movies: return _localization.GetLocalizedString("Movies");
|
||||
case StubType.Collections: return _localization.GetLocalizedString("Collections");
|
||||
case StubType.Favorites: return _localization.GetLocalizedString("Favorites");
|
||||
case StubType.NextUp: return _localization.GetLocalizedString("HeaderNextUp");
|
||||
case StubType.FavoriteSeries: return _localization.GetLocalizedString("HeaderFavoriteShows");
|
||||
case StubType.FavoriteEpisodes: return _localization.GetLocalizedString("HeaderFavoriteEpisodes");
|
||||
case StubType.Series: return _localization.GetLocalizedString("Shows");
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
var episode = item as Episode;
|
||||
var season = context as Season;
|
||||
|
||||
if (episode != null && season != null)
|
||||
if (item is Episode episode && context is Season season)
|
||||
{
|
||||
// This is a special embedded within a season
|
||||
if (item.ParentIndexNumber.HasValue && item.ParentIndexNumber.Value == 0)
|
||||
if (item.ParentIndexNumber.HasValue && item.ParentIndexNumber.Value == 0
|
||||
&& season.IndexNumber.HasValue && season.IndexNumber.Value != 0)
|
||||
{
|
||||
if (season.IndexNumber.HasValue && season.IndexNumber.Value != 0)
|
||||
{
|
||||
return string.Format(_localization.GetLocalizedString("ValueSpecialEpisodeName"), item.Name);
|
||||
}
|
||||
return string.Format(_localization.GetLocalizedString("ValueSpecialEpisodeName"), item.Name);
|
||||
}
|
||||
|
||||
if (item.IndexNumber.HasValue)
|
||||
@@ -509,7 +459,7 @@ namespace Emby.Dlna.Didl
|
||||
{
|
||||
var sources = _mediaSourceManager.GetStaticMediaSources(audio, true, _user);
|
||||
|
||||
streamInfo = new StreamBuilder(_mediaEncoder, GetStreamBuilderLogger(options)).BuildAudioItem(new AudioOptions
|
||||
streamInfo = new StreamBuilder(_mediaEncoder, _logger).BuildAudioItem(new AudioOptions
|
||||
{
|
||||
ItemId = audio.Id,
|
||||
MediaSources = sources.ToArray(),
|
||||
@@ -583,7 +533,7 @@ namespace Emby.Dlna.Didl
|
||||
streamInfo.RunTimeTicks ?? 0,
|
||||
streamInfo.TranscodeSeekInfo);
|
||||
|
||||
writer.WriteAttributeString("protocolInfo", String.Format(
|
||||
writer.WriteAttributeString("protocolInfo", string.Format(
|
||||
"http-get:*:{0}:{1}",
|
||||
mimeType,
|
||||
contentFeatures
|
||||
@@ -596,10 +546,8 @@ namespace Emby.Dlna.Didl
|
||||
|
||||
public static bool IsIdRoot(string id)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(id) ||
|
||||
|
||||
string.Equals(id, "0", StringComparison.OrdinalIgnoreCase)
|
||||
|
||||
if (string.IsNullOrWhiteSpace(id)
|
||||
|| string.Equals(id, "0", StringComparison.OrdinalIgnoreCase)
|
||||
// Samsung sometimes uses 1 as root
|
||||
|| string.Equals(id, "1", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -819,7 +767,7 @@ namespace Emby.Dlna.Didl
|
||||
{
|
||||
writer.WriteString(_profile.RequiresPlainFolders ? "object.container.storageFolder" : "object.container.genre.musicGenre");
|
||||
}
|
||||
else if (item is Genre || item is GameGenre)
|
||||
else if (item is Genre)
|
||||
{
|
||||
writer.WriteString(_profile.RequiresPlainFolders ? "object.container.storageFolder" : "object.container.genre");
|
||||
}
|
||||
@@ -855,7 +803,7 @@ namespace Emby.Dlna.Didl
|
||||
// var type = types.FirstOrDefault(i => string.Equals(i, actor.Type, StringComparison.OrdinalIgnoreCase) || string.Equals(i, actor.Role, StringComparison.OrdinalIgnoreCase))
|
||||
// ?? PersonType.Actor;
|
||||
|
||||
// AddValue(writer, "upnp", type.ToLower(), actor.Name, NS_UPNP);
|
||||
// AddValue(writer, "upnp", type.ToLowerInvariant(), actor.Name, NS_UPNP);
|
||||
|
||||
// index++;
|
||||
|
||||
@@ -923,9 +871,9 @@ namespace Emby.Dlna.Didl
|
||||
|
||||
writer.WriteFullEndElement();
|
||||
}
|
||||
catch (XmlException)
|
||||
catch (XmlException ex)
|
||||
{
|
||||
//_logger.Error("Error adding xml value: " + value);
|
||||
_logger.LogError(ex, "Error adding xml value: {value}", name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -935,21 +883,15 @@ namespace Emby.Dlna.Didl
|
||||
{
|
||||
writer.WriteElementString(prefix, name, namespaceUri, value);
|
||||
}
|
||||
catch (XmlException)
|
||||
catch (XmlException ex)
|
||||
{
|
||||
//_logger.Error("Error adding xml value: " + value);
|
||||
_logger.LogError(ex, "Error adding xml value: {value}", value);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddCover(BaseItem item, BaseItem context, StubType? stubType, XmlWriter writer)
|
||||
{
|
||||
ImageDownloadInfo imageInfo = null;
|
||||
|
||||
// Finally, just use the image from the item
|
||||
if (imageInfo == null)
|
||||
{
|
||||
imageInfo = GetImageInfo(item);
|
||||
}
|
||||
ImageDownloadInfo imageInfo = GetImageInfo(item);
|
||||
|
||||
if (imageInfo == null)
|
||||
{
|
||||
@@ -1027,7 +969,7 @@ namespace Emby.Dlna.Didl
|
||||
var contentFeatures = new ContentFeatureBuilder(_profile)
|
||||
.BuildImageHeader(format, width, height, imageInfo.IsDirectStream, org_Pn);
|
||||
|
||||
writer.WriteAttributeString("protocolInfo", String.Format(
|
||||
writer.WriteAttributeString("protocolInfo", string.Format(
|
||||
"http-get:*:{0}:{1}",
|
||||
GetMimeType("file." + format),
|
||||
contentFeatures
|
||||
@@ -1080,9 +1022,9 @@ namespace Emby.Dlna.Didl
|
||||
{
|
||||
tag = _imageProcessor.GetImageCacheTag(item, type);
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
_logger.LogError(ex, "Error getting image cache tag");
|
||||
}
|
||||
|
||||
int? width = imageInfo.Width;
|
||||
@@ -1105,8 +1047,8 @@ namespace Emby.Dlna.Didl
|
||||
//{
|
||||
// var size = _imageProcessor.GetImageSize(imageInfo);
|
||||
|
||||
// width = Convert.ToInt32(size.Width);
|
||||
// height = Convert.ToInt32(size.Height);
|
||||
// width = size.Width;
|
||||
// height = size.Height;
|
||||
//}
|
||||
//catch
|
||||
//{
|
||||
@@ -1129,7 +1071,7 @@ namespace Emby.Dlna.Didl
|
||||
};
|
||||
}
|
||||
|
||||
class ImageDownloadInfo
|
||||
private class ImageDownloadInfo
|
||||
{
|
||||
internal Guid ItemId;
|
||||
internal string ImageTag;
|
||||
@@ -1145,7 +1087,7 @@ namespace Emby.Dlna.Didl
|
||||
internal ItemImageInfo ItemImageInfo;
|
||||
}
|
||||
|
||||
class ImageUrlInfo
|
||||
private class ImageUrlInfo
|
||||
{
|
||||
internal string Url;
|
||||
|
||||
@@ -1164,7 +1106,7 @@ namespace Emby.Dlna.Didl
|
||||
|
||||
if (stubType.HasValue)
|
||||
{
|
||||
id = stubType.Value.ToString().ToLower() + "_" + id;
|
||||
id = stubType.Value.ToString().ToLowerInvariant() + "_" + id;
|
||||
}
|
||||
|
||||
return id;
|
||||
@@ -1179,8 +1121,7 @@ namespace Emby.Dlna.Didl
|
||||
info.ImageTag,
|
||||
format,
|
||||
maxWidth.ToString(CultureInfo.InvariantCulture),
|
||||
maxHeight.ToString(CultureInfo.InvariantCulture)
|
||||
);
|
||||
maxHeight.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
var width = info.Width;
|
||||
var height = info.Height;
|
||||
@@ -1189,15 +1130,11 @@ namespace Emby.Dlna.Didl
|
||||
|
||||
if (width.HasValue && height.HasValue)
|
||||
{
|
||||
var newSize = DrawingUtils.Resize(new ImageSize
|
||||
{
|
||||
Height = height.Value,
|
||||
Width = width.Value
|
||||
var newSize = DrawingUtils.Resize(
|
||||
new ImageDimensions(width.Value, height.Value), 0, 0, maxWidth, maxHeight);
|
||||
|
||||
}, 0, 0, maxWidth, maxHeight);
|
||||
|
||||
width = Convert.ToInt32(newSize.Width);
|
||||
height = Convert.ToInt32(newSize.Height);
|
||||
width = newSize.Width;
|
||||
height = newSize.Height;
|
||||
|
||||
var normalizedFormat = format
|
||||
.Replace("jpeg", "jpg", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
|
||||
namespace Emby.Dlna.Didl
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Emby.Dlna.Didl
|
||||
{
|
||||
@@ -53,9 +51,6 @@ namespace Emby.Dlna.Didl
|
||||
_encoding = encoding;
|
||||
}
|
||||
|
||||
public override Encoding Encoding
|
||||
{
|
||||
get { return (null == _encoding) ? base.Encoding : _encoding; }
|
||||
}
|
||||
public override Encoding Encoding => (null == _encoding) ? base.Encoding : _encoding;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Controller.Plugins;
|
||||
using Emby.Dlna.Profiles;
|
||||
using Emby.Dlna.Server;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Dlna.Profiles;
|
||||
using Emby.Dlna.Server;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Reflection;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Dlna
|
||||
{
|
||||
@@ -34,31 +33,32 @@ namespace Emby.Dlna
|
||||
|
||||
private readonly Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>> _profiles = new Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>>(StringComparer.Ordinal);
|
||||
|
||||
public DlnaManager(IXmlSerializer xmlSerializer,
|
||||
public DlnaManager(
|
||||
IXmlSerializer xmlSerializer,
|
||||
IFileSystem fileSystem,
|
||||
IApplicationPaths appPaths,
|
||||
ILogger logger,
|
||||
ILoggerFactory loggerFactory,
|
||||
IJsonSerializer jsonSerializer, IServerApplicationHost appHost, IAssemblyInfo assemblyInfo)
|
||||
{
|
||||
_xmlSerializer = xmlSerializer;
|
||||
_fileSystem = fileSystem;
|
||||
_appPaths = appPaths;
|
||||
_logger = logger;
|
||||
_logger = loggerFactory.CreateLogger("Dlna");
|
||||
_jsonSerializer = jsonSerializer;
|
||||
_appHost = appHost;
|
||||
_assemblyInfo = assemblyInfo;
|
||||
}
|
||||
|
||||
public void InitProfiles()
|
||||
public async Task InitProfilesAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
ExtractSystemProfiles();
|
||||
await ExtractSystemProfilesAsync();
|
||||
LoadProfiles();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error extracting DLNA profiles.", ex);
|
||||
_logger.LogError(ex, "Error extracting DLNA profiles.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace Emby.Dlna
|
||||
{
|
||||
if (deviceInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException("deviceInfo");
|
||||
throw new ArgumentNullException(nameof(deviceInfo));
|
||||
}
|
||||
|
||||
var profile = GetProfiles()
|
||||
@@ -103,7 +103,7 @@ namespace Emby.Dlna
|
||||
|
||||
if (profile != null)
|
||||
{
|
||||
_logger.Debug("Found matching device profile: {0}", profile.Name);
|
||||
_logger.LogDebug("Found matching device profile: {0}", profile.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -117,6 +117,7 @@ namespace Emby.Dlna
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
|
||||
builder.AppendLine("No matching device profile found. The default will need to be used.");
|
||||
builder.AppendLine(string.Format("DeviceDescription:{0}", profile.DeviceDescription ?? string.Empty));
|
||||
builder.AppendLine(string.Format("FriendlyName:{0}", profile.FriendlyName ?? string.Empty));
|
||||
builder.AppendLine(string.Format("Manufacturer:{0}", profile.Manufacturer ?? string.Empty));
|
||||
@@ -127,7 +128,7 @@ namespace Emby.Dlna
|
||||
builder.AppendLine(string.Format("ModelUrl:{0}", profile.ModelUrl ?? string.Empty));
|
||||
builder.AppendLine(string.Format("SerialNumber:{0}", profile.SerialNumber ?? string.Empty));
|
||||
|
||||
_logger.LogMultiline("No matching device profile found. The default will need to be used.", LogSeverity.Info, builder);
|
||||
_logger.LogInformation(builder.ToString());
|
||||
}
|
||||
|
||||
private bool IsMatch(DeviceIdentification deviceInfo, DeviceIdentification profileInfo)
|
||||
@@ -197,7 +198,7 @@ namespace Emby.Dlna
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
_logger.ErrorException("Error evaluating regex pattern {0}", ex, pattern);
|
||||
_logger.LogError(ex, "Error evaluating regex pattern {Pattern}", pattern);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -206,7 +207,7 @@ namespace Emby.Dlna
|
||||
{
|
||||
if (headers == null)
|
||||
{
|
||||
throw new ArgumentNullException("headers");
|
||||
throw new ArgumentNullException(nameof(headers));
|
||||
}
|
||||
|
||||
// Convert to case insensitive
|
||||
@@ -216,12 +217,12 @@ namespace Emby.Dlna
|
||||
|
||||
if (profile != null)
|
||||
{
|
||||
_logger.Debug("Found matching device profile: {0}", profile.Name);
|
||||
_logger.LogDebug("Found matching device profile: {0}", profile.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
var headerString = string.Join(", ", headers.Select(i => string.Format("{0}={1}", i.Key, i.Value)).ToArray());
|
||||
_logger.Debug("No matching device profile found. {0}", headerString);
|
||||
_logger.LogDebug("No matching device profile found. {0}", headerString);
|
||||
}
|
||||
|
||||
return profile;
|
||||
@@ -240,9 +241,7 @@ namespace Emby.Dlna
|
||||
return false;
|
||||
}
|
||||
|
||||
string value;
|
||||
|
||||
if (headers.TryGetValue(header.Name, out value))
|
||||
if (headers.TryGetValue(header.Name, out string value))
|
||||
{
|
||||
switch (header.Match)
|
||||
{
|
||||
@@ -250,7 +249,7 @@ namespace Emby.Dlna
|
||||
return string.Equals(value, header.Value, StringComparison.OrdinalIgnoreCase);
|
||||
case HeaderMatchType.Substring:
|
||||
var isMatch = value.IndexOf(header.Value, StringComparison.OrdinalIgnoreCase) != -1;
|
||||
//_logger.Debug("IsMatch-Substring value: {0} testValue: {1} isMatch: {2}", value, header.Value, isMatch);
|
||||
//_logger.LogDebug("IsMatch-Substring value: {0} testValue: {1} isMatch: {2}", value, header.Value, isMatch);
|
||||
return isMatch;
|
||||
case HeaderMatchType.Regex:
|
||||
return Regex.IsMatch(value, header.Value, RegexOptions.IgnoreCase);
|
||||
@@ -262,21 +261,9 @@ namespace Emby.Dlna
|
||||
return false;
|
||||
}
|
||||
|
||||
private string UserProfilesPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "user");
|
||||
}
|
||||
}
|
||||
private string UserProfilesPath => Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "user");
|
||||
|
||||
private string SystemProfilesPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "system");
|
||||
}
|
||||
}
|
||||
private string SystemProfilesPath => Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "system");
|
||||
|
||||
private IEnumerable<DeviceProfile> GetProfiles(string path, DeviceProfileType type)
|
||||
{
|
||||
@@ -301,8 +288,7 @@ namespace Emby.Dlna
|
||||
{
|
||||
lock (_profiles)
|
||||
{
|
||||
Tuple<InternalProfileInfo, DeviceProfile> profileTuple;
|
||||
if (_profiles.TryGetValue(path, out profileTuple))
|
||||
if (_profiles.TryGetValue(path, out Tuple<InternalProfileInfo, DeviceProfile> profileTuple))
|
||||
{
|
||||
return profileTuple.Item2;
|
||||
}
|
||||
@@ -315,7 +301,7 @@ namespace Emby.Dlna
|
||||
|
||||
profile = ReserializeProfile(tempProfile);
|
||||
|
||||
profile.Id = path.ToLower().GetMD5().ToString("N");
|
||||
profile.Id = path.ToLowerInvariant().GetMD5().ToString("N");
|
||||
|
||||
_profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
|
||||
|
||||
@@ -323,7 +309,7 @@ namespace Emby.Dlna
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error parsing profile file: {0}", ex, path);
|
||||
_logger.LogError(ex, "Error parsing profile file: {Path}", path);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -334,7 +320,7 @@ namespace Emby.Dlna
|
||||
{
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
throw new ArgumentNullException("id");
|
||||
throw new ArgumentNullException(nameof(id));
|
||||
}
|
||||
|
||||
var info = GetProfileInfosInternal().First(i => string.Equals(i.Info.Id, id, StringComparison.OrdinalIgnoreCase));
|
||||
@@ -367,14 +353,14 @@ namespace Emby.Dlna
|
||||
|
||||
Info = new DeviceProfileInfo
|
||||
{
|
||||
Id = file.FullName.ToLower().GetMD5().ToString("N"),
|
||||
Id = file.FullName.ToLowerInvariant().GetMD5().ToString("N"),
|
||||
Name = _fileSystem.GetFileNameWithoutExtension(file),
|
||||
Type = type
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void ExtractSystemProfiles()
|
||||
private async Task ExtractSystemProfilesAsync()
|
||||
{
|
||||
var namespaceName = GetType().Namespace + ".Profiles.Xml.";
|
||||
|
||||
@@ -394,18 +380,18 @@ namespace Emby.Dlna
|
||||
|
||||
if (!fileInfo.Exists || fileInfo.Length != stream.Length)
|
||||
{
|
||||
_fileSystem.CreateDirectory(systemProfilesPath);
|
||||
Directory.CreateDirectory(systemProfilesPath);
|
||||
|
||||
using (var fileStream = _fileSystem.GetFileStream(path, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read))
|
||||
{
|
||||
stream.CopyTo(fileStream);
|
||||
await stream.CopyToAsync(fileStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Not necessary, but just to make it easy to find
|
||||
_fileSystem.CreateDirectory(UserProfilesPath);
|
||||
Directory.CreateDirectory(UserProfilesPath);
|
||||
}
|
||||
|
||||
public void DeleteProfile(string id)
|
||||
@@ -521,7 +507,7 @@ namespace Emby.Dlna
|
||||
? ImageFormat.Png
|
||||
: ImageFormat.Jpg;
|
||||
|
||||
var resource = GetType().Namespace + ".Images." + filename.ToLower();
|
||||
var resource = GetType().Namespace + ".Images." + filename.ToLowerInvariant();
|
||||
|
||||
return new ImageStream
|
||||
{
|
||||
@@ -530,8 +516,8 @@ namespace Emby.Dlna
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class DlnaProfileEntryPoint /*: IServerEntryPoint*/
|
||||
/*
|
||||
class DlnaProfileEntryPoint : IServerEntryPoint
|
||||
{
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
@@ -551,7 +537,7 @@ namespace Emby.Dlna
|
||||
|
||||
private void DumpProfiles()
|
||||
{
|
||||
var list = new List<DeviceProfile>
|
||||
DeviceProfile[] list = new []
|
||||
{
|
||||
new SamsungSmartTvProfile(),
|
||||
new XboxOneProfile(),
|
||||
@@ -596,5 +582,5 @@ namespace Emby.Dlna
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SharedVersion.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Emby.Dlna
|
||||
{
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
@@ -9,6 +5,9 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.Net;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Dlna.Eventing
|
||||
{
|
||||
@@ -34,7 +33,7 @@ namespace Emby.Dlna.Eventing
|
||||
|
||||
// Remove logging for now because some devices are sending this very frequently
|
||||
// TODO re-enable with dlna debug logging setting
|
||||
//_logger.Debug("Renewing event subscription for {0} with timeout of {1} to {2}",
|
||||
//_logger.LogDebug("Renewing event subscription for {0} with timeout of {1} to {2}",
|
||||
// subscription.NotificationType,
|
||||
// timeout,
|
||||
// subscription.CallbackUrl);
|
||||
@@ -60,7 +59,7 @@ namespace Emby.Dlna.Eventing
|
||||
|
||||
// Remove logging for now because some devices are sending this very frequently
|
||||
// TODO re-enable with dlna debug logging setting
|
||||
//_logger.Debug("Creating event subscription for {0} with timeout of {1} to {2}",
|
||||
//_logger.LogDebug("Creating event subscription for {0} with timeout of {1} to {2}",
|
||||
// notificationType,
|
||||
// timeout,
|
||||
// callbackUrl);
|
||||
@@ -83,9 +82,7 @@ namespace Emby.Dlna.Eventing
|
||||
// Starts with SECOND-
|
||||
header = header.Split('-').Last();
|
||||
|
||||
int val;
|
||||
|
||||
if (int.TryParse(header, NumberStyles.Integer, _usCulture, out val))
|
||||
if (int.TryParse(header, NumberStyles.Integer, _usCulture, out var val))
|
||||
{
|
||||
return val;
|
||||
}
|
||||
@@ -96,10 +93,9 @@ namespace Emby.Dlna.Eventing
|
||||
|
||||
public EventSubscriptionResponse CancelEventSubscription(string subscriptionId)
|
||||
{
|
||||
_logger.Debug("Cancelling event subscription {0}", subscriptionId);
|
||||
_logger.LogDebug("Cancelling event subscription {0}", subscriptionId);
|
||||
|
||||
EventSubscription sub;
|
||||
_subscriptions.TryRemove(subscriptionId, out sub);
|
||||
_subscriptions.TryRemove(subscriptionId, out EventSubscription sub);
|
||||
|
||||
return new EventSubscriptionResponse
|
||||
{
|
||||
@@ -130,9 +126,7 @@ namespace Emby.Dlna.Eventing
|
||||
|
||||
private EventSubscription GetSubscription(string id, bool throwOnMissing)
|
||||
{
|
||||
EventSubscription e;
|
||||
|
||||
if (!_subscriptions.TryGetValue(id, out e) && throwOnMissing)
|
||||
if (!_subscriptions.TryGetValue(id, out EventSubscription e) && throwOnMissing)
|
||||
{
|
||||
throw new ResourceNotFoundException("Event with Id " + id + " not found.");
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace Emby.Dlna.Eventing
|
||||
{
|
||||
@@ -23,12 +23,6 @@ namespace Emby.Dlna.Eventing
|
||||
TriggerCount++;
|
||||
}
|
||||
|
||||
public bool IsExpired
|
||||
{
|
||||
get
|
||||
{
|
||||
return SubscriptionTime.AddSeconds(TimeoutSeconds) >= DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
public bool IsExpired => SubscriptionTime.AddSeconds(TimeoutSeconds) >= DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
namespace Emby.Dlna
|
||||
{
|
||||
public interface IConnectionManager : IEventManager, IUpnpService
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
namespace Emby.Dlna
|
||||
{
|
||||
public interface IContentDirectory : IEventManager, IUpnpService
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
namespace Emby.Dlna
|
||||
{
|
||||
public interface IEventManager
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
namespace Emby.Dlna
|
||||
{
|
||||
public interface IMediaReceiverRegistrar : IEventManager, IUpnpService
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Emby.Dlna
|
||||
{
|
||||
@@ -10,7 +10,7 @@ namespace Emby.Dlna
|
||||
/// <param name="headers">The headers.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
string GetServiceXml(IDictionary<string, string> headers);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Processes the control request.
|
||||
/// </summary>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 2.5 KiB |
@@ -1,4 +1,10 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Dlna.PlayTo;
|
||||
using Emby.Dlna.Ssdp;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller;
|
||||
@@ -6,25 +12,18 @@ using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Controller.Plugins;
|
||||
using MediaBrowser.Controller.Session;
|
||||
using MediaBrowser.Controller.TV;
|
||||
using Emby.Dlna.PlayTo;
|
||||
using Emby.Dlna.Ssdp;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.Threading;
|
||||
using MediaBrowser.Model.Xml;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Rssdp;
|
||||
using Rssdp.Infrastructure;
|
||||
using System.Threading;
|
||||
|
||||
namespace Emby.Dlna.Main
|
||||
{
|
||||
@@ -49,8 +48,7 @@ namespace Emby.Dlna.Main
|
||||
private readonly IDeviceDiscovery _deviceDiscovery;
|
||||
|
||||
private SsdpDevicePublisher _Publisher;
|
||||
|
||||
private readonly ITimerFactory _timerFactory;
|
||||
|
||||
private readonly ISocketFactory _socketFactory;
|
||||
private readonly IEnvironmentInfo _environmentInfo;
|
||||
private readonly INetworkManager _networkManager;
|
||||
@@ -64,7 +62,7 @@ namespace Emby.Dlna.Main
|
||||
public static DlnaEntryPoint Current;
|
||||
|
||||
public DlnaEntryPoint(IServerConfigurationManager config,
|
||||
ILogManager logManager,
|
||||
ILoggerFactory loggerFactory,
|
||||
IServerApplicationHost appHost,
|
||||
ISessionManager sessionManager,
|
||||
IHttpClient httpClient,
|
||||
@@ -75,11 +73,10 @@ namespace Emby.Dlna.Main
|
||||
IUserDataManager userDataManager,
|
||||
ILocalizationManager localizationManager,
|
||||
IMediaSourceManager mediaSourceManager,
|
||||
IDeviceDiscovery deviceDiscovery,
|
||||
IMediaEncoder mediaEncoder,
|
||||
ISocketFactory socketFactory,
|
||||
ITimerFactory timerFactory,
|
||||
IEnvironmentInfo environmentInfo,
|
||||
IDeviceDiscovery deviceDiscovery,
|
||||
IMediaEncoder mediaEncoder,
|
||||
ISocketFactory socketFactory,
|
||||
IEnvironmentInfo environmentInfo,
|
||||
INetworkManager networkManager,
|
||||
IUserViewManager userViewManager,
|
||||
IXmlReaderSettingsFactory xmlReaderSettingsFactory,
|
||||
@@ -99,24 +96,23 @@ namespace Emby.Dlna.Main
|
||||
_deviceDiscovery = deviceDiscovery;
|
||||
_mediaEncoder = mediaEncoder;
|
||||
_socketFactory = socketFactory;
|
||||
_timerFactory = timerFactory;
|
||||
_environmentInfo = environmentInfo;
|
||||
_networkManager = networkManager;
|
||||
_logger = logManager.GetLogger("Dlna");
|
||||
_logger = loggerFactory.CreateLogger("Dlna");
|
||||
|
||||
ContentDirectory = new ContentDirectory.ContentDirectory(dlnaManager,
|
||||
userDataManager,
|
||||
imageProcessor,
|
||||
libraryManager,
|
||||
config,
|
||||
userManager,
|
||||
_logger,
|
||||
httpClient,
|
||||
localizationManager,
|
||||
mediaSourceManager,
|
||||
ContentDirectory = new ContentDirectory.ContentDirectory(dlnaManager,
|
||||
userDataManager,
|
||||
imageProcessor,
|
||||
libraryManager,
|
||||
config,
|
||||
userManager,
|
||||
_logger,
|
||||
httpClient,
|
||||
localizationManager,
|
||||
mediaSourceManager,
|
||||
userViewManager,
|
||||
mediaEncoder,
|
||||
xmlReaderSettingsFactory,
|
||||
mediaEncoder,
|
||||
xmlReaderSettingsFactory,
|
||||
tvSeriesManager);
|
||||
|
||||
ConnectionManager = new ConnectionManager.ConnectionManager(dlnaManager, config, _logger, httpClient, xmlReaderSettingsFactory);
|
||||
@@ -125,9 +121,9 @@ namespace Emby.Dlna.Main
|
||||
Current = this;
|
||||
}
|
||||
|
||||
public void Run()
|
||||
public async Task RunAsync()
|
||||
{
|
||||
((DlnaManager)_dlnaManager).InitProfiles();
|
||||
await ((DlnaManager)_dlnaManager).InitProfilesAsync().ConfigureAwait(false);
|
||||
|
||||
ReloadComponents();
|
||||
|
||||
@@ -185,13 +181,13 @@ namespace Emby.Dlna.Main
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error starting ssdp handlers", ex);
|
||||
_logger.LogError(ex, "Error starting ssdp handlers");
|
||||
}
|
||||
}
|
||||
|
||||
private void LogMessage(string msg)
|
||||
{
|
||||
_logger.Debug(msg);
|
||||
_logger.LogDebug(msg);
|
||||
}
|
||||
|
||||
private void StartDeviceDiscovery(ISsdpCommunicationsServer communicationsServer)
|
||||
@@ -202,7 +198,7 @@ namespace Emby.Dlna.Main
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error starting device discovery", ex);
|
||||
_logger.LogError(ex, "Error starting device discovery");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,12 +206,12 @@ namespace Emby.Dlna.Main
|
||||
{
|
||||
try
|
||||
{
|
||||
_logger.Info("Disposing DeviceDiscovery");
|
||||
_logger.LogInformation("Disposing DeviceDiscovery");
|
||||
((DeviceDiscovery)_deviceDiscovery).Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error stopping device discovery", ex);
|
||||
_logger.LogError(ex, "Error stopping device discovery");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +229,7 @@ namespace Emby.Dlna.Main
|
||||
|
||||
try
|
||||
{
|
||||
_Publisher = new SsdpDevicePublisher(_communicationsServer, _timerFactory, _environmentInfo.OperatingSystemName, _environmentInfo.OperatingSystemVersion);
|
||||
_Publisher = new SsdpDevicePublisher(_communicationsServer, _environmentInfo.OperatingSystemName, _environmentInfo.OperatingSystemVersion);
|
||||
_Publisher.LogFunction = LogMessage;
|
||||
_Publisher.SupportPnpRootDevice = false;
|
||||
|
||||
@@ -243,7 +239,7 @@ namespace Emby.Dlna.Main
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error registering endpoint", ex);
|
||||
_logger.LogError(ex, "Error registering endpoint");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +259,7 @@ namespace Emby.Dlna.Main
|
||||
|
||||
var fullService = "urn:schemas-upnp-org:device:MediaServer:1";
|
||||
|
||||
_logger.Info("Registering publisher for {0} on {1}", fullService, address.ToString());
|
||||
_logger.LogInformation("Registering publisher for {0} on {1}", fullService, address);
|
||||
|
||||
var descriptorUri = "/dlna/" + udn + "/description.xml";
|
||||
var uri = new Uri(_appHost.GetLocalApiUrl(address) + descriptorUri);
|
||||
@@ -271,18 +267,18 @@ namespace Emby.Dlna.Main
|
||||
var device = new SsdpRootDevice
|
||||
{
|
||||
CacheLifetime = TimeSpan.FromSeconds(1800), //How long SSDP clients can cache this info.
|
||||
Location = uri, // Must point to the URL that serves your devices UPnP description document.
|
||||
Location = uri, // Must point to the URL that serves your devices UPnP description document.
|
||||
FriendlyName = "Jellyfin",
|
||||
Manufacturer = "Jellyfin",
|
||||
ModelName = "Jellyfin Server",
|
||||
Uuid = udn
|
||||
// This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc.
|
||||
// This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc.
|
||||
};
|
||||
|
||||
SetProperies(device, fullService);
|
||||
_Publisher.AddDevice(device);
|
||||
|
||||
var embeddedDevices = new []
|
||||
var embeddedDevices = new[]
|
||||
{
|
||||
"urn:schemas-upnp-org:service:ContentDirectory:1",
|
||||
"urn:schemas-upnp-org:service:ConnectionManager:1",
|
||||
@@ -297,7 +293,7 @@ namespace Emby.Dlna.Main
|
||||
Manufacturer = device.Manufacturer,
|
||||
ModelName = device.ModelName,
|
||||
Uuid = udn
|
||||
// This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc.
|
||||
// This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc.
|
||||
};
|
||||
|
||||
SetProperies(embeddedDevice, subDevice);
|
||||
@@ -308,8 +304,7 @@ namespace Emby.Dlna.Main
|
||||
|
||||
private string CreateUuid(string text)
|
||||
{
|
||||
Guid guid;
|
||||
if (!Guid.TryParse(text, out guid))
|
||||
if (!Guid.TryParse(text, out var guid))
|
||||
{
|
||||
guid = text.GetMD5();
|
||||
}
|
||||
@@ -354,14 +349,13 @@ namespace Emby.Dlna.Main
|
||||
_userDataManager,
|
||||
_localization,
|
||||
_mediaSourceManager,
|
||||
_mediaEncoder,
|
||||
_timerFactory);
|
||||
_mediaEncoder);
|
||||
|
||||
_manager.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error starting PlayTo manager", ex);
|
||||
_logger.LogError(ex, "Error starting PlayTo manager");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -374,12 +368,12 @@ namespace Emby.Dlna.Main
|
||||
{
|
||||
try
|
||||
{
|
||||
_logger.Info("Disposing PlayToManager");
|
||||
_logger.LogInformation("Disposing PlayToManager");
|
||||
_manager.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error disposing PlayTo manager", ex);
|
||||
_logger.LogError(ex, "Error disposing PlayTo manager");
|
||||
}
|
||||
_manager = null;
|
||||
}
|
||||
@@ -394,7 +388,7 @@ namespace Emby.Dlna.Main
|
||||
|
||||
if (_communicationsServer != null)
|
||||
{
|
||||
_logger.Info("Disposing SsdpCommunicationsServer");
|
||||
_logger.LogInformation("Disposing SsdpCommunicationsServer");
|
||||
_communicationsServer.Dispose();
|
||||
_communicationsServer = null;
|
||||
}
|
||||
@@ -409,7 +403,7 @@ namespace Emby.Dlna.Main
|
||||
{
|
||||
if (_Publisher != null)
|
||||
{
|
||||
_logger.Info("Disposing SsdpDevicePublisher");
|
||||
_logger.LogInformation("Disposing SsdpDevicePublisher");
|
||||
_Publisher.Dispose();
|
||||
_Publisher = null;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using Emby.Dlna.Server;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Model.Xml;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
{
|
||||
@@ -21,7 +20,7 @@ namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
throw new ResourceNotFoundException("Unexpected control request name: " + methodName);
|
||||
}
|
||||
|
||||
private IEnumerable<KeyValuePair<string, string>> HandleIsAuthorized()
|
||||
private static IEnumerable<KeyValuePair<string, string>> HandleIsAuthorized()
|
||||
{
|
||||
return new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
@@ -29,7 +28,7 @@ namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
};
|
||||
}
|
||||
|
||||
private IEnumerable<KeyValuePair<string, string>> HandleIsValidated()
|
||||
private static IEnumerable<KeyValuePair<string, string>> HandleIsValidated()
|
||||
{
|
||||
return new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Service;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Model.Xml;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Emby.Dlna.Common;
|
||||
using Emby.Dlna.Service;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Common;
|
||||
using Emby.Dlna.Service;
|
||||
|
||||
namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
{
|
||||
@@ -12,7 +12,7 @@ namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
GetStateVariables());
|
||||
}
|
||||
|
||||
private IEnumerable<StateVariable> GetStateVariables()
|
||||
private static IEnumerable<StateVariable> GetStateVariables()
|
||||
{
|
||||
var list = new List<StateVariable>();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Emby.Dlna.Common;
|
||||
using System.Collections.Generic;
|
||||
using Emby.Dlna.Common;
|
||||
|
||||
namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
{
|
||||
@@ -7,7 +7,7 @@ namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
{
|
||||
public IEnumerable<ServiceAction> GetActions()
|
||||
{
|
||||
return new []
|
||||
return new[]
|
||||
{
|
||||
GetIsValidated(),
|
||||
GetIsAuthorized(),
|
||||
@@ -19,7 +19,7 @@ namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
};
|
||||
}
|
||||
|
||||
private ServiceAction GetIsValidated()
|
||||
private static ServiceAction GetIsValidated()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
@@ -41,7 +41,7 @@ namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
return action;
|
||||
}
|
||||
|
||||
private ServiceAction GetIsAuthorized()
|
||||
private static ServiceAction GetIsAuthorized()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
@@ -63,7 +63,7 @@ namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
return action;
|
||||
}
|
||||
|
||||
private ServiceAction GetRegisterDevice()
|
||||
private static ServiceAction GetRegisterDevice()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
@@ -85,7 +85,7 @@ namespace Emby.Dlna.MediaReceiverRegistrar
|
||||
return action;
|
||||
}
|
||||
|
||||
private ServiceAction GetGetValidationSucceededUpdateID()
|
||||
private static ServiceAction GetGetValidationSucceededUpdateID()
|
||||
{
|
||||
var action = new ServiceAction
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace Emby.Dlna.PlayTo
|
||||
{
|
||||
public class CurrentIdEventArgs : EventArgs
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||