Compare commits

..

1199 Commits

Author SHA1 Message Date
Joshua M. Boniface
d8c3b26fa6 Merge pull request #1846 from jellyfin/EraYaN-patch-1
Switch to custom patched build for ffmpeg for the Windows installer
2019-10-06 19:23:01 -04:00
Erwin de Haan
adde41c533 Remove /bin from ffmpeg path. 2019-10-06 22:26:17 +02:00
Erwin de Haan
3925e1dced Fix extracted path from ffmpeg zip. 2019-10-06 22:20:49 +02:00
Erwin de Haan
c7d1206dcb Switch to custom patched build for ffmpeg 2019-10-06 22:03:44 +02:00
Vasily
f1567c64a5 Merge pull request #1844 from dkanada/poster
Fix missing image on seasons without posters
2019-10-06 22:16:21 +03:00
Joshua M. Boniface
d900cc5c53 Merge pull request #1845 from joshuaboniface/mesa-va-drivers-fix
Correct missing mesa-va-drivers package
2019-10-06 15:12:48 -04:00
Poki
5c456231b1 Translated using Weblate (Finnish)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fi/
2019-10-06 09:14:04 -04:00
Joshua Boniface
abde7c0242 Make the comment nicer 2019-10-05 18:38:55 -04:00
Joshua Boniface
762d17c3df Move copy steps further so they're not overwriting 2019-10-05 18:24:38 -04:00
dkanada
e006b7f1e1 add comment explaining a bug fix 2019-10-06 01:24:04 +09:00
dkanada
db10f380d1 fix missing image on seasons without posters 2019-10-06 00:58:27 +09:00
Poki
60f8aa540f Added translation using Weblate (Finnish) 2019-10-05 08:04:16 -04:00
Joshua M. Boniface
7b64c696f7 Merge pull request #1841 from joshuaboniface/docs-url
Update Docs to docs.jellyfin.org URL
2019-10-04 15:13:07 -04:00
Joshua Boniface
0367dc21f8 Update GitHub templates 2019-10-04 15:07:59 -04:00
Joshua Boniface
7a172a9051 Update Docs to docs.jellyfin.org URL 2019-10-04 14:37:36 -04:00
Joshua M. Boniface
5bb44c36e1 Merge pull request #1822 from anthonylavado/readme-fix
Update README for new docs location
2019-10-04 13:24:17 -04:00
Bond-009
3ad34de808 Update ApplicationHost.cs 2019-10-04 18:53:26 +02:00
Joo-Hong Lee
4025b2c6a1 Translated using Weblate (Korean)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ko/
2019-10-04 00:13:59 -04:00
Joshua M. Boniface
6b00cc1a06 Merge pull request #1829 from thornbill/fix-sd-auth
Fix SchedulesDirect authentication
2019-10-02 12:36:25 -04:00
Bill Thornton
80dccdef22 Add using block and HexHelper 2019-10-02 09:51:53 -04:00
SaddFox
b0ec5c527d Translated using Weblate (Slovenian)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/sl/
2019-10-02 02:13:58 -04:00
Kamilake
5d073713b6 Translated using Weblate (Korean)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ko/
2019-10-02 02:13:58 -04:00
WontTell
d93853375e Translated using Weblate (Spanish (Mexico))
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/es_MX/
2019-10-02 02:13:58 -04:00
h4ss2
26872eb2c2 Translated using Weblate (Arabic)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ar/
2019-10-02 02:13:58 -04:00
Bill Thornton
119041a425 Fix SchedulesDirect authentication 2019-10-02 01:35:28 -04:00
Joshua M. Boniface
9c85566da7 Merge pull request #1825 from jellyfin/revert-1802-fix-premature-stop
Revert "Fix premature stop when streaming"
2019-10-01 13:55:11 -04:00
Joshua M. Boniface
575b96d03a Revert "Fix premature stop when streaming" 2019-10-01 12:07:09 -04:00
Anthony Lavado
823f648955 Update README for new docs location
Updates several links in the readme to point to our new docs location.
2019-09-30 17:49:37 -04:00
Joshua M. Boniface
7203f463f4 Merge pull request #1820 from joshuaboniface/fix-portable
Properly build DLL for porable
2019-09-30 01:40:50 -04:00
Joshua Boniface
3651755984 Properly build DLL for porable 2019-09-30 01:11:11 -04:00
Joshua M. Boniface
180fb857ed Merge pull request #1819 from nvllsvm/ffmpeg_kill
Ignore exception when attempting to kill ffmpeg that has exited
2019-09-29 20:23:19 -04:00
Joshua M. Boniface
cb09459ad1 Merge pull request #1818 from jellyfin/EraYaN-ci-web-clone-fix
Fix SourceBranch -> SourceBranchName in git clone for Web UI
2019-09-29 19:52:05 -04:00
Andrew Rabert
fd1bdad0e2 Ignore exception when attempting to kill ffmpeg that has exited
A race condition where this code attempts to kill an already exited
ffmpeg process is possible. This results in unnecessary error logging.

This change replaces the generic exception handling with the above
mentioned exception. No log output is produced.
2019-09-29 19:19:53 -04:00
Erwin de Haan
b2ba3a5922 Fix SourceBranch -> SourceBranchName in git clone for Web UI 2019-09-29 23:46:09 +02:00
Joshua M. Boniface
749023bf02 Merge pull request #1811 from joshuaboniface/fix-listen
Configure Kestrel listener to use configured IPs
2019-09-29 17:22:40 -04:00
Joshua M. Boniface
dcc8c7b92a Merge pull request #1808 from joshuaboniface/fix-amf-win
Change Win32 AMF flag to d3d11va
2019-09-29 17:19:23 -04:00
Joshua M. Boniface
f63d591b08 Merge pull request #1817 from joshuaboniface/change-pragma-mode
Change PRAGMA mode from WAL to TRUNCATE
2019-09-29 17:19:08 -04:00
Joshua Boniface
387192610f Handle Kestrel startup failures with a nice error 2019-09-29 17:17:19 -04:00
Joshua M. Boniface
9aec21f6b5 Nicer link format for comment
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-09-29 16:18:05 -04:00
Joshua M. Boniface
e183a14933 Merge pull request #1814 from Bond-009/ffmpeg_fix
Fix ffmpeg version check for unknown versions
2019-09-29 16:16:58 -04:00
Joshua Boniface
72edf5b555 Change PRAGMA mode from WAL to TRUNCATE 2019-09-29 15:53:35 -04:00
Joshua Boniface
7fd75bf071 Change Win32 AMF flag to d3d11va for Windows 8+ 2019-09-29 12:39:52 -04:00
Joshua M. Boniface
d64005df40 Merge pull request #1812 from dkanada/settings
Avoid editing preferences without user interaction
2019-09-29 11:43:03 -04:00
Joshua M. Boniface
c523e576c4 Merge pull request #1815 from Bond-009/fix_tests
Fix tests
2019-09-29 11:26:09 -04:00
Bond_009
d1a6e8c99e Fix tests 2019-09-29 13:57:43 +02:00
Bond_009
3e1aab6b29 Fix ffmpeg version check for unknown versions 2019-09-29 13:43:47 +02:00
dkanada
7a88e7fa34 avoid editing preferences without user interaction 2019-09-29 16:21:32 +09:00
Joshua Boniface
cabb9aed31 Configure Kestrel listener to use configured IPs 2019-09-29 00:37:48 -04:00
Joshua M. Boniface
61f2c41b76 Recursively zip Windows packages (#1809)
Without -r the directory is not properly zipped up.
2019-09-29 00:33:31 -04:00
Joshua M. Boniface
3249fbb715 Merge pull request #1804 from Bond-009/ffmpeg_tests
Add tests for EncoderValidator and add support for ffmpeg 4.2
2019-09-28 18:08:38 -04:00
Joshua M. Boniface
2d797adc08 Merge pull request #1773 from sparky8251/remove-wan-ddns
Remove WAN DDNS
2019-09-28 18:08:24 -04:00
Joshua M. Boniface
c069496b27 Merge pull request #1770 from sparky8251/remove-wan-ip
Remove WAN IP Detection
2019-09-28 18:08:10 -04:00
Joshua M. Boniface
c1e8087b11 Merge pull request #1803 from Bond-009/revision
Don't log revision number
2019-09-28 17:16:38 -04:00
Joshua M. Boniface
427d52cf9a Merge pull request #1805 from Bond-009/plugin_fix
Fix plugin installation
2019-09-28 15:23:08 -04:00
Bond_009
06d420f743 Fix plugin installation 2019-09-28 21:06:58 +02:00
Bond_009
05a1510b31 Add more test data 2019-09-28 19:49:41 +02:00
Bond_009
1b01a6ece1 Add tests for EncoderValidator
* Add support for ffmpeg 4.2
* Parse the complete ffmpeg version instead of only the first 2 digits
* Make max and min version optional
* Remove max limitation (for now)
* Style improvements
2019-09-28 19:41:34 +02:00
Joshua M. Boniface
3577ef6814 Merge pull request #1802 from JustAMan/fix-premature-stop
Fix premature stop when streaming
2019-09-28 11:15:33 -04:00
Joshua M. Boniface
75b7c9ac36 Do explicit dotnet publish in Dockerfiles (#1801)
The common.build.sh script was removed in #1793 but the Dockerfiles
still used this to perform the dotnet publish. Remove that call and do
the publish explicitly.
2019-09-27 23:02:18 -04:00
Bond_009
4f63bfd616 Don't log revision number 2019-09-27 23:58:04 +02:00
Vasily
4fae733eef Cleaned up move to HLS muxer 2019-09-27 18:22:43 +03:00
Vasily
36a34f911e Replaced "stream" muxer with "hls" trying to fix "premature stop" issue 2019-09-27 16:37:41 +03:00
Joshua M. Boniface
e4d5e5bf91 Merge pull request #1793 from joshuaboniface/fix-build
Clean up and update builds to use new jellyfin-web
2019-09-26 22:24:41 -04:00
Joshua Boniface
547a6121b0 Remove redundant yarn build command 2019-09-26 22:09:19 -04:00
Anthony Lavado
bae5e3795e Fix SetImage to avoid out of range exception (#1798)
* Fix SetImage to avoid out of range exception

* Actually use the new images we've retrieved
2019-09-26 09:47:48 -04:00
Joshua Boniface
3b935d8fd0 Clean up old changelog entires from Debian package 2019-09-25 14:54:39 -04:00
Joshua Boniface
15b83f8b55 Clean up and fix Fedora/CentOS builds
This performs a lot of bugfixing and general cleanup to the
Fedora/CentOS builds, including moving the create_tarball into the
docker-build.sh script, remove some old long versions from the spec
file, correcting several bugs with the Docker environment including
splitting them into more discrete layers, and finally making sure
jellyfin-web is included properly in the RPM.
2019-09-25 14:45:15 -04:00
Joshua Boniface
56a879e148 Use redirection instead of tee 2019-09-25 14:20:49 -04:00
Vasily
fc99f1f563 Merge pull request #1785 from dkanada/compat
Add mediabrowser route back for now
2019-09-25 14:18:21 +03:00
Joshua Boniface
4b257b7b4a Clean up web_build_dir in docker-build.sh 2019-09-25 01:36:20 -04:00
Joshua Boniface
172a81b22c Clean up deployment directory
1. Update README.md to remove some old info
2. Remove common.build.sh from all the build scripts
3. Remove common.build.sh script
4. Remove the docker folder as this isn't used at all
2019-09-25 01:28:07 -04:00
Joshua Boniface
5c7ca6b363 Port Windows x86 build to Docker and add web build 2019-09-25 01:27:35 -04:00
Joshua Boniface
93b213b59f Port Windows x64 build to Docker and add web build 2019-09-25 01:27:28 -04:00
Joshua Boniface
3b669521da Port Portable build to Docker and add web build 2019-09-25 01:10:04 -04:00
Joshua Boniface
05f01b2c45 Port MacOS build to Docker and add web build 2019-09-25 01:06:50 -04:00
Joshua Boniface
f36b898a4d Port Linux build to Docker and add web build 2019-09-25 01:06:18 -04:00
Joshua Boniface
fa9b0d9da1 Add web build to Fedora package build 2019-09-24 23:25:46 -04:00
Joshua Boniface
1c2fd4ef84 Add web build to CentOS package build 2019-09-24 23:24:22 -04:00
Joshua Boniface
be3b05df68 Add web build to Ubuntu arm64 package build 2019-09-24 23:17:11 -04:00
Joshua Boniface
601a50e430 Add web build to Ubuntu armhf package build 2019-09-24 23:15:31 -04:00
Joshua Boniface
03d60438e2 Add web build to Ubuntu amd64 package build 2019-09-24 23:13:40 -04:00
Joshua Boniface
9b6720ce80 Add web build to Debian arm64 package build 2019-09-24 23:11:18 -04:00
Joshua Boniface
b9e0a0b1ac Add web build to Debian armhf package build 2019-09-24 23:09:47 -04:00
Joshua Boniface
d22fd964c2 Add web build to Debian amd64 package build 2019-09-24 23:06:47 -04:00
Joshua Boniface
188ad540ee Remove submodule handling from build script 2019-09-24 23:06:27 -04:00
Joshua Boniface
12f24674fb Fix up Windows build script copy 2019-09-24 22:10:12 -04:00
Vasily
ac9dfa8e93 Merge pull request #1775 from Bond-009/fixes
Fix multiple mistakes and warnings
2019-09-24 19:08:39 +03:00
dkanada
b5b7db1f32 add an exception to logging 2019-09-24 23:59:24 +09:00
dkanada
ab7e697f30 add mediabrowser route back for now 2019-09-24 23:59:24 +09:00
Joshua M. Boniface
b086f6d330 Merge pull request #1791 from EraYaN/ci-web-build
Remove submodule and add clone and build to CI for web UI
2019-09-24 10:48:09 -04:00
Erwin de Haan
a73d87229a Add extra conditions. 2019-09-24 16:38:51 +02:00
Erwin de Haan
e9fb46b0cd Fix path typo and add same code to main build. 2019-09-24 16:32:57 +02:00
Erwin de Haan
0ca0d9d01e Remove submodule and add clone and build to CI 2019-09-24 16:22:26 +02:00
dkanada
1156b8f100 Merge pull request #1788 from joshuaboniface/ssl-dep-ubu
Include libssl-dev dep in Ubuntu build containers
2019-09-24 13:12:03 +09:00
Bond_009
c9820d30ed Fix multiple mistakes and warnings 2019-09-23 20:32:44 +02:00
Dan Johansen
b8fd6a7ec3 Translated using Weblate (Danish)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/da/
2019-09-23 12:28:24 -04:00
WWWesten
2c2a55abab Translated using Weblate (Russian)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ru/
2019-09-22 23:13:44 -04:00
Mário Victor Ribeiro Silva
f7e9b0a27f Translated using Weblate (Portuguese (Brazil))
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pt_BR/
2019-09-22 23:13:44 -04:00
pucherot
6b33089274 Translated using Weblate (Spanish)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/es/
2019-09-22 23:13:44 -04:00
Anthony Lavado
229bd598b5 Add escapes for path quotes in the NSIS Installer (#1777)
This adds backslashes to escape the `--datadir` path in the Windows Installer. Without this, the path would be dropped at the first space (e.g. `C:\Test Area\Jellyfin` would become `C:\Test`).

Fixes #1773.
2019-09-20 13:45:20 -04:00
Joshua Boniface
260dd37bd5 Include libssl-dev dep in Ubuntu build containers 2019-09-20 11:55:51 -04:00
Mark Bai
54d33c06c7 Translated using Weblate (Chinese (Simplified))
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hans/
2019-09-20 03:13:39 -04:00
Vasily
a7358171cf Merge pull request #1772 from sparky8251/better-hidden-defaults
Hide new users from public API by default
2019-09-19 23:28:53 +03:00
sparky8251
14f563d7c2 Removed WAN DDNS
It's odd that JF still had code lying around for generating a self signed cert. Currently, it does not do this so this code has been removed.

JF also appears to have functions in place to modify provided certs? Warrants deeper investigation. JF should not be attempting modifications of any certs under any circumstance.
2019-09-19 15:56:54 -04:00
sparky8251
44a3e0a97b Hide new users from public API by default 2019-09-19 15:16:57 -04:00
Joshua M. Boniface
e19474d22f Merge pull request #1643 from Bond-009/docs3
Fix some documentation warnings for MediaBrowser.XbmcMetadata
2019-09-19 11:26:26 -04:00
sparky8251
208c8b2b9d Remove missed unused functions
Forgot to remove these in the previous WAN IP detection removal commit
2019-09-19 11:21:19 -04:00
sparky8251
0562b4cf6f Remove WAN IP Detection 2019-09-19 10:55:58 -04:00
Joshua M. Boniface
8ba86fe272 Merge pull request #1765 from EraYaN/ci-add-submodule-update
Add submodule update to CI build.
2019-09-18 14:55:19 -04:00
Bond-009
fad4594062 Merge pull request #1768 from whooo/filewrite-log2
Set log level to debug for HTTP range requests
2019-09-18 20:22:44 +02:00
Erik Larsson
74864832ca Set log level to debug for HTTP range requests
This removes some spam when a DLNA renderer uses byte seeking.
2019-09-18 18:29:15 +02:00
Erwin de Haan
9c95eba5a1 Add VSTest support to CI (#1696)
* Add VSTest support to CI

Add result publishing

Move tests to windows.

Spacing issue.

Image name update.

* Passthrough main debug build

* Rectify mistake and build test assemblies seperately.

* Remove Test dependency
2019-09-18 11:43:02 -04:00
Bond-009
6f17a0b7af Remove legacy auth code (#1677)
* Remove legacy auth code

* Adds tests so we don't break PasswordHash (again)
* Clean up interfaces
* Remove duplicate code

* Use auto properties

* static using

* Don't use 'this'

* Fix build
2019-09-17 12:07:15 -04:00
Erwin de Haan
f8fed49225 Another condition update. 2019-09-17 16:45:18 +02:00
Erwin de Haan
8b438b68cc Added Better submodule updates. 2019-09-17 16:40:11 +02:00
Erwin de Haan
8f2ec3b197 Add submodule update to build. 2019-09-17 16:23:27 +02:00
Joshua M. Boniface
adc2a68a98 Merge pull request #1744 from Bond-009/dataprovider
Rewrite `ItemDataProvider` to be more robust
2019-09-17 09:11:50 -04:00
Joshua M. Boniface
39faadc9dc Merge pull request #1751 from Bond-009/login
Reset invalid login counter on successfull login
2019-09-17 09:11:25 -04:00
Joshua M. Boniface
c4c7ced948 Merge pull request #1764 from EraYaN/publish-ci-fault
Fix publish CI YAML parse error
2019-09-16 21:49:01 -04:00
Erwin de Haan
6fa1c5e214 Fix release symlink name. 2019-09-17 01:41:14 +02:00
Erwin de Haan
831ce4da13 Skip checkout for Publish CI pipelines 2019-09-17 01:37:42 +02:00
Erwin de Haan
24a5bebabe Fix yaml parse error 2019-09-17 01:33:17 +02:00
Erwin de Haan
42f761582f Add two manually triggered pipelines for publishing artifacts. (#1763)
* Added two extra pipelines.

* Change the sshEndpoint
2019-09-16 19:23:52 -04:00
nevado
cb32bf1c4f Add mesa-va-drivers to main Dockerfile (#1727) 2019-09-15 00:31:13 -04:00
Bond-009
318b9949f2 Improve Skia error handling (#1752) 2019-09-15 00:27:42 -04:00
Bond-009
221b831bb2 Reset invalid login counter on successfull login 2019-09-13 17:18:45 +02:00
Andrew Rabert
cc8609d0aa Merge pull request #1746 from nvllsvm/yarn
Docker - Build jellyfin-web
2019-09-12 22:19:35 -04:00
Andrew Rabert
03f32978c0 Docker - Build jellyfin-web 2019-09-12 18:24:09 -04:00
Bond_009
8fe7b6551f Rewrite ItemDataProvider to be more robust
* Stop locking 2+ times per operation
* Don't clone the list multiple times
* Keep the lock for the duration of the operation
2019-09-12 21:34:55 +02:00
Bond-009
2919cf28ea Update deps (#1735) 2019-09-11 13:31:35 -04:00
Abdulkadir Furkan Şanlı
e131078673 Translated using Weblate (Turkish)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/tr/
2019-09-11 10:13:20 -04:00
qqq-qqqq
e1b445d133 Translated using Weblate (Chinese (Simplified))
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hans/
2019-09-11 10:13:20 -04:00
tluciomiranda
177ca3ccba Translated using Weblate (Portuguese (Portugal))
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pt_PT/
2019-09-11 10:13:20 -04:00
Joshua M. Boniface
c63a53959c Merge pull request #1731 from EraYaN/segment-time-delta-culture-fix
Fix culture problem on Windows for segment_time_delta argument.
2019-09-10 10:41:59 -04:00
Erwin de Haan
e8b13ea8a9 Fix culture problem on Windows for segment_time_delta argument. 2019-09-10 16:31:35 +02:00
Erwin de Haan
2f2010ce59 NSIS improvements (#1692)
* Much better, but still broken

It crashes with two custom pages after one another. (So when the service should be installed).

* Fixed the problems and finished the NSIS installer.

Also ignored some of the artifacts.

* Added changes to CI for setup building.

Consolidate building and fixed git error.

Small CI fixes.

Move UX repo to SourcesDirectory

Fix stupid checkout <> clone error.

Fix typo in PowerShell command.

Artifact publish tasks can not have wildcards.
2019-09-09 17:40:51 -04:00
Anthony Lavado
e6a1407786 Merge pull request #1723 from Bond-009/mrmc
Possible fix for MrMC
2019-09-08 18:10:47 -04:00
Bond_009
3eca8b9c98 Address comments 2019-09-08 21:19:41 +02:00
Bond_009
0803a916aa Fix some documentation warnings for MediaBrowser.XbmcMetadata 2019-09-08 21:19:41 +02:00
Bond_009
675754bc5c Possible fix for MrMC 2019-09-08 21:07:29 +02:00
Joshua M. Boniface
2638759b42 Merge pull request #1708 from crobibero/patch-1
Fix translate link
2019-09-03 00:03:05 -04:00
Joshua M. Boniface
b4d722b9f2 Merge pull request #1709 from joshuaboniface/fix-rootdir-crash
Fix crash due to missing userRootFolder data
2019-09-03 00:02:39 -04:00
Joshua Boniface
baa30b41de Add debug logs and try/catch when creating folder 2019-09-02 23:32:03 -04:00
Cody Robibero
299193e2bd Fix translate link 2019-09-02 20:06:22 -06:00
Joshua M. Boniface
fde9dd2a61 Merge pull request #1693 from joshuaboniface/update-libssl
Update Debian build to Buster and LibSSL 1.1
2019-09-02 21:11:57 -04:00
Joshua Boniface
5552e8cbd7 Add missing build dependency 2019-09-02 20:13:28 -04:00
Joshua M. Boniface
2aecc3fa1b Merge pull request #1699 from joshuaboniface/bump-version
Bump version to 10.4.0
2019-09-02 20:03:31 -04:00
Anthony Lavado
e2577ea1c7 Merge pull request #1707 from nvllsvm/default_build_arg
Fix default build arg
2019-09-02 15:45:52 -04:00
Andrew Rabert
11346c000e Fix default build arg 2019-09-02 15:13:08 -04:00
Bond-009
ee637e8fec Fix warnings, improve performance (#1665)
* Fix warnings, improve performance

`QueryResult.Items` is now a `IReadOnlyList` so we don't need to
allocate a new `Array` when we have a `List` (and `Items` shouldn't need to
be mutable anyway)

* Update Providers .csproj to latest C#

* Remove extra newline from DtoService.cs

* Remove extra newline from UserLibraryService.cs
2019-09-02 02:19:29 -04:00
Anthony Lavado
cb393c215a Merge pull request #1686 from Bond-009/warn7
More warning fixes
2019-09-02 02:07:19 -04:00
Anthony Lavado
c4eac8b3c6 Merge pull request #1702 from Bond-009/warn8
Fix more warnings
2019-09-02 02:05:20 -04:00
Anthony Lavado
852e5e29ca Merge pull request #1704 from nvllsvm/fix_replace_multiple_spaces
Fix replace multiple spaces
2019-09-02 01:33:14 -04:00
Andrew Rabert
907b3185c2 Use regex to replace multiple spaces with one space
This communicates the intent of the code more clearly than before.
No noticeable performance impact.
2019-09-01 21:44:34 -04:00
Andrew Rabert
6478cd2ea4 Fix infinite looping when scanning TV metadata
It's a possible that name and sb will never be equal. This is caused by
additional replacements before this loop.
Regression introduced in c699c546e4
2019-09-01 21:40:47 -04:00
Bond_009
1616f24cee Fix more warnings 2019-09-01 18:39:23 +02:00
Bond-009
160718efe2 Merge pull request #1691 from sammyrc34/vaapifix
Enable VAAPI decoding without hardware encoding
2019-09-01 17:30:58 +02:00
Bond-009
a266b54ad6 Merge pull request #1683 from dkanada/misc
Move the transcode path and other small fixes
2019-09-01 17:27:08 +02:00
Anthony Lavado
fde024e7b8 Merge pull request #1700 from thornbill/flac
Restore flac mime type
2019-09-01 02:05:15 -04:00
Bill Thornton
3a600687ea Restore flac mime type 2019-09-01 01:15:34 -04:00
Anthony Lavado
67f38006f8 Merge pull request #1680 from marius-luca-87/q6fn_dlna_seek
Fix q6fn dlna seek for direct play
2019-09-01 00:48:30 -04:00
Samantha Collard
627bde4b72 Fix VAAPI 8-bit HW to SW transcoding for some media 2019-09-01 13:20:18 +10:00
Joshua Boniface
742102b541 Bump version to 10.4.0 2019-08-31 21:39:10 -04:00
Joshua Boniface
5251a5ca79 Allow selecting web branch and fix Docker sed 2019-08-31 21:38:26 -04:00
Joshua M. Boniface
ba06ef57a9 Merge pull request #1687 from Bond-009/isomounter
Move IsoMounter to plugin
2019-08-31 21:22:41 -04:00
Joshua M. Boniface
0d7adc3382 Merge pull request #1695 from nvllsvm/dfa
Make Docker ffmpeg version configurable
2019-08-31 21:12:37 -04:00
Andrew Rabert
1c4755f26a docker - make ffmpeg version configurable 2019-08-31 13:26:13 -04:00
Joshua Boniface
93a668de8b Add libssl-dev dependency 2019-08-31 01:17:23 -04:00
Joshua Boniface
1d5b11f7f6 Update GCC crossbuild to version 8 2019-08-31 01:12:11 -04:00
Joshua Boniface
b1c7b88b5b Use latest 2.2.6 dotnet SDK image (2.2.401) 2019-08-31 00:39:46 -04:00
Joshua Boniface
bedc2be525 Add libssl-dev build dependency 2019-08-31 00:32:26 -04:00
Samantha Collard
a321ca5b39 Enable VAAPI decoding without hardware encoding
Enable VAAPI command arguments to ffmpeg if VAAPI is selected, and
add the "hwdownload" filter if transcoding from VAAPI to software.
Also support transforming 10 bit colourspace to 8-bit, consistent
with other hardware encoding options, at least until client pixel
formats are configurable.
2019-08-31 12:04:31 +10:00
Bond_009
14fbd845c2 Move IsoMounter to plugin 2019-08-29 23:11:55 +02:00
Bond_009
e4f893a0eb More warning fixes 2019-08-29 22:28:33 +02:00
Anthony Lavado
a30876c3ff Merge pull request #1685 from Bond-009/format
Fix invalid arg for
2019-08-29 15:55:31 -04:00
Bond_009
0aaaaab7a0 Fix invalid arg for 2019-08-29 20:25:56 +02:00
dkanada
21ff63c371 move the transcode path 2019-08-29 00:14:50 -07:00
marius
3deeca43a1 - use streamInfo.StartPositionTicks if provided over userdata.PlaybackPositionTicks when creating the Samsung Bookmark Info 2019-08-29 02:38:53 +03:00
Bond-009
503ab56a59 Merge pull request #1678 from marius-luca-87/dlna_seek_exception_fix
Fix ArgumentOutOfRangeException in ParseTimeSeekHeader
2019-08-28 20:13:58 +02:00
marius
b711ece829 - fix ArgumentOutOfRangeException at MediaBrowser.Api.Playback.BaseStreamingService.ParseTimeSeekHeader (second substring argument is length) 2019-08-28 21:05:17 +03:00
Anthony Lavado
efaa668158 Merge pull request #1633 from Bond-009/udpclient
Attempt to fix #1391
2019-08-28 09:41:11 -04:00
Anthony Lavado
a2fd82137c Merge pull request #1676 from Bond-009/login
Fix login
2019-08-28 09:38:12 -04:00
Bond_009
efc4805233 Fix login 2019-08-28 14:45:46 +02:00
Bond_009
dc194015c2 Remove unused args 2019-08-28 13:59:17 +02:00
Bond_009
5dd332b63d Attempt to fix #1391 2019-08-28 13:55:36 +02:00
Anthony Lavado
874f02631b Merge pull request #1641 from cvium/tmdb_cleanup
Tmdb cleanup and re-add Writer and Producer
2019-08-27 23:29:01 -04:00
Andrew Rabert
24775f4988 Merge pull request #1651 from sl1288/master
Fix local trailers playback
2019-08-27 19:02:05 -04:00
Odd Stråbø
f255788383 Translated using Weblate (Norwegian Bokmål)
Currently translated at 95.7% (90 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/nb_NO/
2019-08-26 22:06:50 -04:00
Pafzedog
ba0997a8db Translated using Weblate (French)
Currently translated at 95.7% (90 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fr/
2019-08-26 22:06:50 -04:00
Axel Gabriel Calle Granda
7d4bb28d18 Translated using Weblate (Spanish)
Currently translated at 95.7% (90 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/es/
2019-08-26 22:06:50 -04:00
Matzi24GR
d2c69e7733 Translated using Weblate (Greek)
Currently translated at 95.7% (90 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/el/
2019-08-26 22:06:50 -04:00
Βασίλης Μουρατίδης
143a408342 Translated using Weblate (Greek)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/el/
2019-08-26 22:06:50 -04:00
Matzi24GR
6be68a3656 Translated using Weblate (Greek)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/el/
2019-08-26 22:06:50 -04:00
Anthony Lavado
b744ebb3b3 Merge pull request #1656 from loli10K/fix_firewalld_service
Fix firewall-cmd: Error: INVALID_SERVICE: 'jellyfin' not among existing services
2019-08-26 17:02:05 -04:00
Joshua Boniface
fb37f4a1d5 Use base Debian image in Docker build 2019-08-26 11:05:15 -04:00
Joshua Boniface
5945a638ff Update builds to Debian 10 and OpenSSL to 1.1-only 2019-08-26 11:00:36 -04:00
Bond-009
e87d7cfaf3 Merge pull request #1659 from jellyfin/fix_ffmpeg
Fix segment_time_delta value for ffmpeg 4.1
2019-08-25 13:38:11 +02:00
Claus Vium
2e66361482 Move argument to new line 2019-08-24 11:38:33 +02:00
Claus Vium
15b054be94 Fix style issues 2019-08-24 11:17:17 +02:00
Joshua M. Boniface
1dfd5000ff Merge pull request #1499 from crobibero/log-password-ip
Log IP address on failed login attempt
2019-08-23 23:40:45 -04:00
crobibero
4f974122f8 log password on failed login attempt 2019-08-23 23:28:52 -04:00
Joshua M. Boniface
dc1782d049 Merge pull request #1646 from Bond-009/lock
Return DB lock immediately
2019-08-21 18:24:47 -04:00
loli10K
588db95e2a Fix firewall-cmd: Error: INVALID_SERVICE: 'jellyfin' not among existing services 2019-08-20 20:27:31 +02:00
Joshua M. Boniface
1bce9a89b6 Merge pull request #1433 from fhriley/h265
Add support for encoding with libx265 and hevc_nvenc
2019-08-19 16:28:43 -04:00
Joshua M. Boniface
d95c04787c Merge branch 'master' into h265 2019-08-19 14:57:48 -04:00
Joshua M. Boniface
d99278da1d Merge pull request #1650 from Bond-009/sqlitepclv2
Upgrade SQLitePCL to v2
2019-08-19 14:43:54 -04:00
SL1288
fdc24ec2ee Fix LocalTrailers playback. 2019-08-19 18:56:41 +02:00
Bond_009
3fd489d1cb Upgrade SQLitePCL to v2 2019-08-19 17:03:21 +02:00
Claus Vium
058e077422 Add newline after end tag 2019-08-19 12:13:34 +02:00
Claus Vium
d2b8672c1c Require latest C# version in Providers project 2019-08-19 12:12:00 +02:00
dkanada
c8474f734c Merge pull request #1644 from Bond-009/hiddenwarn
Fix possible hidden exceptions
2019-08-19 01:59:07 -07:00
dkanada
5626709de5 Merge pull request #1645 from Bond-009/fixusers
Fix UserNotFoundError
2019-08-19 01:58:24 -07:00
Bond_009
f70a63d575 Return DB asap 2019-08-18 22:05:06 +02:00
Bond_009
24fac4b191 Fix UserNotFoundError 2019-08-18 20:12:25 +02:00
Bond_009
99aea27723 Fix possible hidden exceptions
If an error occurred while starting the server which in turn caused an
exception in the dispose method of the apphost, the first exception
wouldn't get logged.
2019-08-18 20:01:08 +02:00
Joshua M. Boniface
94e25e898a Merge pull request #1511 from crankdoofus/master
Add NSIS installer build support
2019-08-18 13:56:20 -04:00
Joshua M. Boniface
4bb0c2d053 Merge pull request #1642 from cvium/fix_slow_db
Speed up BaseItem deserialization
2019-08-18 13:42:08 -04:00
Claus Vium
f48eaccc51 Use reader.GetString instead of indexing 2019-08-18 17:32:41 +02:00
Claus Vium
e7c05dcfaf Speed up BaseItem deserialization 2019-08-18 17:22:45 +02:00
Claus Vium
82b0015b30 Fix style issues 2019-08-18 14:50:26 +02:00
Claus Vium
78441730a7 Add Writer and Producer to crew list 2019-08-18 14:50:26 +02:00
Claus Vium
5ea1299030 Fix api url 2019-08-18 14:50:26 +02:00
Claus Vium
817d9b3389 Move and rename tmdb providers for better separation 2019-08-18 14:50:26 +02:00
dkanada
25a590e8cd Merge pull request #1636 from Bond-009/isomounter
Add analysers to Emby.IsoMounting and enable TreatWarningsAsErrors
2019-08-18 03:19:27 -07:00
Anthony Lavado
6766e04dd6 Merge pull request #1521 from Bond-009/hdhomerun
Clean up livestreaming code
2019-08-17 02:24:39 -04:00
Anthony Lavado
28d707604b Merge pull request #1629 from cvium/fix_tvdb_guest_stars
Fix tvdb guest stars with multiple roles
2019-08-17 02:22:07 -04:00
Anthony Lavado
f1f4b1a184 Merge pull request #1628 from cvium/fix_tvdb_ep_provider_id
Always fetch episode id as EpisodeInfo does not contain it
2019-08-17 02:10:36 -04:00
Anthony Lavado
f41a608f11 Merge pull request #1452 from Bond-009/usermanager2
Improvements to UserManager
2019-08-17 02:02:55 -04:00
Bond_009
1bc9b42c57 More fixes 2019-08-16 21:18:37 +02:00
Bond-009
4b37caa63a Update SharedHttpStream.cs 2019-08-16 21:13:18 +02:00
Bond_009
237db8ae92 Clean up livestreaming code 2019-08-16 21:13:18 +02:00
Claus Vium
9e3f4ac954 Move the first argument to its own line 2019-08-16 21:10:42 +02:00
Bond_009
8d3b5c851d Improvements to UserManager 2019-08-16 21:06:11 +02:00
Bond_009
dc662beefe Add analysers to Emby.IsoMounting and enable TreatWarningsAsErrors 2019-08-16 21:03:45 +02:00
Anthony Lavado
7a27dd8a1b Merge pull request #1632 from Bond-009/locale
Improve LocalizationManager
2019-08-16 14:17:01 -04:00
Anthony Lavado
af3c4e0ce8 Merge pull request #1588 from dkanada/url
Add base url option to server configuration
2019-08-16 14:16:18 -04:00
Claus Vium
e4158d9703 Continue 2019-08-16 20:11:01 +02:00
Claus Vium
8d230e67a2 Place args on separate lines 2019-08-16 20:09:30 +02:00
Claus Vium
daf29233e6 Invert the second if 2019-08-16 20:07:00 +02:00
Claus Vium
15f7a2078b Invert the if 2019-08-16 19:58:44 +02:00
Claus Vium
26b4fb21fe Update MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-08-16 19:53:28 +02:00
Claus Vium
617f7e8b5b Fix segment_time_delta value for ffmpeg 4.1 2019-08-16 19:52:54 +02:00
Anthony Lavado
be5a819621 Merge pull request #1634 from Bond-009/fixbuild
Fix build on .Net Core 2.x
2019-08-16 13:49:02 -04:00
Bond_009
c0e71cdea7 Fix build on .Net Core 2.x 2019-08-16 19:05:30 +02:00
Anthony Lavado
b89c26ab57 Merge pull request #1631 from Bond-009/fixbuild
Fix build for .Net Core 2.x
2019-08-16 12:03:27 -04:00
Bond_009
499c3dbdca Fix build for .Net Core 2.x 2019-08-16 17:37:40 +02:00
Bond_009
c699c546e4 Improve LocalizationManager 2019-08-16 17:31:47 +02:00
dkanada
bb04545068 Merge pull request #1614 from Bond-009/docs2
Document all public/internal members of Emby.Drawing
2019-08-15 21:01:44 -07:00
Claus Vium
11504321b5 Handle negative roleStartIndex since not all guest stars have roles 2019-08-15 19:54:01 +02:00
Claus Vium
f7f3627bb1 Remove unused import 2019-08-15 14:56:49 +02:00
Claus Vium
f4a99beb16 Fix tvdb guest stars loop 2019-08-15 14:54:22 +02:00
Claus Vium
38b0967044 Log episode id and series id when either request fails 2019-08-15 13:43:12 +02:00
Claus Vium
14575f0a06 Always fetch episode id as EpisodeInfo does not contain it 2019-08-15 13:39:56 +02:00
dkanada
685e9e4f58 Merge pull request #1584 from Bond-009/checksum
Check checksum for plugin downloads
2019-08-15 01:00:33 -07:00
dkanada
535e0d2553 Merge pull request #1625 from Bond-009/crash
Fix instant crash.
2019-08-14 15:05:35 -07:00
Bond_009
d62a3f0e57 Fix master 2019-08-15 00:00:21 +02:00
dkanada
ca12763adc Merge pull request #1624 from Bond-009/nullref
Fix possible Nullref
2019-08-14 12:42:58 -07:00
Bond_009
2fdf7f1098 Properly dispose DisplayPreferencesRepository 2019-08-14 20:35:36 +02:00
Bond_009
e5b163b86a Fix possible nullref 2019-08-14 20:24:44 +02:00
Anthony Lavado
f8202384a6 Merge pull request #1622 from anthonylavado/transcoding-cleanup
Add a task to clean up transcode cache
2019-08-14 12:25:05 -04:00
Anthony Lavado
35da4ffa3e Remove unneeded comment 2019-08-14 11:59:14 -04:00
Anthony Lavado
4762e2fc6c Add a task to clean up transcode cache 2019-08-14 01:51:46 -04:00
dkanada
8f8d8e3d0b Merge pull request #1581 from Bond-009/socket1
Use System.Net abstractions instead of raw socket
2019-08-13 19:58:57 -07:00
Anthony Lavado
29623d36e8 Merge pull request #1568 from whooo/master
Add DLNA headers if requested by the client
2019-08-13 01:29:16 -04:00
dkanada
443ccbf426 Merge pull request #1613 from Bond-009/docs
Update deps + document startup project
2019-08-12 18:42:30 -07:00
Bond_009
838e5d05d5 Document all public/internal members of Emby.Drawing
Forces all new public/internal members to be documented.
Enables TreatWarningsAsErrors for Emby.Drawing
2019-08-11 16:52:37 +02:00
Bond_009
7243689215 Minor improvements 2019-08-11 15:57:36 +02:00
Bond_009
5eaf5465a5 Check checksum for plugin downloads
* Compare the MD5 checksum when downloading plugins
* Reduced log spam due to http requests
* Removed 'GetTempFileResponse' function from HttpClientManager
* Fixed caching for HttpClientManager
2019-08-11 15:54:58 +02:00
Bond_009
cb492fe3c7 Improve clickable link 2019-08-11 15:17:39 +02:00
Bond_009
003238ef5e Update deps + document startup project
* Fixed the release build
* Documented all public/internal members of Jellyfin.Server
* Enable TreatWarningsAsErrors for debug builds for Jellyfin.Server

This will ensure that any new public/internal members of Jellyfin.Server
are documented
2019-08-11 15:11:53 +02:00
dkanada
1ad67e223f Merge pull request #1462 from Bond-009/installationmanager
Improvements to InstallationManager
2019-08-11 03:47:10 -07:00
whooo
9556561a77 Merge branch 'master' into master 2019-08-11 12:42:19 +02:00
dkanada
97d6c2db6b keep old base url for now 2019-08-11 00:35:18 -07:00
dkanada
d521e5c36a add base url to server configuration 2019-08-11 00:35:18 -07:00
dkanada
c987203f5a remove old routes from http server 2019-08-11 00:33:13 -07:00
Joshua M. Boniface
a96fa7a5c7 Merge pull request #1397 from Bond-009/passfast
Streamline authentication proccess
2019-08-10 21:42:46 -04:00
dkanada
5c366e4697 Merge pull request #1612 from Bond-009/warn4
Fix warnings
2019-08-10 15:12:54 -07:00
dkanada
4f592e9c33 Merge pull request #1484 from SenorSmartyPants/DVD-Order
Update TVDB provider to search based on series display order
2019-08-09 23:26:42 -07:00
dkanada
b5f3f28f41 Merge pull request #1578 from Bond-009/httpresponse
Replace custom code with Asp.Net Core code
2019-08-09 23:26:10 -07:00
Joshua M. Boniface
f8ad6655fb Merge pull request #1023 from Bond-009/cultinvar
Use CultureInvariant string conversion for Guids
2019-08-09 22:33:18 -04:00
Bond_009
25917db07a Fix doc releated warnings 2019-08-09 23:50:40 +02:00
Bond_009
9b2cf8501f Add last one 2019-08-09 23:24:04 +02:00
Bond_009
52c1b45feb Fix build 2019-08-09 23:17:54 +02:00
Bond-009
6032f31aa6 Use CultureInvariant string conversion for Guids 2019-08-09 23:17:54 +02:00
Bond_009
2a58c643d2 Fix more warnings 2019-08-09 23:16:24 +02:00
Anthony Lavado
aafa11b48b Merge pull request #1608 from Marenz/patch-1
Add link to feature request hub to readme
2019-08-09 17:08:40 -04:00
Bond-009
a5cb069f26 Update HdHomerunManager.cs 2019-08-09 22:38:31 +02:00
Bond_009
1cad93c276 Use System.Net abstractions instead of raw socket 2019-08-09 22:38:31 +02:00
Bond_009
0116190050 Minor changes 2019-08-09 22:37:44 +02:00
Bond_009
cf7290343f Fix build 2019-08-09 22:36:20 +02:00
Bond_009
9fff4b060e Replace custom code with Asp.Net Core code 2019-08-09 22:36:20 +02:00
Mathias L. Baumann
6c58ac5c55 Add link to feature request hub to readme 2019-08-09 10:00:16 +02:00
dkanada
cf0460c7f9 move comment to separate line 2019-08-07 02:24:56 -07:00
dkanada
779f0c637f Merge pull request #1580 from Bond-009/linklocal
Ignore Ipv6 link-local addresses
2019-08-07 02:18:22 -07:00
Andrew Rabert
dac22887cf Merge pull request #1605 from nvllsvm/fix_docker
Fix Docker build
2019-08-07 00:04:34 -04:00
Andrew Rabert
da01376294 Fix Docker build 2019-08-06 23:57:39 -04:00
Joshua M. Boniface
74f88b3c50 Merge pull request #1602 from anthonylavado/stale-update
Update the Stale-bot config
2019-08-06 13:21:05 -04:00
Anthony Lavado
ff93b162ee Update the Stale-bot config
Updates the Stale bot to mark an issue after 90 days, and allows 14
days before closing the issue.
2019-08-06 12:59:45 -04:00
Tradutor da Silva
89f592687e Translated using Weblate (Portuguese (Brazil))
Currently translated at 95.7% (90 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pt_BR/
2019-08-04 19:24:29 -04:00
Tamás Mogyorósi
5e6e52d397 Translated using Weblate (Hungarian)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/hu/
2019-08-04 19:24:29 -04:00
AndersMachmueller
20cbbd4f4c Translated using Weblate (Danish)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/da/
2019-08-04 19:24:29 -04:00
Michał
b637cdabae Translated using Weblate (Polish)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pl/
2019-08-04 19:24:29 -04:00
Joshua M. Boniface
0f9fd38053 Merge pull request #1593 from nvllsvm/docker_web_master
Docker - make web version more configurable
2019-08-03 15:53:07 -04:00
Bond-009
20f0a8a1c4 Merge pull request #1597 from whooo/filewriter-log
Set log level to debug for HTTP range requests
2019-08-03 15:50:56 +02:00
Erik Larsson
0e6417c9fa Set log level to debug for HTTP range requests 2019-08-03 12:37:02 +02:00
Anthony Lavado
cc4bf60092 Merge pull request #1590 from anthonylavado/null_check
Adds null check on studio/network name
2019-08-02 14:12:17 -04:00
Andrew Rabert
358665d944 Docker - make web version more configurable
This allows for building against jellyfin-web master. Ex.

docker build . --build-arg JELLYFIN_WEB_VERSION=master
2019-08-01 01:03:52 -04:00
Anthony Lavado
d05440d267 Update MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs
Co-Authored-By: Claus Vium <cvium@users.noreply.github.com>
2019-07-31 12:21:46 -04:00
dkanada
ca8e0796d9 Merge pull request #1582 from Bond-009/ipnetwork
Include library via NuGet instead of via source
2019-07-30 23:45:32 -07:00
dkanada
3949048dde Merge pull request #1573 from Bond-009/mimetype
Use a dictionary to look up mimetypes
2019-07-30 23:44:58 -07:00
dkanada
bf083c1429 Merge pull request #1579 from Bond-009/ass
Fix #1388 and #1472
2019-07-29 15:15:17 -07:00
Joshua M. Boniface
8c15ac7fab Merge pull request #1583 from jellyfin/EraYaN-fider-readme
Add Fider to README
2019-07-29 14:53:35 -04:00
Erwin de Haan
487ba2b928 Add Fider to README 2019-07-29 20:21:47 +02:00
Anthony Lavado
2fc1f39061 Merge pull request #1555 from jellyfin/EraYaN-stale-app-config
Add Stale app configuration starting point
2019-07-29 13:47:03 -04:00
Erwin de Haan
9e1adec5e0 Update message for stale issues and also ignore feature and enhancement labels 2019-07-29 19:42:38 +02:00
Anthony Lavado
43748d439a Merge pull request #1572 from jellyfin/remove-feature-requests
Remove the issue template for feature requests.
2019-07-29 13:20:07 -04:00
Bond_009
998017a76d Include library via NuGet instead of via source 2019-07-29 16:01:14 +02:00
Bond_009
5c9d041423 Ignore Ipv6 link-local addresses 2019-07-29 13:57:36 +02:00
dkanada
e4644599af Merge pull request #1513 from Bond-009/style2
Fix style issues
2019-07-29 00:16:56 -07:00
Bond_009
e6ef6088ff Fix #1388 and #1472 2019-07-29 00:43:57 +02:00
Erwin de Haan
b4f446fe42 Delete enhancement-request.md 2019-07-28 22:50:41 +02:00
Anthony Lavado
da7abea9aa Merge pull request #1574 from jellyfin/compat-checker-ci
Add the --azure-pipelines switch to the compat checker
2019-07-28 16:48:49 -04:00
Erwin de Haan
9faf035413 Add the --azure-pipelines switch to the compat checker 2019-07-28 21:01:18 +02:00
Bond-009
8b1bd7ac6b Use a dictionary to look up mimetypes 2019-07-28 20:20:03 +02:00
Erwin de Haan
7faf3ab04a Delete feature_request.md 2019-07-28 19:41:36 +02:00
Anthony Lavado
a8014b3942 Merge pull request #1540 from HelloWorld017/sami-fix
Fixed SMI Encoding Bug
2019-07-28 00:42:21 -04:00
dkanada
85b277b872 Merge pull request #1524 from Bond-009/ipaddress
Remove IpAddressInfo and IpEndPointInfo classes
2019-07-27 17:50:17 -07:00
Erik Larsson
a1efe4caca Add DLNA headers if requested by the client.
And remove the code which adds the headers as ResponseHelper.WriteToResponse
will do it.
2019-07-27 19:55:18 +02:00
crankdoofus
c6111a7fb5 Change service install user
The default is Network Service, with advanced option to use Local System
2019-07-27 20:23:22 +10:00
Anthony Lavado
80145cd5a3 Merge pull request #1562 from Bond-009/buffered
Don't copy the complete response stream
2019-07-27 03:01:34 -04:00
Anthony Lavado
d39decf918 Adds null check on studio/network name 2019-07-27 02:30:42 -04:00
crankdoofus
5517d912bf Rework based on review comments 2019-07-25 21:52:44 +10:00
crankdoofus
fbbcba95d3 Update installer name to copy 2019-07-25 21:51:53 +10:00
Bond_009
8270d0cc91 Move IPv6 scope id removal logic to it's own function 2019-07-25 00:23:56 +02:00
Bond_009
ddd1a282ea Remove IpAddressInfo and IpEndPointInfo classes 2019-07-25 00:15:06 +02:00
Bond_009
773af2eef9 Don't copy the complete response stream 2019-07-24 23:46:58 +02:00
Bond-009
e8028de4d7 Merge pull request #1560 from jellyfin/release-10.3.z
Backmerge for 10.3.7
2019-07-24 19:10:04 +02:00
Joshua M. Boniface
595a68b822 Bump version for 10.3.7 2019-07-24 10:48:35 -04:00
Vladimir Jendrol
18bc6c69d5 Translated using Weblate (Slovak)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/sk/
2019-07-22 22:28:01 -04:00
tluciomiranda
d56725a43d Translated using Weblate (Portuguese (Portugal))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pt_PT/
2019-07-22 22:28:01 -04:00
Tradutor da Silva
b3aaa9216d Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pt_BR/
2019-07-22 22:28:01 -04:00
vaheed
ea41155c6b Translated using Weblate (Persian)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fa/
2019-07-22 22:28:01 -04:00
polVRtong
b337df889e Translated using Weblate (Korean)
Currently translated at 97.8% (92 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ko/
2019-07-22 22:28:01 -04:00
exveria1015
00c92e88c5 Translated using Weblate (Japanese)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ja/
2019-07-22 22:28:01 -04:00
Moritz
8c94187c75 Translated using Weblate (German)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/de/
2019-07-22 22:28:01 -04:00
Matsuri
cd504e6ee5 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hans/
2019-07-22 22:28:01 -04:00
ZhiGang Zhung
6e29b8ad6f Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hans/
2019-07-22 22:28:01 -04:00
ancarvalho
0d9cdb98f2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pt_BR/
2019-07-22 22:28:01 -04:00
Anthony Lavado
c5d9480313 Merge pull request #1552 from cvium/fix_livetv_v2
Disable buffering in HttpClient as it causes big requests to timeout
2019-07-22 02:28:38 -04:00
Erwin de Haan
67e32a2c44 Add Stale app configuration starting point
Link: https://github.com/apps/stale
2019-07-21 01:07:39 +02:00
Claus Vium
dadfc09c01 Add HttpCompletionOption.ResponseHeadersRead to the buffering option to avoid potentially having 2 copies in memory 2019-07-20 13:36:59 +02:00
Claus Vium
886c88576c Use HttpCompletionOption.ResponseHeadersRead and resort to Content-Length header for non-buffered content 2019-07-19 23:22:30 +02:00
Joshua M. Boniface
4ba33eb3e1 Merge pull request #1541 from joshuaboniface/fix-deb-rules
Override the Debian installinit name
2019-07-14 23:40:03 -04:00
Khinenw
59518ec87e Fixed SMI to SRT UTF-16 Encoding bug 2019-07-15 12:20:59 +09:00
Joshua M. Boniface
953f077f9d Override the installinit name
Without this, when building the `jellyfin-nightly` package, it attempts
to find service/init files with the name `jellyfin-nightly` instead of
the proper name. This override prevents this by forcing the name to
`jellyfin`. Required for nightly builds.
2019-07-14 23:11:17 -04:00
Joshua M. Boniface
cf2f5b2026 Merge pull request #1538 from joshuaboniface/epg
Try to fix XmlTvListingsProvider
2019-07-14 17:09:00 -04:00
Joshua M. Boniface
135c16c721 Merge pull request #1537 from joshuaboniface/contenttype
Properly set content type
2019-07-14 17:08:54 -04:00
Joshua M. Boniface
e94fa791a9 Merge pull request #1519 from Bond-009/mergefix
Fix merge errors
2019-07-13 17:32:45 -04:00
Bond_009
5d9fa06675 Cleanup 2019-07-13 17:18:39 -04:00
Bond_009
b294b802a8 Try to fix XmlTvListingsProvider 2019-07-13 17:18:27 -04:00
Bond_009
7bb504d491 Create a new HttpMethod from the function name 2019-07-13 17:12:06 -04:00
Bond_009
b1bd062709 Properly set content type 2019-07-13 17:12:06 -04:00
Joshua M. Boniface
0d3b399b61 Merge pull request #1536 from joshuaboniface/fix-symlinks
Fix broken symlinks in deployment
2019-07-13 15:26:48 -04:00
Joshua M. Boniface
0f8e2600e3 Fix broken symlinks
These were removed somehow in defc5f1cf9b486357b379c610663e1bad48428ad;
restore them to their proper link state.
2019-07-13 14:23:57 -04:00
Joshua M. Boniface
3d71e9b509 Merge pull request #1534 from joshuaboniface/nightly-deb-fix
Use dash or underscore on mv command
2019-07-13 13:29:32 -04:00
Joshua M. Boniface
881f385a61 Use dash or underscore on mv command
Required for nightlies, which would not match this file format with the
underscore then wildcard. Enables nightly builds.
2019-07-13 13:03:50 -04:00
crankdoofus
e31851d25e Update to uninstall silently if already installed 2019-07-13 21:16:56 +10:00
crankdoofus
aff72323c6 Update code for in-place upgrades 2019-07-09 22:56:23 +10:00
Bond-009
a31a396780 Merge pull request #1518 from jellyfin/EraYaN-azp-grant-auth
Update the GitHub token to a Grant Auth token
2019-07-07 12:25:58 +02:00
crankdoofus
8555c5fae1 Correct comment 2019-07-07 09:17:03 +10:00
crankdoofus
da71354e82 Remove Emby migration section, include License 2019-07-07 09:13:27 +10:00
crankdoofus
3d0e7f6cb6 Include License file with installation 2019-07-07 09:10:35 +10:00
Bond_009
c7d12cc481 Fix merge errors 2019-07-07 00:43:43 +02:00
Erwin de Haan
440177a43d Update the GitHub token to a Grant Auth token. 2019-07-07 00:20:37 +02:00
Bond-009
953eb6e906 Merge pull request #1517 from jellyfin/EraYaN-azp-github-token-name
Update the GitHub connection name to use the GitHub App token
2019-07-07 00:08:27 +02:00
Erwin de Haan
fc55b44e4b Update the GitHub connection name to use the GitHub App token 2019-07-07 00:03:59 +02:00
Bond-009
f2a56fcd80 Merge pull request #1516 from jellyfin/EraYaN-vacuum-merge-fix
Move VACUUM command to fix merge error
2019-07-06 23:57:27 +02:00
Erwin de Haan
0dbc294836 Move VACUUM command to fix merge error
This fixes a syntax error.
2019-07-06 23:50:06 +02:00
Joshua M. Boniface
3b49c1bac0 Merge pull request #1515 from jellyfin/release-10.3.z
Backmerge for 10.3.6
2019-07-06 17:48:48 -04:00
Bond-009
82f041d050 Merge branch 'master' into release-10.3.z 2019-07-06 23:08:52 +02:00
Joshua M. Boniface
4f17ed961e Merge pull request #1514 from Bond-009/httpclient2
Fix issues with HttpClientManager
2019-07-06 17:01:35 -04:00
Joshua M. Boniface
ba551b48e1 Merge pull request #1111 from EraYaN/azp-hardcoded-try
Azure Pipelines DownloadBuildArtifacts@0 Experiment
2019-07-06 14:21:35 -04:00
Bond_009
5fc4ad6c4e Address comments 2019-07-06 20:04:45 +02:00
Bond_009
b117b364f2 Remove duplicate code 2019-07-06 20:04:45 +02:00
Bond_009
3603c64fa6 Use HttpResponseHeaders instead of a dictionary 2019-07-06 20:04:45 +02:00
Bond_009
d405a400aa Fixes issues with HttpClientManager 2019-07-06 20:04:42 +02:00
Joshua M. Boniface
54c6f02ebb Merge pull request #1455 from ferferga/release-10.3.z
Vacuum databases at startup
2019-07-06 13:57:18 -04:00
Joshua M. Boniface
b3f9d04501 Bump version for 10.3.6 2019-07-06 13:34:38 -04:00
Bond_009
ab7ef9c9cb Fix style issues 2019-07-06 16:15:38 +02:00
Bond_009
0f897589ed Streamline authentication proccess 2019-07-06 14:52:24 +02:00
crankdoofus
cea6a2217e Correct Service handling & LocalAppData folder
The service is now completely controlled by nssm as with the install-jellyfin.ps1
The LocalAppData had the global context, its now 
Corrected order of Mandatory and Optional components.
2019-07-06 18:34:48 +10:00
crankdoofus
dc3eceec6a Changed order to include install scripts in installer 2019-07-06 18:02:00 +10:00
crankdoofus
a6819ffd1d Cleaned up code 2019-07-06 12:19:57 +10:00
crankdoofus
de9ee10abc Uncomment accidental commenting of compilation 2019-07-06 12:18:20 +10:00
crankdoofus
43989800ba Added -Force to nsis extraction 2019-07-06 12:16:34 +10:00
crankdoofus
1fd827fa77 Create jellyfin.nsi 2019-07-06 11:43:20 +10:00
crankdoofus
3b9766f58c Added option for NSIS
This change will 
1. download NSIS zip, 
2. unzip in temp folder, 
3. use nsis to build the installer
2019-07-06 11:41:33 +10:00
Erwin de Haan
2c8df07753 Fix some task names. 2019-07-05 13:03:34 +02:00
Erwin de Haan
08421311b9 Switch download order around. 2019-07-05 12:10:57 +02:00
Erwin de Haan
dc68fa2c8b Disable seperate build and restore. 2019-07-05 12:06:01 +02:00
Erwin de Haan
ff373621b3 Switch to next gen artifacts. 2019-07-05 12:02:35 +02:00
Erwin de Haan
272691aacd Switched to specific download. 2019-07-05 11:37:14 +02:00
Erwin de Haan
46623bc985 Try with hardcoded name. 2019-07-05 11:32:25 +02:00
Erwin de Haan
3462147195 Switched to latest ubuntu image and hardcoded definitionId. 2019-07-05 11:17:48 +02:00
Erwin de Haan
268fe5efe8 Small attempts at making previous build downloads work. 2019-07-05 11:11:46 +02:00
dkanada
0e0c70f782 Merge pull request #1505 from trumblejoe/patch-1
Qualified Namespace of pscredential
2019-07-04 20:18:46 -07:00
Erwin de Haan
acf52b9b55 Cleanup extra spaces. 2019-07-04 20:55:49 +02:00
Erwin de Haan
7587fe56d8 Moved VACUUM down to the end of the list. 2019-07-04 20:54:57 +02:00
Anthony Lavado
ab34a95142 Merge pull request #1473 from DrPandemic/apply-deprecation-WebRequest-on-10.3.z
Apply deprecation web request on 10.3.z
2019-07-04 14:51:24 -04:00
dkanada
9e9952d81f Merge pull request #1247 from bugfixin/master
Adjust detection of 'sample' in filenames to use regex boundaries
2019-07-04 11:38:01 -07:00
dkanada
4f2d601f02 Merge pull request #1167 from Bond-009/eol
Force LF line endings
2019-07-02 13:02:29 -07:00
dkanada
e722801f80 Merge pull request #956 from Bond-009/db
Simplify db code
2019-07-02 11:56:13 -07:00
dkanada
6cf9204219 Merge pull request #1500 from dkanada/password
Add optional password field on user creation
2019-07-02 11:55:44 -07:00
trumblejoe
b719ca5a33 Qualified Namespace of pscredential
Qualified Namespace of pscredential, otherwise script fails in Powershell builds <3.0.
2019-07-02 13:29:28 -04:00
Bond_009
29ae7b9aeb Add docs 2019-07-01 18:24:35 +02:00
Bond_009
45c13141f9 Address comments 2019-07-01 17:59:01 +02:00
dkanada
9079b3e8da add optional password field on user creation 2019-06-30 01:58:01 -07:00
Andrew Rabert
0ee40cb636 Merge pull request #1495 from joshuaboniface/better-restart-script
Add nicer restart script
2019-06-29 19:48:54 -04:00
Joshua M. Boniface
62105c249f Use which to find the service binary path 2019-06-28 11:15:08 -04:00
Joshua M. Boniface
a629f209b9 Make message wording more consistent 2019-06-28 11:06:55 -04:00
Bond_009
ecb8d8991b Fix whitespace 2019-06-28 12:22:33 +02:00
Bond_009
2e4c0fee77 Add removed line 2019-06-28 12:16:51 +02:00
Bond_009
d961278b3d Reduce amount of raw sql 2019-06-28 12:14:27 +02:00
Bond_009
db2765aae5 Last bit of cleanup 2019-06-28 12:14:27 +02:00
Bond_009
7898af4ceb Reworked PRAGMA statements use 2019-06-28 12:14:27 +02:00
Bond_009
edfd2d0cd9 Fix startup 2019-06-28 12:14:27 +02:00
Bond_009
d00ad28efd Address comments 2019-06-28 12:14:27 +02:00
Bond-009
02b864e41b Last line? 2019-06-28 12:14:27 +02:00
Bond-009
e88ebd748d Final fixes 2019-06-28 12:14:27 +02:00
Bond-009
b6954f3bfd More 2019-06-28 12:14:27 +02:00
Bond-009
27c29bbb4c Back to a single connection 2019-06-28 12:13:34 +02:00
Bond-009
30842656a7 Properly dispose 2019-06-28 12:12:54 +02:00
Bond-009
e5248cfaa2 Properly dispose 2019-06-28 12:12:54 +02:00
Bond-009
c30ba14c1f Use a connection pool instead of creating new connections 2019-06-28 12:12:54 +02:00
Bond-009
cec22ad10d Simplify db code 2019-06-28 12:12:54 +02:00
Joshua M. Boniface
c08c0272b5 Add nicer restart script
The old restart script was buggy, as reported in #1320. This updated
script seems to work far more reliably and conforms to the existing
jellyfin-sudoers packages sudo configuration.
2019-06-27 18:05:03 -04:00
dkanada
c52e8a2027 Merge pull request #1394 from joern-h/bugfix-issue1347
Check if an item is a child of an EnabledFolder
2019-06-26 01:19:34 -07:00
Jörn
1fd8164756 fix issue #1347 introduced in pr #930 2019-06-26 01:13:54 -07:00
dkanada
b3b08fecb2 Merge pull request #1453 from Bond-009/cleanup2
Improve main code flow
2019-06-26 01:03:09 -07:00
dkanada
3c16c34386 Merge pull request #1485 from DrPandemic/fix-skia-segfault
Fix skia segfault
2019-06-25 12:44:29 -05:00
DrPandemic
394d96246b Check path before opening image 2019-06-24 20:13:07 -04:00
Andrew Rabert
fc439cc02a Merge pull request #1448 from joshuaboniface/nice-userconfig-paths
Use the username for the user config path
2019-06-24 12:54:24 -04:00
SenorSmartyPants
18e6cd429a Update TVDB provider to search based on series display order 2019-06-22 16:11:47 -05:00
dkanada
1b2621cd30 Merge pull request #1454 from Bond-009/webresource
Simplify file serving code
2019-06-21 23:33:37 -07:00
Anthony Lavado
084854d71d Merge pull request #1478 from cvium/fix_tvdb_again
Wait for the async authentication to finish when the JTW token expires
2019-06-22 02:08:46 -04:00
Claus Vium
c2ab0ad641 Wait for the async authentication to finish when the JTW token expires 2019-06-21 19:08:04 +02:00
dkanada
dbc2cda9d4 Merge pull request #1369 from teacupx/master
Enable Exynos MFC encoder and fix transcoding bitrate control
2019-06-20 16:55:09 -07:00
dkanada
65fa61a636 add comment explaining GetMinBitrate 2019-06-20 16:44:27 -07:00
Erwin de Haan
04784b4e43 Create Media Playback issue template (#1451)
Added media playback issue template. We might want to add some more information requests in there.
2019-06-19 12:41:52 -04:00
Claus Vium
7eb94e9674 Update MediaBrowser.Common/Net/IHttpClient.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-06-18 22:21:07 -04:00
Bond-009
0a5550b13d Remove more unused stuff 2019-06-18 22:20:34 -04:00
Bond-009
067200be83 Remove usage of depricated 'WebRequest'
Ref: https://docs.microsoft.com/en-us/dotnet/api/system.net.webrequest?view=netframework-4.7.2
2019-06-17 19:35:05 -04:00
Joshua M. Boniface
2baddc1709 Merge pull request #1463 from Bond-009/deps
Update deps
2019-06-14 15:43:59 -04:00
Bond_009
5554595255 Update deps 2019-06-14 18:49:57 +02:00
Bond_009
65a0ca2f32 Improvements to InstallationManager 2019-06-14 18:38:14 +02:00
Anthony Lavado
d4a42a1680 Merge pull request #1080 from Bond-009/httpclient
Remove usage of deprecated 'WebRequest'
2019-06-14 09:19:56 -04:00
Bond-009
af099a9b53 Update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Jean-Samuel Aubry-Guzzi <DrPandemic@users.noreply.github.com>
2019-06-14 08:21:06 +02:00
Bond-009
6ebac0e500 Update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Jean-Samuel Aubry-Guzzi <DrPandemic@users.noreply.github.com>
2019-06-14 08:20:52 +02:00
Anthony Lavado
b25c08e79a Merge pull request #1156 from Bond-009/sep
Small cleanups here and there
2019-06-13 22:27:00 -04:00
Bond-009
8fd47dd658 Merge pull request #1457 from TrisMcC/fix-path-substitution-1446
Stop path substitution in SubtitleEncoder - Fix #1446
2019-06-13 15:18:01 +02:00
Joshua M. Boniface
687255aa31 Merge pull request #1442 from jellyfin/release-10.3.z
Backmerge for Release 10.3.4 and 10.3.5
2019-06-12 23:30:57 -04:00
Tristan McCann
5c1fbfca03 Stop path substitution in SubtitleEncoder
This fixes jellyfin/jellyfin#1446. I am not an expert in this section of
code, but I cannot think of a need to do path substitution during
subtitle encoding.
2019-06-11 21:36:42 -04:00
ferferga
b136f14084 Vacuum databases at startup 2019-06-10 11:31:38 +02:00
Joshua M. Boniface
d5fe82314e Bump version for 10.3.5 2019-06-09 21:47:45 -04:00
Bond_009
253e72f667 Simplify file serving code 2019-06-10 00:53:16 +02:00
Bond_009
aa30227545 Improve main code flow
Improved the way how some parts of the code depend on eachother
Fixed some style issues
2019-06-09 23:51:52 +02:00
Joshua M. Boniface
06834fefef Merge pull request #1447 from joshuaboniface/implement-invalidauth
Implement InvalidAuthProvider
2019-06-09 15:36:25 -04:00
Joshua M. Boniface
2946ae1009 Revert "Don't set a default reset provider"
This reverts commit c230d49d7c.

This reenables an edge case where an admin might want to reset, with
the default auth provider, the password of an externally-provided
user so they could "unlock" the account while it was failing. There
might be minor security implications to this, but the malicious
actor would need FS access to do it (as they would with any password
resets) so it's probably best to keep it as-is.

Removing this in the first place was due to a misunderstanding
anyways so no harm.
2019-06-09 15:29:43 -04:00
Joshua M. Boniface
4b8f735cb8 Remove superfluous conditional
This wasn't needed to prevent updating the policy on-disk from my
tests and can be removed as suggested by @Bond-009
2019-06-09 13:57:49 -04:00
Joshua M. Boniface
c230d49d7c Don't set a default reset provider 2019-06-09 13:46:53 -04:00
Joshua M. Boniface
20e2cb2d86 Use SecurityException for auth failure 2019-06-09 13:45:51 -04:00
Joshua M. Boniface
b70083f3b3 Apply suggestions from code review
Co-Authored-By: Claus Vium <cvium@users.noreply.github.com>
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-06-09 13:41:14 -04:00
Joshua M. Boniface
74ef389879 Add nicer log message and comment 2019-06-09 11:07:35 -04:00
Joshua M. Boniface
d1d0ddf62f Use the username for the user config path
Use the username to construct the UserConfigurationDirectory,
instead of the user ID, and move the old ID-based path to the new
path if needed when loading (temporary transitional code). Removes
administrator guesswork as to what user each directory belongs to,
which I found very annoying when investigating user configs.
2019-06-08 23:54:26 -04:00
Joshua M. Boniface
d78a55adb4 Implement InvalidAuthProvider
Implements the InvalidAuthProvider, which acts as a fallback if a
configured authentication provider, e.g. LDAP, is unavailable due
to a load failure or removal. Until the user or the authentication
plugin is corrected, this will cause users with the missing provider
to be locked out, while throwing errors in the logs about the issue.

Fixes #1445 part 2
2019-06-08 22:54:31 -04:00
Bond_009
77ecb0a70c Make script executable again 2019-06-08 19:57:46 +02:00
Bond-009
cb07822aa3 Add execute permissions back 2019-06-08 19:56:08 +02:00
Bond_009
defc5f1cf9 Force LF line endings 2019-06-08 19:56:08 +02:00
Andrew Rabert
6f99ed3955 Merge pull request #1443 from jellyfin/qemu
Docker - Update arm* Dockerfiles for latest multiarch
2019-06-07 18:41:35 -04:00
Andrew Rabert
247a5e12ab Docker - Update arm* Dockerfiles for latest multiarch
Relates to this change 7bdafb96ee
2019-06-07 00:00:14 -04:00
Joshua M. Boniface
855911333a Bump version for 10.3.4 2019-06-06 22:45:37 -04:00
Anthony Lavado
127bfc7d3b Merge pull request #1437 from pjeanjean/master
Fix issue #1436: media folders appear empty unless user has all libraries access
2019-06-06 17:21:20 -04:00
pjeanjean
7919dd81da Skip user permission checking for UserRootFolder
Fix #1436
UserRootFolders are used to represent virtual folders that exist outside
of libraries. As such, it doesn't make sense to check if a user has the
right to access their library (named `Media Folders`).
2019-06-06 08:30:56 +02:00
Bond-009
e3a3aebbf6 Merge pull request #1440 from cvium/fix-build
Change UsCulture to InvariantCulture
2019-06-05 21:31:09 +02:00
Claus Vium
c05b7c382a Change UsCulture to InvariantCulture 2019-06-05 20:59:06 +02:00
Anthony Lavado
d7aaa1489c Merge pull request #1427 from dkanada/fanart
Move fanart image provider to plugin
2019-06-05 01:19:54 -04:00
Anthony Lavado
aee3360841 Merge pull request #1366 from Bond-009/warn3
Fix more warnings
2019-06-05 01:17:21 -04:00
Anthony Lavado
256f44a870 Merge pull request #994 from Bond-009/tasks
Remove Tasks wrapped in a Task
2019-06-05 01:11:25 -04:00
Anthony Lavado
f631b2ecdc Merge pull request #1159 from Bond-009/streamjob
Trying to make sense of the streaming code
2019-06-04 00:20:43 -04:00
Anthony Lavado
a623dd1921 Merge pull request #1368 from dkanada/drives
Only return useful drives
2019-06-04 00:19:35 -04:00
dkanada
b768ad978e split the new command to more than one line 2019-06-02 21:49:12 -07:00
Juvenal Yescas
6b6776042c Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/es_MX/
2019-06-01 20:50:19 -04:00
Julio García
4adaeee054 Translated using Weblate (Spanish)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/es/
2019-06-01 20:50:19 -04:00
Hyunsu Nam
a2d9420139 Translated using Weblate (Korean)
Currently translated at 97.8% (92 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ko/
2019-06-01 20:50:19 -04:00
exveria1015
3431a85adf Translated using Weblate (Japanese)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ja/
2019-06-01 20:50:18 -04:00
dracocephalum
430483c7a1 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hant/
2019-06-01 20:50:16 -04:00
Frank
3ba709fcc3 Fix #1432. Add support for encoding with libx265 and hevc_nvenc. 2019-06-01 15:46:41 -07:00
Bond-009
ce1fa42f9d Merge branch 'master' into tasks 2019-06-01 17:06:01 +02:00
Bond_009
08ac5b6ec3 Fix build 2019-06-01 11:34:28 +02:00
Bond-009
a6f9ceedd8 Fix more warnings 2019-06-01 11:31:27 +02:00
Anthony Lavado
e1da046960 Merge pull request #1426 from jellyfin/cvium-fix-tvdb-refresh
Fix inverted comparison in the tvdb token refresh logic
2019-05-31 21:27:33 -04:00
dkanada
09dfa071dc move fanart image provider to plugin 2019-05-31 01:48:20 -07:00
Claus Vium
a756026962 Fix inverted comparison in the tvdb token refresh logic 2019-05-31 07:24:52 +02:00
Anthony Lavado
75260a960b Merge pull request #1406 from DrPandemic/fix-pin-update
Format the PIN when updating it
2019-05-31 00:58:53 -04:00
exveria1015
b1f764984f Added translation using Weblate (Japanese) 2019-05-30 18:28:11 -04:00
DrPandemic
69ee49bee6 Format correctly the PIN when updating it 2019-05-25 13:46:55 -04:00
erikasne6152
2aed2d164b Translated using Weblate (Lithuanian)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/lt/
2019-05-24 14:28:14 -04:00
Bond-009
2d011b781e Merge pull request #1383 from jellyfin/release-10.3.z
Backmerge for Release 10.3.3
2019-05-18 12:56:42 +02:00
Joshua M. Boniface
1bf3a26a61 Bump version for 10.3.3 2019-05-17 23:12:21 -04:00
Joshua M. Boniface
c5760b3a40 Merge pull request #1380 from bugfixin/dlna-photo-thumb-fix
Improve Photo rendering in DLNA
2019-05-17 22:55:43 -04:00
Joshua M. Boniface
4de8bf3295 Merge pull request #1338 from cvium/fix_extras
Enforce a specific folder structure for Extras to avoid misidentification
2019-05-17 09:00:22 -04:00
dkanada
4a9b349c04 only return useful drives 2019-05-16 16:45:56 -07:00
bugfixin
87c8f19f19 Move DLNA thumbnail element to after larger image elements 2019-05-16 18:00:38 +00:00
Claus Vium
0ef52c739e Review changes
Untested
2019-05-16 07:27:38 +02:00
Joshua M. Boniface
0a9a6b949c Merge pull request #1372 from DrPandemic/fix-pin
Fix broken pin in 10.3.z
2019-05-14 21:54:28 -04:00
Joshua M. Boniface
71f81c5fb0 Merge pull request #1367 from Bond-009/photo
Ignore casing photo extensions
2019-05-14 21:25:46 -04:00
DrPandemic
c22068d6b1 Fix pin bug introduced in 10.3.z.
The issue is that the new easyPassword format prepends the hash
function. This PR extract the hash from "$SHA1$_hash_".
2019-05-11 19:53:34 -04:00
JMCC
012e4a3e63 Fix transcode bitrate control 2019-05-11 17:19:20 +02:00
JMCC
5d85076ad5 Enable Exynos V4L2-m2m HW encoder 2019-05-11 17:17:32 +02:00
Bond-009
35d7e97258 Ignore casing photo extensions 2019-05-11 11:55:41 +02:00
Joshua M. Boniface
bbc1a86b57 Merge pull request #1306 from oddstr13/pr-sudoless-build-1
Move artifact chown inside docker to avoid sudo
2019-05-10 09:25:41 -04:00
Joshua M. Boniface
89537abdc4 Merge pull request #1293 from Bond-009/query-time
Fix query time logging
2019-05-10 09:19:05 -04:00
Anthony Lavado
abfc41f382 Merge pull request #1363 from joshuaboniface/readme
Update getting-help link in README
2019-05-09 23:44:47 -04:00
Joshua Boniface
84ac6ea12a Update getting-help link in README 2019-05-09 18:57:40 -04:00
Bond-009
cd83d80f2b Merge pull request #1294 from DrPandemic/fix-download-non-ascii
Fix non-ascii filename downloads
2019-05-09 17:30:19 +02:00
Bond-009
d9c159122f Merge pull request #1229 from voodoos/cleanup/SocketSharp
Cleaning WebSocketSharp continued
2019-05-09 17:16:51 +02:00
Jean-Samuel Aubry-Guzzi
12721eb7dd Fix non-ascii filename downloads
Follow https://tools.ietf.org/html/rfc5987#section-3.2.2 to encode
non-ascii filenames in HTTP Content-Disposition header.
2019-05-07 19:43:04 -04:00
Claus Vium
b8a09339cd Enforce extras folder structure according to Emby's wiki 2019-05-02 08:14:00 +02:00
Odd Stråbø
3634d367c1 Move artifact chown inside docker to avoid sudo 2019-05-01 20:32:15 +02:00
Claus Vium
c1daea0ec7 Change owner and parent id of extras to the main media item 2019-05-01 07:47:22 +02:00
Joshua M. Boniface
2bc378a9c3 Merge pull request #1337 from jellyfin/release-10.3.z
Backmerge for 10.3.2 release
2019-04-30 23:35:11 -04:00
Joshua Boniface
e8196fed7c Bump version for 10.3.2 2019-04-30 20:18:54 -04:00
Joshua M. Boniface
477702fbb9 Merge pull request #1324 from joshuaboniface/arm64
Add arm64 packaging for Debuntu
2019-04-30 20:07:41 -04:00
Joshua M. Boniface
2216a271bb Merge pull request #1335 from Bond-009/ffmpeglimit
Limit amount of ffmpeg processes extracting images at once
2019-04-30 20:06:24 -04:00
Bond-009
91cd7d2f6b Limit amount of ffmpeg processes extracting images at once 2019-04-30 23:35:39 +02:00
Anthony Lavado
4e681d25d9 Merge pull request #1334 from Bond-009/musicbrainzfix
Iterate over IEnumerable before disposing
2019-04-30 16:56:54 -04:00
Bond-009
06cc2891de Merge pull request #1310 from bugfixin/progressivestreamingservice-unreachable
Remove unreachable code from BaseProgressiveStreamingService
2019-04-30 22:20:54 +02:00
Bond-009
682432f55a Iterate over IEnumerable before disposing 2019-04-30 22:18:40 +02:00
Anthony Lavado
7c4cb5ec58 Merge pull request #1333 from bugfixin/easypinfix
Fix incorrect hasPassword flag when easy pin set
2019-04-30 15:36:25 -04:00
bugfixin
1df73fdeba Fix incorrect hasPassword flag when easy pin set 2019-04-30 19:16:53 +00:00
Bond-009
21ba8a0593 Merge pull request #1332 from cvium/fix_tvdb_ep_provider
Make the TvdbEpisodeProvider class Public
2019-04-30 20:59:18 +02:00
Claus Vium
08ed52eb72 Make the TvdbEpisodeProvider class Public 2019-04-30 20:08:59 +02:00
Anthony Lavado
99700e1b95 Merge pull request #1327 from joshuaboniface/disco
Support libssl1.1 for Ubuntu Disco
2019-04-30 02:38:21 -04:00
Joshua M. Boniface
4e0be95368 Merge pull request #1305 from bugfixin/passwordless-form-encoded
Fix passwordless authentication with non-json content-types
2019-04-29 23:07:04 -04:00
Joshua Boniface
c8a59c8343 Support libssl1.1 for Ubuntu Disco 2019-04-29 23:03:57 -04:00
Joshua Boniface
2b2a2ed708 Add arm64 packaging for Debuntu 2019-04-29 00:56:17 -04:00
bugfixin
a827a2fbcc Remove unreachable code and const trySupportSeek within BaseProgressiveStreamingService 2019-04-25 19:14:33 +00:00
Anthony Lavado
f97f6b8061 Merge pull request #1296 from Bond-009/fix1234
Fix #1234
2019-04-25 01:37:02 -04:00
Bond-009
61d7bed181 Merge pull request #1304 from jellyfin/release-10.3.z
Backmerge 10.3.1
2019-04-25 07:27:37 +02:00
bugfixin
844ea9d77e Don't coalesce empty strings to null in StringMapTypeDeserializer 2019-04-25 04:36:28 +00:00
Bond_009
71479286e9 Fix #1234 2019-04-24 19:56:57 +02:00
Bond_009
a9337033c1 Fix query time logging 2019-04-24 15:25:22 +02:00
Bond-009
a0e61ee67f Merge pull request #1274 from bugfixin/content-type-fix
Prevent null reference when request content type is x-www-form-urlencoded
2019-04-24 14:54:18 +02:00
Claus Vium
28c2ac528d Re-add content length, semi revert of changes in #1010 (#1287)
* Re-add content length, semi revert of changes in #1010
2019-04-24 14:06:54 +02:00
bugfixin
08d3a5d2fe Fix null reference when request content type is application/x-www-form-urlencoded 2019-04-21 19:29:05 +00:00
Joshua Boniface
696a36b4a5 Update submodule for 10.3.1 2019-04-20 15:59:50 -04:00
Joshua Boniface
5fb4922c6f Bump version to 10.3.1 2019-04-20 14:24:40 -04:00
Joshua M. Boniface
3738f95871 Merge pull request #1258 from Bond-009/fixpluginload
Handle exception when loading unsupported assembly
2019-04-20 12:35:57 -04:00
Joshua M. Boniface
6797bdec04 Merge pull request #1264 from jellyfin/fix-empty-pw-migration
Fix comparison for empty password migration
2019-04-20 12:20:22 -04:00
Claus Vium
764c6d5461 Fix comparison for empty password migration 2019-04-20 17:50:34 +02:00
Bond-009
6973182ade Fix more possible exceptions 2019-04-20 17:47:11 +02:00
Bond-009
f62af07381 Handle exception when loading unsupported assembly
Fixes #1256
2019-04-20 17:47:11 +02:00
Bond-009
a8da122fb3 Merge pull request #1252 from jellyfin/release-10.3.z
Backmerge release 10.3.0
2019-04-20 12:25:29 +02:00
bugfixin
da842d5a73 Fix incorrect escaping in regex pattern 2019-04-19 18:35:28 +00:00
Joshua Boniface
46c37c0ae8 Bump version to 10.3.0 (release) 2019-04-19 14:25:29 -04:00
Joshua Boniface
4ad71766fc Merge branch 'translations' into release-10.3.z 2019-04-19 14:19:22 -04:00
Weblate
9d60cc8c66 Rename Chinese (Traditional) file 2019-04-19 13:59:04 -04:00
bugfixin
0794a3edf4 Adjust detection of 'sample' in filenames to use regex boundaries 2019-04-19 17:53:51 +00:00
Libor Filípek
4a6243096a Translated using Weblate (Czech)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/cs/
2019-04-19 13:38:32 -04:00
Heldenkrieger01
10cbdc8e8e Translated using Weblate (Swiss German)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/gsw/
2019-04-19 12:09:39 -04:00
SaddFox
4886fc467c Translated using Weblate (Slovenian)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/sl/
2019-04-19 12:09:38 -04:00
WWWesten
8e2827cc39 Translated using Weblate (Kazakh)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/kk/
2019-04-19 12:09:37 -04:00
Βασίλης Μουρατίδης
395d2e4917 Translated using Weblate (Greek)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/el/
2019-04-19 12:09:37 -04:00
Dan Johansen
d31f5229da Translated using Weblate (Danish)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/da/
2019-04-19 12:09:37 -04:00
Libor Filípek
d6622818dc Translated using Weblate (Czech)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/cs/
2019-04-19 12:09:37 -04:00
tinganhsu
ba684d6d3a Translated using Weblate (Chinese (Traditional))
Currently translated at 96.8% (91 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hant/
2019-04-19 12:09:36 -04:00
tinganhsu
90c04a4640 Added translation using Weblate (Chinese (Traditional)) 2019-04-19 00:32:52 -04:00
Joshua M. Boniface
06a1e1f166 Merge pull request #1244 from joshuaboniface/hotfix-authapi
Hotfix authapi
2019-04-18 17:58:54 -04:00
Anthony Lavado
7bea62adbf Merge pull request #1245 from Bond-009/updateevent
Remove unused event
2019-04-18 14:16:48 -04:00
Joshua Boniface
31ad366aa9 Implemented suggested conditional 2019-04-18 10:24:08 -04:00
Joshua Boniface
10f33b0273 Update conditional to be correct 2019-04-18 09:31:30 -04:00
Bond-009
8f703f4744 Remove unused event
Release builds were failing because of this unused event.
2019-04-18 13:19:16 +02:00
Joshua Boniface
eaa1ac8013 Apparently strings can't be !'d 2019-04-17 22:49:17 -04:00
Joshua Boniface
ca3bb308b3 Add the proper Class too 2019-04-17 22:46:26 -04:00
Joshua Boniface
e790f024c2 Return MethodNotAllowedException if Pw is not set
Don't accept pre-hashed (not-plaintext) passwords as the auth
provider no longer supports this due to sha1+salting the passwords
in the database.
2019-04-17 22:33:00 -04:00
Joshua Boniface
250e0c75df Add MethodNotAllowedException with code 405 2019-04-17 22:31:06 -04:00
Joshua M. Boniface
c3532b92f7 Merge pull request #1158 from Bond-009/httpclean
Reduce complexity http routes
2019-04-17 22:12:17 -04:00
Joshua M. Boniface
0539861dc0 Merge pull request #1182 from Bond-009/deepcopy
Speed up DeepCopy
2019-04-17 22:11:53 -04:00
Joshua M. Boniface
deedf2a36c Merge pull request #1224 from Terror-Gene/patch-1
Fix missing Unraid cache mount and name capitalization
2019-04-17 22:11:30 -04:00
Joshua M. Boniface
cde7375049 Merge pull request #1242 from Bond-009/metadata
Fix metadata path save
2019-04-17 09:26:04 -04:00
Bond-009
e89c8dbf76 Use CultureInfo.InvariantCulture 2019-04-17 15:23:03 +02:00
Bond_009
c7fedfbca3 Fix metadata path save 2019-04-17 15:09:31 +02:00
Anthony Lavado
b031a55a59 Merge pull request #1225 from DrPandemic/update-build-path-help
Fix help message to indicate the right output folder
2019-04-16 16:20:12 -04:00
Bond-009
f520831025 Merge pull request #1239 from anthonylavado/fix-ident
Clean up UDP responders, and move ProductName to Public endpoint
2019-04-16 11:56:38 +02:00
Anthony Lavado
2f0719a883 Move the definition of ProductName to the correct class
Missed moving this from one class to the other.
2019-04-16 01:38:00 -04:00
Anthony Lavado
34ab99caf1 Move the ProductName to the public endpoint
Moves the ProductName field over from the private system/info point to
the public one, for easier identification
2019-04-16 01:16:02 -04:00
DrPandemic
65f9141764 Update the help message to indicate the right output folder 2019-04-15 17:51:26 -04:00
Anthony Lavado
b2f94c0e40 Remove the old message responders
Leaves only an answer to "Who is Jellyfin", removing older ones for
EmbyServer and MediaBrowser_v2.
2019-04-15 00:21:14 -04:00
VooDooS
ba12d96d23 Removed wrapping of HeaderNames fields 2019-04-12 15:25:18 +02:00
VooDooS
bb807554e2 Replace CRLF injection mitigation by use of .NET ip parsing 2019-04-12 13:48:12 +02:00
VooDooS
56d1050bac Replace custom ip "normalization" by methods from IPAddress 2019-04-11 17:49:18 +02:00
VooDooS
a6e1b23eb0 Simplify headers use in WSS 2019-04-11 17:49:14 +02:00
VooDooS
5f6ab836de Extend Microsoft.Net.Http.Headers.HeaderNames 2019-04-11 15:35:06 +02:00
Terror-Gene
a9f790e101 Fix directory capitalization 2019-04-11 04:00:46 +09:30
Terror-Gene
f888c4b641 Fix missing Unraid cache mount
Cache folder was not mounted outside of the Docker image since its separation from the config folder.
Config HostDir was only updated for consistency, previous directory was overridden by unraid into the appdata/appname folder anyway.
Name capitalization was corrected as this is only used by new installations & does not affect current installations/updates.
2019-04-11 03:19:05 +09:30
Joshua Boniface
65bff1181a Bump version to 10.3.0-rc2 and update submodule 2019-04-10 00:51:21 -04:00
Joshua Boniface
efb14f0b58 Bump dockerfile web versions too 2019-04-10 00:49:33 -04:00
Joshua M. Boniface
75a4f04cce Merge pull request #1209 from joshuaboniface/hotfix-authprovider-create
Override username with AuthenticationProvider
2019-04-10 00:18:08 -04:00
Joshua M. Boniface
007fe34363 Merge pull request #1221 from LogicalPhallacy/ffmpegdetection
Make Jellyfin search its base dir for ffmpeg
2019-04-09 23:57:20 -04:00
Ulysse
a1d50a6d05 Clean WebSocketSharpRequest.PathInfo (#1212)
* rm useless ResolvePathInfoFromMappedPath method

* rm useless NormalizePathInfo method

* Use request.Path instead of RawUrl

* Removing unused `HandlerFactoryPath` field

* Use an  expression body definition and rm field `pathInfo`

* More (syntactic) sugar

* Who needs blocks in cases ?
2019-04-09 20:19:27 +02:00
Anthony Lavado
d7df2ac60c Merge pull request #1210 from DrPandemic/fix-readme-link
Fix README documentation link
2019-04-09 12:23:07 -04:00
Phallacy
a7e31ef31f applied changes to just also search jellyfin base dir 2019-04-09 00:27:41 -07:00
Bond-009
dcae3daf43 Merge pull request #1218 from EraYaN/disable-azure-ci-compatcheck
Disable dotnet_compat part of pipeline
2019-04-09 07:45:15 +02:00
Andrew Rabert
941ee53e7a Merge pull request #1211 from Terror-Gene/patch-2
Update Unraid Docker icon
2019-04-08 18:53:57 -04:00
Joshua M. Boniface
eae0c28e6d Merge pull request #1178 from jellyfin/LogicalPhallacy-patch-1
Updates windows installer default lib location
2019-04-08 18:44:43 -04:00
Erwin de Haan
7b4e16bb8f Disabled dotnet_compat part of pipeline. 2019-04-09 00:43:25 +02:00
Joshua M. Boniface
21950382b9 Merge pull request #1188 from joshuaboniface/hotfix-pluginload
Fix problems with plugin installation
2019-04-08 11:24:53 -04:00
Terror-Gene
c72393c970 Updated Unraid Docker icon
Logo was set to use emby, but binhex has since added the jellyfin logo.
2019-04-08 14:56:42 +09:30
DrPandemic
f96d1e9e69 Fix README documentation link 2019-04-07 22:26:27 -04:00
Joshua Boniface
1af9c047fb Override username with AuthenticationProvider
Pass back the Username directive returned by an AuthenticationProvider
to the calling code, so we may override the user-provided Username
value if the authentication provider passes this back. Useful for
instance in an LDAP scenario where what the user types may not
necessarily be the "username" that is mapped in the system, e.g.
the user providing 'mail' while 'uid' is the "username" value.
Could also then be extensible to other authentication providers
as well, should they wish to do a similar thing.
2019-04-07 19:51:45 -04:00
Joshua M. Boniface
2d19bfa7fb Merge pull request #1199 from jftuga/use_tls12_for_nssm
Use TLS 1.2 to download NSSM
2019-04-07 02:48:59 -04:00
John Taylor
f5f7de64de Use TLS 1.2 to download NSSM 2019-04-06 13:40:19 -04:00
Joshua Boniface
754e76a61b Add TODO to remove string target 2019-04-04 02:34:23 -04:00
Joshua Boniface
09505e0988 Apply review feedback
Remove a few superfluous/testing log statements, and print the
deletion debug messages when it occurs rather than earlier. Use
a nicer name for the isDirectory variable.
2019-04-04 01:54:31 -04:00
Anthony Lavado
67e206fa0f Merge pull request #1195 from nvllsvm/optimize
Optimize images with image_optim
2019-04-04 01:16:49 -04:00
Andrew Rabert
608fd873de Optimize images with image_optim 2019-04-03 22:58:52 -04:00
Joshua Boniface
05a4161fd3 Correct the installation and removal of plugins
Upgrading plugins was broken for various reasons. There are four
fixes and a minor one:

1. Use a directory name based only on the `Name` of the plugin, not
   the source filename, which contains the version. Avoids strange
   duplication of the plugin.
2. Use the new directory name for the deletes if it's present, so
   that installation and removal happen at that directory level
   and we don't leave empty folders laying around. Ensures we
   properly remove additional resources in plugins too, not just
   the main `.dll` file.
3. Ignore the incoming `target` when installing, and always set
   it ourself to the proper directory, which would matter when
   reinstalling.
4. Deletes an existing target directory before installing if it
   exists. Note that not calling any of the plugin removal code
   is intentional; I suspect that would delete configurations
   unexpectedly when upgrading which would be annoying. This way,
   it just replaces the files and then reloads.
5. (Minor) Added some actual debug messages around the plugin
   download section so failures can be more accurately seen.
2019-04-03 20:05:14 -04:00
Vasily
05040351dc Merge pull request #1190 from jellyfin/updates
Update Dockerfiles
2019-04-03 18:05:59 +03:00
Andrew Rabert
d75324afc9 Update Dockerfiles
* Use new dotnet image paths
* Update jellyfin-web to 10.3.0-rc1
2019-04-03 01:21:28 -04:00
Joshua Boniface
38fcd31917 Search all subdirectories for Plugins
This was added in #801 which broke the previous plugin install
behaviour. Previously plugins could be loaded from subdirectories
but this search was only for the highest level. Change it to search
all subdirectories instead to restore the previous behaviour.

Also modifies the same option from #934, though I'm not 100% sure
if this is needed here.
2019-04-02 18:29:14 -04:00
Bond-009
2f33e99006 Speed up DeepCopy 2019-04-02 18:17:50 +02:00
Vasily
79d9b8e693 Merge pull request #1168 from Bond-009/io
Improve IO code
2019-04-01 16:20:23 +03:00
Vasily
91e3b3b491 Merge pull request #1176 from Bond-009/namingdep
Remove unused dependency for Emby.Naming
2019-04-01 16:19:44 +03:00
LogicalPhallacy
816d8a0216 Update install-jellyfin.ps1 2019-03-31 10:34:49 -07:00
LogicalPhallacy
e37ccd6ec0 Updates windows installer default lib location
You can use the emby import to move an existing library this way.
2019-03-31 10:32:56 -07:00
Bond_009
f2e2065fd4 Remove unused dependency for Emby.Naming 2019-03-31 15:25:30 +02:00
Joshua Boniface
f27477da26 Bump version to 10.3.0 and update submodule 2019-03-30 15:47:34 -04:00
Andrew Rabert
c032a015a4 Merge pull request #1172 from joshuaboniface/build-improvements
Minor improvements to release build setup
2019-03-30 15:45:11 -04:00
Anthony Lavado
11e81b035a Merge pull request #1171 from joshuaboniface/ubuntu-armhf
Add Ubuntu armhf build
2019-03-30 13:23:10 -04:00
Joshua Boniface
891a03c038 Remove superfluous variable declaration 2019-03-30 12:58:39 -04:00
Joshua Boniface
31aa6c486c Get the version string from build.yaml
For the purposes of packaging, this makes more sense, since we can
include additional appends to this version (e.g. `-rcX`) when we
can't in the SharedVersion file. The previous commit to the
bump_version script sets this as well.
2019-03-30 12:42:33 -04:00
Joshua Boniface
1d9133a5e8 Simplify bump_version and remove changelogs
Make this a lot simpler, use a reference to the release page
in the package changelogs instead of a full list.
2019-03-30 12:42:16 -04:00
Joshua Boniface
3375ca5a8c Split lists echoes into separate lines 2019-03-30 12:19:49 -04:00
Joshua Boniface
1596e93cc1 Fix up the Ubuntu repository definitions 2019-03-30 11:58:56 -04:00
Joshua Boniface
1a540f1cf7 Add Ubuntu armhf (Raspberry Pi) build
A pretty-much direct copy of the Debian armhf build infrastructure.
2019-03-30 11:50:46 -04:00
Joshua M. Boniface
05f5cd1bde Merge pull request #1170 from joshuaboniface/fix-build-typo
Correct bad quote characters
2019-03-29 19:17:32 -04:00
Joshua Boniface
f0fbd0232c Correct bad quote characters 2019-03-29 19:13:01 -04:00
Joshua M. Boniface
72dd609109 Merge pull request #1149 from LogicalPhallacy/ImprovedPasswordReset
Adds per user password reset
2019-03-29 18:26:30 -04:00
LogicalPhallacy
13e94a8b1b Remove dashes from pins 2019-03-29 12:48:07 -07:00
Bond_009
f911fda34f Merge ifs 2019-03-29 20:34:42 +01:00
Vasily
d9e7883fb5 Merge pull request #1169 from joshuaboniface/ffmpeg-location
Use new libexecdir location for jellyfin-ffmpeg
2019-03-29 18:16:36 +03:00
Phallacy
2d396cb589 adds readonly to properties 2019-03-29 07:10:49 -07:00
Phallacy
b56031b9f3 fix byte string 2019-03-28 20:49:11 -07:00
Joshua M. Boniface
fd86b141e2 Merge pull request #1166 from Bond-009/#1162
Fix exception on startup
2019-03-28 22:45:34 -04:00
Bond_009
41df562419 Improve IO code
* Style changes
* Remove remnants of SMB support
* Use `GetInvalidFileNameChars` instead of rolling our own
* Remove possible unexpected behaviour with async file streams
* Remove some dead code
2019-03-28 23:26:43 +01:00
Joshua Boniface
427a3e9b08 Use new libexecdir location for jellyfin-ffmpeg
From commit d6bb1f3c in jellyfin-ffmpeg, which moves the installed
binaries from /usr/share to /usr/lib on the next release.
2019-03-28 18:21:25 -04:00
Bond_009
3001f21f8d Hacky fix for a hacky issue 2019-03-28 19:11:05 +01:00
Phallacy
48b50a22a4 switched to a hexa string with crypto random backing 2019-03-28 08:15:53 -07:00
Phallacy
5e8496bc59 minor fixes and usings 2019-03-27 22:46:25 -07:00
Joshua M. Boniface
2dbc1153e8 Merge pull request #934 from Bond-009/plugin
WIP - Don't require a restart for 75% of plugins
2019-03-27 21:35:09 -04:00
Bond-009
b07c146fd9 Update Emby.Server.Implementations/Library/DefaultPasswordResetProvider.cs
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-27 16:17:18 -07:00
Bond-009
73a9079ee2 Merge branch 'master' into httpclient 2019-03-27 19:43:02 +01:00
Joshua M. Boniface
cc2edc4d66 Merge pull request #1151 from Phlogi/patch-1
Use public ports and advertise DNS if available for WAN address
2019-03-27 13:54:14 -04:00
Bond_009
9aaeb19418 Self-documenting code 2019-03-27 17:05:08 +01:00
Claus Vium
be86ea2982 Update MediaBrowser.Common/Net/IHttpClient.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-03-27 16:34:56 +01:00
Bond-009
d0fbd260d5 Merge branch 'master' into httpclient 2019-03-27 16:34:26 +01:00
Bond_009
b69b19ddce Move messageId out of outer loop 2019-03-27 16:28:52 +01:00
Bond_009
b647959ec4 Add EnableOutputInSubFolder back 2019-03-27 16:26:33 +01:00
Bond_009
6c0e2e249d Even more duplicate code removed 2019-03-27 16:13:36 +01:00
Bond_009
8ed5d154b7 Remove duplicate code 2019-03-27 16:07:08 +01:00
Anthony Lavado
524357bfa8 Merge pull request #1157 from Bond-009/smallfix
Simplify/remove/clean code
2019-03-27 09:53:45 -04:00
Bond_009
157a86d0f1 Remove dead code 2019-03-27 12:43:46 +01:00
Bond_009
ca37ca291f More style changes 2019-03-26 23:06:38 +01:00
Bond_009
93e535d3a1 Trying to make sense of the streaming code
Mostly small changes as I was looking through the code.

* async void -> async Task
* Properly implemented dispose methods
* Pass the logstream directly to the JobLogger
* Style fixes
2019-03-26 23:00:14 +01:00
Bond-009
7343e07fe5 Fix build error 2019-03-26 19:31:06 +01:00
Bond-009
a332092769 Reduce complexity http routes 2019-03-26 19:20:40 +01:00
Phallacy
6be8624373 async improvements and post reset cleanups 2019-03-25 22:17:23 -07:00
LogicalPhallacy
740c95d557 Apply minor suggestions from code review
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-25 21:40:10 -07:00
Joshua M. Boniface
31607fbb37 Merge pull request #1153 from Bond-009/dlna
Check if disposed first
2019-03-25 20:08:11 -04:00
Phlogi
122cba2aa7 Correct use of local variable wanAddress. 2019-03-25 22:26:05 +01:00
Bond-009
b44a70ff36 Simplify/remove/clean code
* Remove useless runtime check (we only support one)
* Remove unused args
* Remove a global constant

And ofc fix some warnings ;)
2019-03-25 22:25:32 +01:00
Phlogi
1b03f078b9 No need to assign empty string. 2019-03-25 21:43:50 +01:00
Phlogi
4c8f8cf64c Removed trailing spaces, renamed get wan IP function. 2019-03-25 21:34:55 +01:00
Bond_009
2696ac5eac Lower the amount of running tasks 2019-03-25 21:33:48 +01:00
Bond-009
6566c91360 Seperate changes from #1023
The unrelated changes from #1023 (and more)
2019-03-25 21:27:03 +01:00
Bond-009
d623f616fa Improved dispose method 2019-03-25 17:32:27 +01:00
Bond-009
fc8de8aead Check if disposed first 2019-03-25 17:27:24 +01:00
Claus Vium
6480cfcc87 Formatting update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Phlogi <Phlogi@users.noreply.github.com>
2019-03-25 10:19:08 +01:00
Claus Vium
e36d424b5f Formatting update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Phlogi <Phlogi@users.noreply.github.com>
2019-03-25 10:18:47 +01:00
Claus Vium
f7e7d72688 Formatting update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Phlogi <Phlogi@users.noreply.github.com>
2019-03-25 10:18:18 +01:00
Claus Vium
3474568ce2 Update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Phlogi <Phlogi@users.noreply.github.com>
2019-03-25 10:18:04 +01:00
Claus Vium
89f2dfd78a Update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Phlogi <Phlogi@users.noreply.github.com>
2019-03-25 10:17:53 +01:00
Claus Vium
2c4c56d6d6 Formatting update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Phlogi <Phlogi@users.noreply.github.com>
2019-03-25 10:17:40 +01:00
Phlogi
087d4153ae Fix check for available WAN address. 2019-03-24 21:47:18 +01:00
Phallacy
86772bd7bd removes needless dictionary 2019-03-24 12:17:32 -07:00
Claus Vium
4e2841f0d7 Update Emby.Server.Implementations/Library/UserManager.cs
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-24 11:41:03 -07:00
Phallacy
26fe4040bf fixes some usings 2019-03-24 11:40:00 -07:00
Phlogi
fb7f29de18 Format the WAN API Url correctly with https and Port. 2019-03-24 18:33:21 +01:00
Phlogi
d18252542d Also add the WAN switch to the public system info. 2019-03-24 17:11:21 +01:00
Phlogi
030fcaac15 Proper access to configuration objects 2019-03-24 17:02:03 +01:00
Phlogi
7ebb043249 Removed comment, renamed methods consistently. 2019-03-24 16:50:39 +01:00
Claus Vium
598b1c9966 Update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Phlogi <Phlogi@users.noreply.github.com>
2019-03-24 16:47:59 +01:00
Claus Vium
cf36aaef2b Update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Phlogi <Phlogi@users.noreply.github.com>
2019-03-24 16:47:48 +01:00
Claus Vium
f30af9cd5f Update Emby.Server.Implementations/ApplicationHost.cs
Co-Authored-By: Phlogi <Phlogi@users.noreply.github.com>
2019-03-24 16:47:42 +01:00
Bond-009
5024c52c60 Merge pull request #1140 from oddstr13/pr-doxygen-1
Add Doxygen config
2019-03-24 13:26:56 +01:00
Bond-009
e971b62dab Merge pull request #1137 from thornbill/fix-expires-header
Fix default value for Expires header
2019-03-24 13:25:41 +01:00
Phlogi
4ffec8ad26 Fix build, missing changes. 2019-03-24 12:19:10 +01:00
Phlogi
69cc5814d8 Change WAN IP behaviour: Use ServerConfiguration.WanDdns if set in configuration. 2019-03-24 12:11:46 +01:00
Phlogi
414a318a0d WAN Address should use public ports instead of local ports.
https://github.com/jellyfin/jellyfin/issues/601#issuecomment-475941080
2019-03-24 11:59:40 +01:00
Phallacy
758e35baba greaterthen/lessthen reversal fix 2019-03-24 00:30:16 -07:00
Phallacy
09921a00aa made password resets an interface and per user 2019-03-22 00:01:23 -07:00
Odd Stråbø
16a3bb2df4 Implemented some requested changes to the Doxyfile 2019-03-21 18:21:07 +01:00
Odd Stråbø
2c684c0231 Customize Doxygen config. 2019-03-21 13:42:29 +01:00
Odd Stråbø
949a1cce21 Generate doxygen template config doxygen -g 2019-03-21 13:16:33 +01:00
Vasily
0e787f4e9f Merge pull request #1139 from Liggy/debian-init
Update init scripts for compatibility with Devuan
2019-03-20 23:27:24 +03:00
Torsten
bd31091648 Update init scripts for compatibility with Devuan
Include start, stop, restart and status option for /etc/init.d/jellyfin
Use start-stop-daemon to make the script refer to systemctl mechanism
on systems that have systemd installed
2019-03-20 20:16:24 +01:00
Bill Thornton
4cd8903abc Fix default value for Expires header 2019-03-19 23:13:02 -04:00
Joshua M. Boniface
7b01de8db1 Merge pull request #1136 from jellyfin/add-access-to-template
Require access type to be included in bug report
2019-03-19 10:52:49 -04:00
Vasily
f73d8a44df Improve the wording per @joshuaboniface suggestion 2019-03-19 17:37:56 +03:00
Vasily
752d65d020 Require access type to be included in bug report
Inspired by https://github.com/jellyfin/jellyfin/issues/1085#issuecomment-473833591

It seems that the issue with "setup wizard" described there is only prominent when reverse-proxied, not when accessed directly. So this type of information should be gathered in the bug report as well.
2019-03-19 17:13:27 +03:00
LogicalPhallacy
c2667f99f4 Merge pull request #4 from jellyfin/master
updating local master
2019-03-18 22:58:37 -07:00
Joshua M. Boniface
c7e7aa0a61 Merge pull request #1117 from Bond-009/ffmpeg
Check before flushing ffmpeg log
2019-03-18 23:59:12 -04:00
Joshua M. Boniface
fc79659549 Merge pull request #1127 from LogicalPhallacy/lockoutfix
Add configurable user lockout
2019-03-18 21:13:51 -04:00
Vasily
e81a6adb95 Merge pull request #1090 from redSpoutnik/subtitle-display-title
Set DisplayTitle for subtitles
2019-03-17 09:36:35 +03:00
Phallacy
80aedcd7e2 really fixed line endings 2019-03-16 21:36:45 -07:00
Phallacy
fc28c9237c fixed line endings 2019-03-16 21:34:26 -07:00
Phallacy
b04200ca68 adding regex fix 2019-03-16 21:21:14 -07:00
Joshua M. Boniface
67fbbcfd12 Merge pull request #1121 from LogicalPhallacy/master
Update username regex to string literal with escaped -
2019-03-17 00:12:15 -04:00
Joshua M. Boniface
e3dbed1c1a Update Emby.Server.Implementations/Library/UserManager.cs
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-16 10:16:23 -07:00
redSpoutnik
480a6607e2 Merge branch 'master' into subtitle-display-title 2019-03-16 17:54:57 +01:00
redSpoutnik
4a30fee40d Remove some dead code 2019-03-16 17:28:45 +01:00
Phallacy
7f0fa74467 updated regex to string literal with escaped - 2019-03-16 00:38:31 -07:00
Vasily
3d1d27230d Merge pull request #1120 from LogicalPhallacy/master
quick fix for auth bug
2019-03-16 10:32:51 +03:00
LogicalPhallacy
9df1506794 Merge pull request #2 from LogicalPhallacy/master
update lockoutfix to latest for testing
2019-03-16 00:26:12 -07:00
LogicalPhallacy
2d0844b5db Merge pull request #1 from jellyfin/master
merging myself to latest
2019-03-16 00:25:16 -07:00
Phallacy
1ee016c997 configurable user lockout 2019-03-16 00:18:52 -07:00
Phallacy
221389089c quick fix for auth bug 2019-03-15 21:25:19 -07:00
Joshua M. Boniface
59031ee3b8 Merge pull request #1119 from ploughpuff/503retry
MusicBrainz 503 Retry Strategy
2019-03-15 16:47:03 -04:00
PloughPuff
d2e408539e MusicBrainz 503 Retry Strategy
Upon receiving back a 503 Service Unavailable from MusicBrainz (indicating throttling), retry the same request a number of times before giving up.
2019-03-15 19:33:26 +00:00
Bond_009
a8140cc74b Merge branch 'master' of github.com:jellyfin/jellyfin into ffmpeg 2019-03-15 18:08:51 +01:00
Bond_009
d5f080fefb Check before flushing ffmpeg log
The stream could have been diposed while writing.
2019-03-15 17:58:34 +01:00
Joshua M. Boniface
35ff8ec713 Merge pull request #1116 from Bond-009/sub
Fix exception caused by #1096
2019-03-15 12:48:15 -04:00
Bond_009
764c901cd7 Fix exception caused by #1096
```cs
MediaBrowser.Common.Extensions.ResourceNotFoundException: Configuration
with key subtitles not found.
   at
   Emby.Server.Implementations.AppBase.BaseConfigurationManager.<>c__DisplayClass42_0.<GetConfiguration>b__0(String
   k) in
   /home/pi/dev/jellyfin/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs:line
   247
      at
      System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey
      key, Func`2 valueFactory)
         at
	 Emby.Server.Implementations.AppBase.BaseConfigurationManager.GetConfiguration(String
	 key) in
	 /home/pi/dev/jellyfin/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs:line
	 238
	    at
	    MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.AddExternalSubtitles(Video
	    video, List`1 currentStreams, MetadataRefreshOptions
	    options, CancellationToken cancellationToken) in
	    /home/pi/dev/jellyfin/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs:line
	    486
	       at
	       MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.Fetch(Video
	       video, CancellationToken cancellationToken, MediaInfo
	       mediaInfo, BlurayDiscInfo blurayInfo,
	       MetadataRefreshOptions options) in
	       /home/pi/dev/jellyfin/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs:line
	       204
	          at
		  MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](T
		  item, MetadataRefreshOptions options,
		  CancellationToken cancellationToken) in
		  /home/pi/dev/jellyfin/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs:line
		  119
		     at
		     MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1
		     provider, TItemType item, String logName,
		     MetadataRefreshOptions options, RefreshResult
		     refreshResult, CancellationToken cancellationToken)
		     in
		     /home/pi/dev/jellyfin/MediaBrowser.Providers/Manager/MetadataService.cs:line
		     806

```
2019-03-15 17:34:15 +01:00
Andrew Rabert
f85d45d17f Merge pull request #1115 from SuperSandro2000/patch-2
Clean apt lists in arm Dockerfiles
2019-03-15 10:53:10 -04:00
Andrew Rabert
022bd1b8b4 Merge pull request #1114 from SuperSandro2000/patch-1
Only remove /var/lib/apt/lists/* in Dockerfile
2019-03-15 10:53:00 -04:00
Sandro Jäckel
31305af7ff Clean apt lists in arm Dockerfiles 2019-03-15 14:39:23 +01:00
Sandro Jäckel
dd929d796f Only remove /var/lib/apt/lists/* 2019-03-15 14:30:15 +01:00
Vasily
11fde02035 Merge pull request #1105 from ploughpuff/ratelimit
Only delay making MusicBrainz request if necessary
2019-03-15 16:01:55 +03:00
Joshua M. Boniface
3d85014edc Merge pull request #1110 from EraYaN/productname-and-ua
Adjusted the Product Name so the User Agent is correct/better.
2019-03-15 00:25:38 -04:00
PloughPuff
d125fbc43d Added contact email to user agent
MusicBrainz request a contact email address is supplied in comment section of user agent field.
2019-03-14 21:34:09 +00:00
redSpoutnik
427688a0a0 Change subtitles DisplayTitle behavior 2019-03-14 22:31:51 +01:00
Erwin de Haan
21cc38fcf4 Adjusted AssemblyCopyright attribute values. 2019-03-14 22:17:56 +01:00
Erwin de Haan
ee7bf86e0f Adjusted the Product Name so the User Agent is correct/better. 2019-03-14 22:11:47 +01:00
PloughPuff
f8bb7a7ff4 Increased interval to 1050ms and moved to class scope
Review comments from JustAMan.
2019-03-14 19:01:17 +00:00
PloughPuff
6d3e6d800f Only delay making request if necessary
When requesting data from MusicBrainz, only delay the request if previous request was less than rate limit ago, instead of always delaying for one second at start.
2019-03-14 19:01:17 +00:00
Vasily
208585d3f6 Merge pull request #1106 from Bond-009/warn2
More warning fixes
2019-03-14 19:54:44 +03:00
Vasily
bf00dedc7f Merge pull request #1103 from Bond-009/stream
Improvements around streams
2019-03-14 19:53:50 +03:00
Bond-009
bf43dc00bb More warning fixes 2019-03-13 22:32:52 +01:00
Bond-009
e64aaebbac Improvements around streams
* Use ArrayPool instead of allocating new buffers each time
* Remove NetworkStream copy
* Remove some dead code
2019-03-13 21:11:01 +01:00
Erwin de Haan
1d443d2ff5 Do not use the nuget packages for comparison, but the last master build (#1091)
* Do not use the nuget packages for comparison, but the last master build.
* Only allow passing builds.
2019-03-13 21:09:08 +01:00
Bond-009
6507a9b2ee Merge pull request #1104 from EraYaN/disable-abi-check-on-drone
Disable the Drone CI ABI check
2019-03-13 20:46:59 +01:00
Erwin de Haan
4cc4d57a78 Disable the Drone CI ABI check 2019-03-13 20:37:08 +01:00
Vasily
605bf0e8c3 Merge pull request #1100 from ploughpuff/rmprobeswitch
Finalise removal of --ffprobe switch
2019-03-13 01:42:07 +03:00
Vasily
89e2af6b57 Merge pull request #1096 from dkanada/opensubs
Remove open subtitles from the server
2019-03-13 01:22:55 +03:00
PloughPuff
b864e9da2a Finalise removal of --ffprobe switch
Removed --ffprobe from src files and server/docker scripts.
2019-03-12 22:09:18 +00:00
Vasily
f10382a696 Merge pull request #1098 from jellyfin/Bond-009-patch-2
Fix build by removing non existent namespace
2019-03-13 00:02:24 +03:00
Vasily
297f25cfc2 Merge pull request #1059 from Bond-009/os
Remove EnvironmentInfo
2019-03-13 00:01:00 +03:00
Bond-009
afdef163ea Fix build by removing non existent namespace
Looks like a wrong auto merge. (We really should fix CI)
2019-03-12 20:49:29 +01:00
Joshua M. Boniface
6751560228 Merge pull request #1092 from joshuaboniface/configurable-webdir
Add configurable webdir option
2019-03-12 12:51:11 -04:00
Joshua M. Boniface
2012eb5e11 Merge pull request #785 from Bond-009/xml
Remove useless abstraction around XmlReaderSettings
2019-03-12 11:49:39 -04:00
Bond-009
58068e249a Merge pull request #1094 from cvium/imageprocessor_exception
Skip processing of images that don't exist
2019-03-12 16:40:20 +01:00
Bond-009
3ddbda9aca Merge branch 'master' into xml 2019-03-12 16:37:18 +01:00
Vasily
1fef8bf266 Merge pull request #1060 from Bond-009/assinfo
Remove redundant class AssemblyInfo
2019-03-12 16:34:21 +03:00
Joshua Boniface
3c4043199a Implement review feedback 2019-03-12 09:18:45 -04:00
Vasily
0220309ea7 Merge pull request #1095 from Bond-009/fix1077
Add AppConfig to the DI service collection
2019-03-12 12:56:39 +03:00
Vasily
497b4f834f Merge pull request #1021 from Bond-009/failonwarn
Fail on warnings for Jellyfin.Server
2019-03-12 11:31:22 +03:00
dkanada
715ddbb3b0 remove open subtitles from the server 2019-03-11 18:10:31 -07:00
Bond-009
0ff038f0a2 Fix nullref 2019-03-11 23:13:01 +01:00
Claus Vium
7322485a6d Skip processing of images that don't exist 2019-03-11 20:44:12 +01:00
Vasily
f77af5f6e4 Merge pull request #1093 from joshuaboniface/saner-paths
Use better path configuration for packages
2019-03-11 15:32:36 +03:00
Vasily
2324c408ba Merge pull request #1089 from jellyfin/translations
Update translations
2019-03-11 15:30:50 +03:00
Joshua Boniface
037cf9e1ee Move CreateDirectory for dataDir to try block 2019-03-10 18:30:10 -04:00
Joshua Boniface
5268553e7f Have datadir envvar match the others 2019-03-10 18:24:11 -04:00
Joshua Boniface
5f7524aca2 Remove unneccessary string 2019-03-10 17:21:10 -04:00
Joshua Boniface
86f5221f96 Use environment variables instead of opts for RPM 2019-03-10 17:11:16 -04:00
Joshua Boniface
ecf85a73ec Use environment variables instead of opts for Deb 2019-03-10 17:09:51 -04:00
Joshua Boniface
132ce3ece1 Add further resources to complete WebPath 2019-03-10 17:04:18 -04:00
Joshua Boniface
25deca9579 Make use of WebPath 2019-03-10 16:20:46 -04:00
Joshua Boniface
93d15cd969 Add configuration flag for Web directory 2019-03-10 16:17:48 -04:00
Anthony Lavado
4b91c9bf66 Merge pull request #1075 from dkanada/thumbnail
Remove mirror images from library thumbnail
2019-03-10 10:52:50 -04:00
WWWesten
16adaa64c9 Translated using Weblate (Kazakh)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/kk/
2019-03-10 03:06:01 -04:00
Matsuri
93fe7957fb Translated using Weblate (Chinese (Simplified))
Currently translated at 97.8% (92 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hans/
2019-03-10 03:06:00 -04:00
Joshua M. Boniface
fb96763f65 Merge pull request #1077 from Bond-009/musicbrainz
Make MusicBrainz base url configurable
2019-03-09 23:19:32 -05:00
Anthony Lavado
63342f89d4 Merge pull request #1081 from cvium/certificate_not_null
Disable HTTPS in Kestrel if Certificate is null
2019-03-09 02:11:02 -05:00
dkanada
47095e6cf8 move a variable out of for loop 2019-03-09 11:17:02 +09:00
Claus Vium
f2062ba19b Disable HTTPS in Kestrel if Certificate is null 2019-03-08 22:25:45 +01:00
Bond-009
7f42dcc60f Remove more unused stuff 2019-03-08 20:32:14 +01:00
Bond-009
369785c184 Remove usage of depricated 'WebRequest'
Ref: https://docs.microsoft.com/en-us/dotnet/api/system.net.webrequest?view=netframework-4.7.2
2019-03-08 20:17:17 +01:00
Bond-009
58061a7295 Make MusicBrainz base url configurable 2019-03-08 17:15:52 +01:00
Anthony Lavado
c6c398179a Merge pull request #1072 from anthonylavado/remove-header
Remove New File Header
2019-03-08 10:23:13 -05:00
dkanada
e498e47109 remove mirror images from library thumbnail 2019-03-08 18:39:41 +09:00
Anthony Lavado
40089e2fd9 Merge pull request #1071 from jellyfin/Bond-009-patch-1
Fix error from #1069
2019-03-08 02:36:54 -05:00
Anthony Lavado
045a0419f6 remove new file header text, and remove it from solution
This removes the new file header text file from the repository, and also removes the include that was in the project solution.
2019-03-08 02:33:08 -05:00
Bond-009
80fb3dc2cb Fix error 2019-03-08 06:36:00 +01:00
Vasily
fcee64df09 Merge pull request #1069 from Bond-009/fix
Quick nullref fix
2019-03-08 00:58:52 +03:00
Bond-009
757e0194b9 Merge pull request #1067 from cvium/add_urlprefixes
Add urlprefixes during init
2019-03-07 22:54:02 +01:00
Bond-009
4625592a83 Quick nullref fix 2019-03-07 22:52:41 +01:00
Claus Vium
e3b844b5aa Add urlprefixes during init 2019-03-07 22:49:41 +01:00
Bond-009
decaffed86 Remove EnvironmentInfo
This moved the last bit of usefulness of EnvironmentInfo into a static
class.
2019-03-07 22:41:41 +01:00
Bond-009
669c48cc8b Merge pull request #1065 from cvium/closed_response
Don't set status code if response is closed
2019-03-07 22:32:01 +01:00
Vasily
d1fe24ac92 Merge pull request #1064 from Bond-009/fix2
Remove file added in #996
2019-03-08 00:29:33 +03:00
Claus Vium
3fa43a1e08 Don't set status code if response is closed 2019-03-07 22:26:23 +01:00
Vasily
028a98d2c1 Merge pull request #1058 from Bond-009/clean
Cleanup/simplification
2019-03-08 00:23:00 +03:00
Vasily
0f70a81db3 Merge pull request #1063 from EraYaN/azure-pipelines-upstream-change-fix
Update to renamed DownloadGitHubRelease task (Microsoft/azure-pipelines-tasks#9481)
2019-03-08 00:21:32 +03:00
Bond-009
d014a1dc1d Remove file added in #996 2019-03-07 22:16:27 +01:00
Vasily
e04a152ed0 Merge pull request #996 from Bond-009/libscan
Reduce the amount of exceptions thrown
2019-03-08 00:11:53 +03:00
Erwin de Haan
8a680ae324 Update to renamed DownloadGitHubRelease task (Microsoft/azure-pipelines-tasks#9481) 2019-03-07 22:00:28 +01:00
Vasily
75996476a7 Merge pull request #1061 from Bond-009/dead
Remove dead code
2019-03-07 23:57:51 +03:00
Bond-009
620d7b560d Fail on warnings for Jellyfin.Server 2019-03-07 21:52:16 +01:00
Bond-009
ab9859ecef Address comment 2019-03-07 21:42:56 +01:00
Bond_009
37ea50a572 Reduce the amount of exceptions thrown 2019-03-07 21:42:56 +01:00
Joshua M. Boniface
5cb3f04389 Merge pull request #1062 from Bond-009/warnfix
Fix the 2 new warnings
2019-03-07 15:34:51 -05:00
Bond-009
cedf50eeec Fix the 2 new warnings 2019-03-07 21:29:17 +01:00
Bond-009
c5fce647de Cleanup/simplification
* Removed useless copies/allocations
* Reduced unneeded complexity
2019-03-07 21:13:13 +01:00
Bond-009
10a0d6bdba Merge pull request #1010 from cvium/kestrel_poc
Remove System.Net and port to Kestrel
2019-03-07 21:08:57 +01:00
Claus Vium
0abe57e930 Merge remote-tracking branch 'remotes/upstream/master' into kestrel_poc 2019-03-07 20:16:51 +01:00
Bond-009
65c0b486aa Remove dead code
What it says on the tin
2019-03-07 19:27:43 +01:00
Bond-009
ae0ecc1b10 Merge pull request #870 from LogicalPhallacy/betterauth
Better default authentication
2019-03-07 19:11:36 +01:00
Claus Vium
dfff68b2f4 Make SkipLogExtensions static 2019-03-07 19:05:53 +01:00
Bond-009
e4c5d51860 Update MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
Co-Authored-By: cvium <cvium@users.noreply.github.com>
2019-03-07 19:04:50 +01:00
Claus Vium
8c609bc9ce Reduce aspnet imports 2019-03-07 19:04:09 +01:00
Bond-009
f486f5966f Update Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-07 09:56:03 -08:00
Bond-009
e91dd14b31 Remove redundent class AssemblyInfo 2019-03-07 18:10:55 +01:00
Joshua M. Boniface
8a53b60912 Merge pull request #947 from EraYaN/azure-pipelines
Add Azure Pipelines YAML
2019-03-07 09:57:14 -05:00
Vasily
a4b52b7264 Merge pull request #844 from ploughpuff/ffmpeg
Reworked FFmpeg path discovery and always display to user
2019-03-07 17:23:06 +03:00
Vasily
5ae0ef0527 Merge pull request #1028 from Bond-009/ratings
Simplify rating loading
2019-03-07 17:22:26 +03:00
Phallacy
dfb1d704ed made hashset static and readonly 2019-03-07 03:32:05 -08:00
Bond_009
ffd6dac03a Remove useless comments 2019-03-07 12:24:44 +01:00
Phallacy
8f4895e8a5 more fixes for perf and style 2019-03-07 03:11:41 -08:00
Bond_009
a9302b8b53 Remove useless abstraction around XmlReaderSettings
This removes the amount of stuff that needs to be passed around
Also removes some unneeded `ManagedFileSystem` usage
2019-03-07 12:04:14 +01:00
Bond-009
c31b0b311b Apply suggestions from code review
more minor fixes before I do larger fixes

Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-07 02:41:44 -08:00
Claus Vium
bba049c987 Make FileSystem readonly 2019-03-06 19:29:25 +01:00
Claus Vium
21c2acc520 Remove public Host property 2019-03-06 19:27:05 +01:00
Claus Vium
394d23a73a Review comments 2019-03-06 19:14:03 +01:00
Joshua M. Boniface
276428878e Merge pull request #1051 from joshuaboniface/build-improvements
Build improvements for wrapping infrastructure
2019-03-06 13:12:51 -05:00
Bond-009
04db0369d4 Update LocalizationManager.cs 2019-03-06 17:31:52 +01:00
Joshua Boniface
4ef7eda593 Copy install script from new location 2019-03-06 09:22:38 -05:00
Vasily
2242c8d793 Merge pull request #915 from cvium/remove_encryptionmanager
Remove IEncryptionManager
2019-03-06 15:56:15 +03:00
Phallacy
bef665be36 Minor fixes to address style issues 2019-03-05 23:45:05 -08:00
Joshua Boniface
bf9f342c13 Add build.yaml for parent build infrastructure 2019-03-05 23:53:07 -05:00
Joshua Boniface
a994edda04 Allow complete ignoring of submodule
Used by the parent build infrastructure
2019-03-05 23:52:58 -05:00
Joshua Boniface
9f6bca3658 Put output into bin instead of jellyfin-build 2019-03-05 23:22:07 -05:00
PloughPuff
2617a49b78 Renamed Init() to SetFFmpegPath() 2019-03-05 21:29:15 +00:00
PloughPuff
656bffbbb2 Remove --ffprobe logic 2019-03-05 21:29:15 +00:00
PloughPuff
8104e739d5 Address review comments from Bond 2019-03-05 21:29:15 +00:00
PloughPuff
632968dc81 Added self to contributors 2019-03-05 21:29:15 +00:00
PloughPuff
ed69e690b8 Review comments
Address review comments from JustAMan, Bond-009 and cvium.
2019-03-05 21:29:15 +00:00
PloughPuff
20775116f7 Reworked FFmpeg path discovery and always display to user
1) Reworked FFmpeg and FFprobe path discovery (CLI switch, Custom xml, system $PATH, UI update trigger).  Removed FFMpeg folder from Emby.Server.Implementations.  All path discovery now in MediaEncoder.

2) Always display FFmpeg path to user in Transcode page.

3) Allow user to remove a Custome FFmpeg path and return to using system $PATH (or --ffmpeg if available).

4) Remove unused code associated with 'prebuilt' FFmpeg.

5) Much improved logging during path discovery.
2019-03-05 21:24:54 +00:00
Claus Vium
446f9bf81f Remove more Content-Length references 2019-03-05 20:48:04 +01:00
Claus Vium
913e80fd55 Add ProcessWebSocketRequest to IHttpListener 2019-03-05 20:35:07 +01:00
Claus Vium
9a4a01fb0e Fix DI in FileWriter.TransmitFile 2019-03-05 19:32:22 +01:00
Claus Vium
df92df7bd6 Remove BOM 2019-03-05 19:22:41 +01:00
Claus Vium
78742b8e4c Switch to HeaderNames instead of hardcoded strings (and other header related fixes) 2019-03-05 19:20:28 +01:00
Erwin de Haan
942c400c19 Update README with Azure Pipelines status badge 2019-03-05 17:12:56 +01:00
Joshua M. Boniface
5587dd8bfb Merge pull request #900 from ploughpuff/validator
Implement proper FFmpeg version checking
2019-03-05 11:07:49 -05:00
Bond-009
8d1fc3f984 Merge pull request #1043 from thornbill/update-colors
Update image overlays to use Jellyfin blue
2019-03-05 12:06:48 +01:00
Claus Vium
318e0d4a24 Add GetValueOrDefault dictionary extension 2019-03-05 10:27:25 +01:00
Claus Vium
bc00617df7 Remove unused Brotli compressor 2019-03-05 10:26:43 +01:00
Phallacy
2c26517172 minor style fixes 2019-03-04 23:58:25 -08:00
Claus Vium
51648a2a21 Remove unused _listener 2019-03-05 08:05:42 +01:00
Claus Vium
12df381495 Grab content root from config and fix kestrel port bindings 2019-03-05 07:55:29 +01:00
Claus Vium
17ca23d73b Don't dispose the connection 2019-03-05 07:41:41 +01:00
Bill Thornton
41df94115f Update image overlays to use Jellyfin blue 2019-03-04 22:36:23 -05:00
Claus Vium
0250204f14 Expand todo 2019-03-04 22:26:57 +01:00
Bond-009
0419deeec4 Update LocalizationManager.cs 2019-03-04 20:18:35 +01:00
Claus Vium
9020f68ce1 Use QueryHelpers.AddQueryString 2019-03-04 20:08:54 +01:00
Claus Vium
557c4d065d Review comments 2019-03-04 19:55:59 +01:00
Claus Vium
6cc1bd544a Fix a logging statement 2019-03-04 19:31:26 +01:00
Joshua M. Boniface
aba22b92bc Merge pull request #735 from Bond-009/loop
Readability changes
2019-03-04 00:27:48 -05:00
Claus Vium
040871459b Remove some unused references 2019-03-03 14:35:54 +01:00
Claus Vium
6263b73d9c Await host startup 2019-03-03 14:30:41 +01:00
Claus Vium
1cc433eabc Start the webhost before RunStartupTasks and fix ContentEncoding 2019-03-03 13:54:14 +01:00
Daniel Widrick
5982cdad90 Implement SxxExx EpisodeNum Processing (#1009)
**Changes**
Implement and use SxxExx Episode numbering system from guide data if available.

**Issues**
Fixes #1008
2019-03-03 12:46:03 +01:00
Claus Vium
d450169964 Use EnableHttps instead of CertificateInfo 2019-03-03 08:46:17 +01:00
Claus Vium
e823c11b46 Add certificate to https and minor cleanup 2019-03-03 08:29:23 +01:00
Bond-009
c328417d29 Merge pull request #1030 from jellyfin/release-10.2.z
Backmerge for 10.2.2
2019-03-02 18:12:24 +01:00
Bond-009
c4192f9f8b Merge pull request #1032 from Lynxy/master
Correct the list of series types
2019-03-02 18:11:53 +01:00
Lynxy
5368112d90 Correct the list of series types 2019-03-01 22:28:25 -05:00
Bond-009
ed07ed44ae Simplify rating loading 2019-03-01 19:30:48 +01:00
Bond-009
9993dafe54 Don't mix LINQ and roreach loops for readability 2019-03-01 17:12:22 +01:00
Claus Vium
6bdb5debd2 Add some websocket manager boilerplate 2019-03-01 14:08:51 +01:00
Andrew Rabert
65403747df Merge pull request #1025 from jellyfin/justadep
Treat jellyfin-web as just another dependency for Docker builds
2019-03-01 07:52:29 -05:00
Bond-009
594b271383 Merge pull request #1024 from jellyfin/release-10.2.z
Backmerge for 10.2.2
2019-03-01 07:49:07 +01:00
Andrew Rabert
27f9981142 Treat jellyfin-web as just another dependency for Docker builds 2019-03-01 00:17:46 -05:00
Deniz
3d3d879b99 Translated using Weblate (Turkish)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/tr/
2019-02-28 23:13:39 -05:00
ElFantasma
53ed6e5e6e Translated using Weblate (Spanish (Argentina))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/es_AR/
2019-02-28 23:13:38 -05:00
SaddFox
d0e4e0f600 Translated using Weblate (Slovenian)
Currently translated at 87.2% (82 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/sl/
2019-02-28 23:13:36 -05:00
v1tin
311caf3fc3 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/pt_BR/
2019-02-28 23:13:35 -05:00
EffeF
7c13021def Translated using Weblate (Italian)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/it/
2019-02-28 23:13:35 -05:00
TheBird956
c8788d83fb Translated using Weblate (French (Canada))
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fr_CA/
2019-02-28 23:13:35 -05:00
TheBird956
331260cf80 Translated using Weblate (French)
Currently translated at 100.0% (94 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fr/
2019-02-28 23:13:34 -05:00
Joshua Boniface
58e5931a32 Bump version to 10.2.2 2019-02-28 22:03:08 -05:00
Bond-009
02041fa6f4 Merge pull request #1020 from Lynxy/master
Do not allow new users to delete content by default
2019-02-28 21:17:11 +01:00
Anthony Lavado
fcd299965d Merge pull request #992 from joshuaboniface/armhf-debian
Add Debian armhf (Rasberry Pi) build plus crossbuild
2019-02-28 12:55:59 -05:00
Vasily
79d5a53aea Merge pull request #1018 from fasheng/fix-dlna-rmvb
Fix rmvb video can not play under DLNA
2019-02-28 19:41:53 +03:00
Vasily
f1086a72bf Improve logic when determining return value
Co-Authored-By: ploughpuff <33969763+ploughpuff@users.noreply.github.com>
2019-02-28 15:58:41 +00:00
Xu Fasheng
95d001a053 Update CONTRIBUTORS.md 2019-02-28 22:15:59 +08:00
Vasily
b7fd68d366 Merge pull request #1017 from nvllsvm/dockerffmpeg
Set ffmpeg+ffprobe paths in Docker container
2019-02-28 16:43:35 +03:00
The Lynxy
c84729a4f4 Do not allow new users to delete content by default 2019-02-28 07:50:32 -05:00
Xu Fasheng
4951ec9814 Fix rmvb video can not play under DLNA
Or will report "Could not find handler for /videos/xxx/stream.rm" error
in server side.

Test OK with Kodi and gupnp-tools.
2019-02-28 18:00:25 +08:00
Phallacy
edba82db37 fixed logic flip in auth empty check and fixed crypto algo choice 2019-02-27 23:05:12 -08:00
Andrew Rabert
1d1e6dede9 Set ffmpeg+ffprobe paths in Docker container
Will always ensure containers use correct path.

Yes - the arm images have a different path than the amd64 one. This is
caused by the amd64 image using ffmpeg from jellyfin/ffmpeg while the
others use ffmpeg from their distro's repos.
2019-02-27 21:04:37 -05:00
Andrew Rabert
f384822aa5 Merge pull request #991 from joshuaboniface/ffmpeg-compat
Fix the ffmpeg compatibility
2019-02-27 20:45:43 -05:00
Claus Vium
1ac282b12e Call SharpWebSocket's Closed event handler before disposing 2019-02-27 23:39:20 +01:00
Claus Vium
588a13377c Remove a file that shouldn't have been added 2019-02-27 23:24:43 +01:00
Claus Vium
fb1de5a921 Remove more cruft and add the beginnings of a socket middleware 2019-02-27 23:22:55 +01:00
Claus Vium
71ed840944 Simplify websocket listeners 2019-02-27 22:09:22 +01:00
Claus Vium
dab8e15052 Check websocket state before closing 2019-02-27 21:48:28 +01:00
Claus Vium
e47d121985 Fix websockets 2019-02-27 21:40:47 +01:00
Claus Vium
c0b95dbc79 Fix query log for real 2019-02-27 20:11:40 +01:00
Claus Vium
647adc51c8 Fix query log 2019-02-27 19:55:25 +01:00
PloughPuff
7668ecf9c9 Use Version Class to ease comparisons 2019-02-27 18:20:48 +00:00
Vasily
3769453541 Merge pull request #978 from fasheng/fix-dlna-multiple-interfaces
Fix DLNA for multiple interfaces on linux
2019-02-27 19:23:31 +03:00
Vasily
8c2af50170 Merge pull request #1011 from Bond-009/order
Don't try to order the response the same as the request
2019-02-27 17:29:12 +03:00
Claus Vium
1e97e4d462 Remove IHttpResponse 2019-02-27 14:29:44 +01:00
Claus Vium
27e7e792b3 Replace some usage of QueryParamCollection 2019-02-27 14:23:39 +01:00
Xu Fasheng
7429c07c05 Remove redundant parenthesis 2019-02-27 20:16:54 +08:00
Claus Vium
91afaaf8fe Cleanup in QueryParamCollection 2019-02-27 12:45:06 +01:00
Claus Vium
333bd2107a Remove HttpUtility 2019-02-27 12:40:18 +01:00
Claus Vium
25d3d0b731 Remove some unused stuff 2019-02-27 08:02:32 +01:00
Claus Vium
77addb2283 Remove SocketHttpListener 2019-02-27 07:32:36 +01:00
Joshua M. Boniface
9651a78b0c Merge pull request #977 from Lynxy/genpts
Always set ffmpeg flag +genpts when video stream is being copied
2019-02-27 00:52:51 -05:00
Joshua M. Boniface
9eba31185a Merge pull request #959 from Bond-009/string
Reduce string allocations at startup
2019-02-27 00:37:31 -05:00
Joshua M. Boniface
aea7edf0fa Merge pull request #891 from Bond-009/postsan
Reduce the amount of db calls during the post scan event
2019-02-27 00:31:48 -05:00
Joshua M. Boniface
42d4834f63 Merge pull request #849 from Bond-009/span
Less string allocations
2019-02-27 00:30:31 -05:00
Joshua M. Boniface
ba78f6a0ff Merge pull request #999 from cvium/dont_write_disposed_log
Check that ffmpeg log target isn't disposed before writing to it
2019-02-27 00:27:25 -05:00
Erwin de Haan
feb5b62ad4 Enabled clean and updated the Github Connection Name 2019-02-27 00:53:16 +01:00
Erwin de Haan
5ccba7cf8a Move .azure to .ci 2019-02-27 00:20:04 +01:00
Claus Vium
848cfc32cc More cleanup 2019-02-26 22:57:59 +01:00
Claus Vium
5510e8ebee Remove unused Cookies 2019-02-26 22:53:59 +01:00
Claus Vium
9c02e99e35 Undo some of the span abuse 2019-02-26 22:40:25 +01:00
Claus Vium
148db8b81a Remove unused SharpSocket stuff 2019-02-26 22:11:21 +01:00
Claus Vium
e342b7bc71 Extend the IHttpServer interface to avoid the typecasting 2019-02-26 22:11:21 +01:00
Claus Vium
f1c93ae618 Remove SetContentLength and company 2019-02-26 22:11:21 +01:00
Claus Vium
4e229ad86b Fix PathInfo 2019-02-26 22:11:21 +01:00
Claus Vium
e88f079da6 Remove websocket options and configure kestrel listen ports 2019-02-26 22:11:21 +01:00
Claus Vium
4e8de67aca Remove SocketSharp from Jellyfin.Server and some other cleanup 2019-02-26 22:11:21 +01:00
Claus Vium
a85488cd20 Fix websockets array index out of bounds and some cleanup 2019-02-26 22:11:21 +01:00
Claus Vium
5a7cca9d1b Fix websockets and RawUrl 2019-02-26 22:11:21 +01:00
Claus Vium
d6c6f3c10c Still broken 2019-02-26 22:11:21 +01:00
Claus Vium
38f52a139e Add response compression middleware 2019-02-26 22:11:21 +01:00
Claus Vium
194da8416b Use middlewares instead of Routing 2019-02-26 22:11:21 +01:00
Claus Vium
f3e7bc0573 Replace some todos with http extensions and prepare some socket work 2019-02-26 22:11:21 +01:00
Claus Vium
c3fa299acc Remove hardcoded path and fix url bug in Windows 2019-02-26 22:11:21 +01:00
Claus Vium
852460b991 kestrel init 2019-02-26 22:11:21 +01:00
Claus Vium
33b67a357f Remove unused deps 2019-02-26 22:11:21 +01:00
Claus Vium
4db31acff9 Begin removing System.Net sources 2019-02-26 22:11:21 +01:00
Joshua M. Boniface
968e282c90 Merge pull request #1007 from Bond-009/time
Log time in a standardized way
2019-02-26 16:05:59 -05:00
Bond-009
1731bf7372 Remove ordering items 2019-02-26 20:47:23 +01:00
Bond-009
0804bed66d Log time in a standardized way 2019-02-26 19:40:23 +01:00
Bond-009
a0606b5730 Don't change submodule 2019-02-26 17:11:27 +01:00
Bond-009
9ba6227db4 Less string allocations 2019-02-26 17:11:04 +01:00
Vasily
9bab93262e Merge pull request #1003 from Bond-009/stopwatch
Use stopwatch for more accurate measurements and reduce log spam
2019-02-26 01:27:42 +03:00
Bond_009
0f9006c81f Use stopwatch for more accurate measurements and reduce log spam
DateTime.Now is suitible for small timespans
Replaced the needlessly complex and verbose logging for the httpserver
2019-02-25 18:26:17 +01:00
Vasily
b3438559cc Merge pull request #1000 from cvium/fix_object_disposed
Don't close the socket response multiple times
2019-02-25 16:52:31 +03:00
Vasily
8e5cccb22c Merge pull request #998 from cvium/enableraisingevents_default_true
Set EnableRaisingEvents to true for processes that require it
2019-02-25 16:42:27 +03:00
Vasily
500c0b9cba Merge pull request #979 from Wuerfelbecher/release-disable-debug
Build Package releases without debug turned on
2019-02-25 16:35:06 +03:00
Joshua Boniface
5054a77dcf Fix the ffmpeg compatibility
Doing this the other way was just complex. No longer try to override
the system ffmpeg, just put ours somewhere else and depend on that
package.
2019-02-25 00:41:34 -05:00
Joshua Boniface
dac2c98d8a Disable documentation and debug in build 2019-02-24 23:20:04 -05:00
Claus Vium
4df3333b71 Remove the unused status code 2019-02-24 22:31:46 +01:00
Claus Vium
5262e50fee Try another fix 2019-02-24 22:28:46 +01:00
Claus Vium
547d0ecf58 Move the check further down 2019-02-24 22:04:30 +01:00
Claus Vium
6e07eab247 Don't close the socket response multiple times 2019-02-24 21:45:03 +01:00
Claus Vium
96b3d37caf Check that ffmpeg log target isn't disposed before writing to it 2019-02-24 21:25:24 +01:00
Claus Vium
aafed63c3f Set EnableRaisingEvents to true for processes that require it 2019-02-24 16:33:05 +01:00
Claus Vium
2e9a3d45c2 Fix slow local image validation (#990)
* Check for local image directory existence to avoid tons of exceptions
2019-02-24 10:16:53 -05:00
Bond-009
e281c79d6f Merge pull request #968 from brianjmurrell/release-10.2.z-copr-autobuild
Release 10.2.z copr autobuild
2019-02-24 10:10:19 -05:00
Thomas Büttner
38ec68c488 use common.build.sh for docker image builds
Signed-off-by: Thomas Büttner <thomas@vergesslicher.tech>
2019-02-24 11:17:39 +01:00
Thomas Büttner
da61998ad6 Build releases without debug
Signed-off-by: Thomas Büttner <thomas@vergesslicher.tech>
2019-02-24 11:00:15 +01:00
Joshua M. Boniface
f28dd79fb1 Merge pull request #964 from jellyfin/fedora-runtime
Install the dotnet runtime package in Fedora build
2019-02-23 21:31:38 -05:00
Joshua Boniface
c2e57aba27 Add Debian armhf (Rasberry Pi) build plus crossbuild 2019-02-23 20:07:05 -05:00
Bond-009
4a3e42e779 Merge pull request #986 from JustAMan/submodule-update
Backmerge submodule updating strategy
2019-02-23 10:13:02 -05:00
The Lynxy
67f399dccf Leave +genpts untouched in GetProgressiveVideoArguments() 2019-02-23 10:01:41 -05:00
Lynxy
eb95b025d4 Add to contributors 2019-02-22 23:28:19 -05:00
Anthony Lavado
de45cfdd8c Merge pull request #984 from WWWesten/patch-1
Update kz.csv
2019-02-22 22:05:36 -05:00
Xu Fasheng
47966793c0 Remove useless if..else in SsdpDevicePublisher 2019-02-23 10:15:38 +08:00
Xu Fasheng
0c49079c16 Update comments for DLNA IPv6 2019-02-23 09:56:55 +08:00
Vasily
d82d6b6aef Merge pull request #981 from cvium/close_response_stream
Close the response stream after fetching temp files
2019-02-23 02:01:20 +03:00
Vasily
7ae526da8b Merging #975 to master 2019-02-23 01:52:51 +03:00
WWWesten
e79d44d9f1 Update kz.csv
The new ratings system
2019-02-23 01:51:35 +05:00
Claus Vium
fb7de2f966 Remove duplicate code and use using to properly dispose the response stream 2019-02-22 20:24:42 +01:00
Bond-009
db54fe4c70 Merge pull request #975 from cvium/release-10.2.z
Update submodule
2019-02-22 12:57:20 -05:00
Xu Fasheng
1eb26bdf08 Ignore IPv6 DLNA devices
DLNA is not ready for IPv6 now, uncomment the code will be fine.
2019-02-22 20:18:34 +08:00
Xu Fasheng
cbd0e71c07 Send DLNA devices message to only the matched interface
This will be the right way for multiple interfaces, or the client will
receive all devices message with different IP addresses and could not
detect which one could access.

And provide one option DlnaOptions.SendOnlyMatchedHost to fallback to old
behaviour if this commit missed something.
2019-02-22 20:18:34 +08:00
Xu Fasheng
2db1826ed8 Enable DLNA multi socket binding for linux
If not, DLNA on multiple interfaces not works for linux, for
example ZerotierOne VPN.
2019-02-22 20:13:17 +08:00
Xu Fasheng
cf4e64f430 Add option to toggle if ignore virtual interfaces
Some VPN like ZerotierOne owns IP address but no gateway, and there is no
good idea in NetworkManager.GetIPsDefault() to filter such virtual interfaces,
so just provide one option to let user decide it.
2019-02-22 20:13:17 +08:00
Lynxy
9b39404b9a Always set ffmpeg flag +genpts when video stream is being copied 2019-02-21 19:50:57 -05:00
Claus Vium
00fe66a38c Update submodule 2019-02-21 20:59:10 +01:00
Vasily
406af5f086 Merge pull request #967 from brianjmurrell/dotnet-runtime
dotnet-runtime is needed on Fedora now
2019-02-21 15:25:51 +03:00
Vasily
e7e7d96f51 Merge pull request #776 from cvium/update_tvdb
Update tvdb provider to v2 api
2019-02-21 15:09:54 +03:00
Vasily
785fa76ac6 Merge pull request #955 from ploughpuff/avoid
Avoid exceptions due to folder and file not found
2019-02-21 15:05:31 +03:00
Vasily
6c967c5982 Merge pull request #952 from Liggy/populate-extras
Populate video extras again
2019-02-21 15:02:36 +03:00
Brian J. Murrell
f03e279382 COPR auto building
This adds enhancements so that Fedora/EL packages can be automatically
built in COPR when a webhook is received.  A typical webhook could be
for tagging events for example or even a "Release" webhook to only
build releases.
2019-02-21 02:12:16 -05:00
Brian J. Murrell
1bc2b12ee3 dotnet-runtime is needed in Fedora RPM build also 2019-02-21 02:11:46 -05:00
Joshua Boniface
469a17b3ca Install the dotnet runtime too
This is needed since /usr/bin/dotnet doesn't exist in the SDK package
for whatever reason as of Feb 18 2019.
2019-02-20 20:36:49 -05:00
Bond-009
affb8c8673 Merge pull request #962 from scheidleon/fix-windows-build
Fix Path
2019-02-20 15:38:43 -05:00
scheidleon
74aa38acd7 Fix Path 2019-02-20 21:04:52 +01:00
Joshua M. Boniface
d4ded281aa Merge pull request #961 from jellyfin/release-10.2.z
Release 10.2.1
2019-02-20 14:24:22 -05:00
Claus Vium
c597f0de35 Make Tvdb strings const 2019-02-20 19:55:06 +01:00
Bond-009
3965f90236 Update MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesImageProvider.cs
Co-Authored-By: cvium <cvium@users.noreply.github.com>
2019-02-20 19:36:33 +01:00
Claus Vium
8af4417f8f Add ConfigureAwait to awaited calls 2019-02-20 19:35:47 +01:00
Claus Vium
4a5c526ccc Fix logging args and add ilogger with categoryname 2019-02-20 19:08:47 +01:00
Bond_009
320707d44c Reduce string allocations at startup 2019-02-20 16:49:03 +01:00
Torsten
2690ac299b Only refresh metadata if extras changed 2019-02-20 16:39:49 +01:00
Torsten
268b099ca8 Merge branch 'populate-extras' of github.com:Liggy/jellyfin into populate-extras 2019-02-20 16:38:30 +01:00
Liggy
33171a58b5 Merge branch 'master' into populate-extras 2019-02-20 16:37:57 +01:00
PloughPuff
73c1cdb32a Avoid exceptions due to folder and file not found
1) Use function to return path to temp transcode path which has benefit of creating temp folder if not exists, thereby avoiding the exception when GetFilePaths is used.
2) Check json files exists before attempting to read from it.  Avoids having to mask FileNotFound exceptions when debugging.
2019-02-20 13:30:06 +00:00
Liggy
13bfe5093e Merge branch 'master' into populate-extras 2019-02-20 14:24:23 +01:00
Bond-009
99bed9a9c3 Merge pull request #939 from joshuaboniface/cleanup-builds
Clean up and rename obsolete deployment platforms
2019-02-20 07:28:20 -05:00
Vasily
8ef41020d9 Merge pull request #847 from Bond-009/async
Make websockets code async
2019-02-20 15:03:42 +03:00
Bond-009
fca226bdfd Add comment 2019-02-20 12:53:35 +01:00
Vasily
bca7a26ffd Merge branch 'master' into update_tvdb 2019-02-20 14:46:07 +03:00
Vasily
60df855b26 Merge pull request #930 from fruhnow/AuthorizationCheck
checking user-permission in GetQueryResult
2019-02-20 14:42:35 +03:00
Vasily
44ed037e73 Merge pull request #950 from cvium/replace_priority_queue
Replace OptimizedPriorityQueue source with NuGet reference
2019-02-20 14:39:52 +03:00
Vasily
50ce7572b4 Merge pull request #851 from Bond-009/appdata
Simplify code to get data dir
2019-02-20 14:31:01 +03:00
Vasily
74695428fe Merge pull request #914 from Bond-009/httppostedfile
Separate HttpPostedFile into it's own file
2019-02-20 13:33:42 +03:00
Claus Vium
139807719c Add missing base64 conversion 2019-02-20 11:09:10 +01:00
Claus Vium
1e2050f106 Rename functions to match functionality 2019-02-20 11:09:10 +01:00
Claus Vium
a23f04623e Remove IEncryptionManager 2019-02-20 11:09:06 +01:00
Claus Vium
1f30a50f4a Address review comments 2019-02-20 11:03:04 +01:00
Phallacy
098de6b050 made newlines into linux newlines 2019-02-20 01:17:30 -08:00
Phallacy
a0d31a49a0 merging with master to clear merge conflict 2019-02-20 00:46:13 -08:00
Phallacy
6bbb968b57 minor changes and return to netstandard 2019-02-20 00:00:26 -08:00
Joshua M. Boniface
6c6e9ca9f2 Merge pull request #889 from Bond-009/xmlex
Fix uncaught xml error
2019-02-19 21:31:16 -05:00
Joshua M. Boniface
89d4ce309d Merge pull request #848 from Bond-009/perf
Minor changes to reduce allocations
2019-02-19 21:24:51 -05:00
Joshua M. Boniface
b43317c5e1 Merge pull request #830 from Bond-009/update
Removed remaining self-update code
2019-02-19 21:21:36 -05:00
Torsten
5917e91447 Merge https://github.com/jellyfin/jellyfin into populate-extras 2019-02-19 23:21:40 +01:00
Torsten
9753a76905 Populate video extras again 2019-02-19 22:41:25 +01:00
Vasily
24b76dbed8 Merge pull request #936 from EraYaN/fix-drone-abi-tests
Fixed the assemblynames for compatibility check in drone.
2019-02-20 00:22:09 +03:00
Claus Vium
dab25a0eeb Remove OptimizedPriorityQueue source and grab it from nuget 2019-02-19 21:17:30 +01:00
Felix Ruhnow
53beebc774 switching logging to serilog convention according to pr comments 2019-02-19 12:17:28 +01:00
Felix Ruhnow
ba003e06ef adressing pr comments 2019-02-19 12:09:39 +01:00
Felix Ruhnow
1d631540ac adressing pr comments 2019-02-19 12:06:50 +01:00
Joshua Boniface
3ed9d32f68 Rename Windows scripts folder 2019-02-18 22:07:53 -05:00
Joshua Boniface
3ecfd1fdd1 Rename framework to portable 2019-02-18 22:07:12 -05:00
Joshua Boniface
24574d4964 Rename MacOS build 2019-02-18 22:06:44 -05:00
Joshua Boniface
512ab8c6aa Remove unneeded Linux builds 2019-02-18 22:06:06 -05:00
Erwin de Haan
029bafdf9c Changed build name template and limited number of parallel jobs. 2019-02-19 03:16:17 +01:00
Erwin de Haan
0849c4a447 Switched to dotnet based execution again because of permissions. 2019-02-19 03:12:53 +01:00
Erwin de Haan
5238ba5d8f Fix tool extraction search pattern. 2019-02-19 03:07:44 +01:00
Erwin de Haan
6b1a64652f Fix path for naming, and add extra CopyFIle Task. 2019-02-19 02:59:56 +01:00
Erwin de Haan
9961c8c459 No full publish of artifacts. 2019-02-19 02:55:10 +01:00
Erwin de Haan
18418b6892 Fixed secondary Artifact paths and Debug config. 2019-02-19 02:50:25 +01:00
Erwin de Haan
d4bc7b5a5a Fix NuGet task name. 2019-02-19 02:42:42 +01:00
Erwin de Haan
e2d0f67077 Fix the conditions. 2019-02-19 02:32:36 +01:00
Erwin de Haan
5ef63e738d Added final stage and removed triggers. 2019-02-19 02:28:16 +01:00
Erwin de Haan
7bbcb455c0 Added compat checking to YAML 2019-02-19 02:17:57 +01:00
Erwin de Haan
2ad54cd09d Fixed the assemblynames from drone since, the namespaces do not line up (yet). 2019-02-19 01:18:49 +01:00
Erwin de Haan
7c9803e135 Update azure-pipelines.yml for Azure Pipelines 2019-02-18 23:47:31 +01:00
Erwin de Haan
480999e8e6 Update azure-pipelines.yml for Azure Pipelines 2019-02-18 23:42:24 +01:00
Erwin de Haan
ef17ec700b Update azure-pipelines.yml 2019-02-18 23:24:39 +01:00
Erwin de Haan
4b34b0cfea Merge branch 'azure-pipelines' of https://github.com/EraYaN/jellyfin into azure-pipelines 2019-02-18 23:03:14 +01:00
Erwin de Haan
60fc53306d Fixed vmImage 2019-02-18 22:53:32 +01:00
Bond-009
c6188e26af Got to start somewhere 2019-02-18 22:47:02 +01:00
Erwin de Haan
18717d103a Update azure-pipelines.yml for Azure Pipelines 2019-02-18 22:36:24 +01:00
Erwin de Haan
6834b64922 Add first Azure Pipeline (Build) 2019-02-18 22:26:40 +01:00
Phallacy
56e3063342 little fixes for JustAMan 2019-02-18 10:56:01 -08:00
Joshua M. Boniface
781cca0c82 Merge pull request #902 from brianjmurrell/copr-autobuild
COPR auto building
2019-02-18 13:53:59 -05:00
Andrew Rabert
eab35890dc Merge pull request #862 from EraYaN/abi-check-drone
Add dotnet-compat ABI testing and Debug configuration building to drone-CI
2019-02-18 13:11:06 -05:00
Felix Ruhnow
967d5deeb7 checking user-permission in GetQueryResult to prevent accessing the library without permission but having a link. (+added myself as contributor. forgot last time bout that) 2019-02-18 18:29:58 +01:00
Bond-009
51ba28bd65 Remove useless check 2019-02-18 17:37:10 +01:00
Bond_009
a94aeb5c87 Simplify code to get data dir 2019-02-18 17:35:09 +01:00
Vasily
13f2783a8e Merge pull request #887 from wtayl0r/replace-primitives-with-iconfiguration
Replace primitive injection with IConfiguration
2019-02-18 19:30:11 +03:00
Bond_009
7554f63551 Remove more self-update code 2019-02-18 16:57:08 +01:00
Bond_009
25253cf961 Fix style issues in changed files 2019-02-18 16:57:08 +01:00
Bond_009
77a5617774 Removed remaining self-update code 2019-02-18 16:57:08 +01:00
Vasily
395072239d Merge pull request #913 from Bond-009/log
Reduce log spam
2019-02-18 14:50:53 +03:00
Vasily
e2f6ecaef6 Merge pull request #829 from Bond-009/fields
Removed some unused fields
2019-02-18 14:47:02 +03:00
Phallacy
48e7274d37 added justaman notes, fixed new bug from emty has removals 2019-02-18 01:26:01 -08:00
LogicalPhallacy
9f3aa2cead Apply suggestions from code review
Adding minor stylistic suggestions from Bond-009

Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-02-18 00:31:03 -08:00
bobberb
bb50363812 Translated using Weblate (Hebrew)
Currently translated at 97.8% (92 of 94 strings)

Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/he/
2019-02-17 15:59:36 -05:00
Joshua M. Boniface
9a38e4dc8a Merge pull request #925 from Bond-009/newmaser
Merge 10.2.0 release branch back into master
2019-02-17 13:05:12 -05:00
William Taylor
c607c95e64 Removed async from non-async method 2019-02-17 14:33:20 +00:00
William Taylor
18ae107ce4 Removed unnecessary configuration options and reduced primitive dependencies 2019-02-17 14:09:52 +00:00
William Taylor
3f80b16ffa Removed Reference and replaced with package reference 2019-02-17 14:09:52 +00:00
William Taylor
72aa364aa5 Removed extra using 2019-02-17 14:08:52 +00:00
William Taylor
0d5fbcb031 Removed primitives from services in Program.cs
This will make it easier to move dependency registration
to a system without having to new up all the services first.
Moved the primitives to an IConfiguration which is much easier to inject.
2019-02-17 14:08:52 +00:00
Bond-009
a35ea49c99 Merge remote-tracking branch 'upstream/release-10.2.z' into newmaser 2019-02-17 10:38:44 +01:00
Bond-009
4811e76860 Merge branch 'master' into perf 2019-02-16 17:05:44 +01:00
Bond-009
64a4f259a2 Merge branch 'master' into async 2019-02-16 17:05:05 +01:00
Bond-009
bdfd042d70 Merge branch 'master' into fields 2019-02-16 17:03:15 +01:00
Bond-009
a993420676 Reduce log spam 2019-02-16 16:42:24 +01:00
Bond-009
fb6a901374 Separate HttpPostedFile 2019-02-16 11:46:58 +01:00
Bond-009
25c2267a89 Merge pull request #907 from cvium/fix_assembly_visibility
Fix assembly visibility
2019-02-16 10:38:10 +01:00
PloughPuff
69ea15f73a Use string interpolation
Two further review comments from JustAMan.
2019-02-16 00:47:38 +00:00
Vasily
b7ae044e65 Merge pull request #885 from Bond-009/warn
More warning fixes
2019-02-16 03:22:12 +03:00
PloughPuff
d8d237f6f2 Review comments
Addressed review comments from JustAMan.  Removed code to determine experimental version.  Store major and minor as two ints.  Allow control of a min and max recommended version.
2019-02-15 23:51:22 +00:00
Bond-009
18e1d03a89 Comments 2019-02-16 00:44:10 +01:00
Vasily
3947f2315d Update Jellyfin.Server/Jellyfin.Server.csproj
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-02-16 00:43:56 +01:00
Bond-009
cb9e50b2ea Reorder elements 2019-02-16 00:43:56 +01:00
Bond-009
e620bb9512 Remove more doc warnings 2019-02-16 00:43:56 +01:00
Bond-009
8b04fe7633 More fixes 2019-02-16 00:43:56 +01:00
Bond-009
2cb747651b Correctly dispose WebSocketSharpListener 2019-02-16 00:43:56 +01:00
Bond-009
46897aab4f More warnings 2019-02-16 00:43:56 +01:00
Bond-009
892787cb1a Disable SA1130 2019-02-16 00:43:56 +01:00
Bond-009
be77e14db9 Warnings for docs 2019-02-16 00:43:56 +01:00
Bond-009
34af7501fa Fix up CoreAppHost.cs 2019-02-16 00:43:56 +01:00
Bond-009
183ef34422 Do not declare visible instance fields 2019-02-16 00:43:56 +01:00
Bond-009
637936cb9f Closing braces should be followed by an empty line 2019-02-16 00:43:56 +01:00
Bond-009
fc59b0ab77 Disable SA1512 2019-02-16 00:43:56 +01:00
Bond-009
d8b312674d No multiple empty lines 2019-02-16 00:43:56 +01:00
Bond-009
ebae7229c1 Single line comments should start with a space 2019-02-16 00:43:56 +01:00
Bond-009
3df8cda110 ConfigureAwait 2019-02-16 00:43:56 +01:00
Bond-009
43cf11aa35 Change discards 2019-02-16 00:42:56 +01:00
Claus Vium
21f0a7e020 Make all class implementing dynamically loaded interfaces public 2019-02-15 23:05:14 +01:00
Claus Vium
cb6d2cbd2d Remove SizeLimit 2019-02-15 22:02:17 +01:00
Claus Vium
ce51025e7c Use DI for TvDbClientManager 2019-02-15 20:11:27 +01:00
Claus Vium
5a054e5150 Remove useless doc 2019-02-15 19:33:10 +01:00
Claus Vium
98f003f71a Review comments 2019-02-15 19:33:10 +01:00
Claus Vium
b9efcace79 Extract imagetype-to-keytype statements into a utility function and move tvdb specific utils to separate class 2019-02-15 19:33:10 +01:00
Claus Vium
1aaa8de1f9 Use Task.WhenAll properly 2019-02-15 19:33:10 +01:00
Claus Vium
5e2e190f3e Add key delimiter to avoid potential clashes 2019-02-15 19:33:10 +01:00
Claus Vium
828434058f Use language supplied as argument instead of reading from TvDbClient 2019-02-15 19:33:10 +01:00
Claus Vium
dfbf5fc9fa Add generic key generation function 2019-02-15 19:33:10 +01:00
Claus Vium
8029cd3ebb Add better language support 2019-02-15 19:33:10 +01:00
Vasily
e970d7a6aa Update MediaBrowser.Providers/TV/MissingEpisodeProvider.cs
Co-Authored-By: cvium <cvium@users.noreply.github.com>
2019-02-15 19:33:10 +01:00
Claus Vium
350e795640 Fix namespace in tvdbclientmanager 2019-02-15 19:33:10 +01:00
Claus Vium
f5bda652c4 Add support for searching for episodes by premiere date and fixed timezones 2019-02-15 19:33:10 +01:00
Claus Vium
e8189cd0f6 Fix namespaces 2019-02-15 19:33:10 +01:00
Claus Vium
18231fedef Add braces to if's and other minor style changes 2019-02-15 19:33:10 +01:00
Claus Vium
935c7231eb Review comments 2019-02-15 19:33:10 +01:00
Vasily
da2c7db0df Apply suggestions from code review
Co-Authored-By: cvium <cvium@users.noreply.github.com>
2019-02-15 19:33:10 +01:00
Claus Vium
83d98ac92d Fix episode provider 2019-02-15 19:33:10 +01:00
Claus Vium
b997b12d27 Add names to tuple items and reduce list iterations 2019-02-15 19:33:10 +01:00
Claus Vium
6887e790c8 Minor fixes in MissingEpisodeProvider 2019-02-15 19:33:10 +01:00
Claus Vium
373a1f72bf Fix actor image provider 2019-02-15 19:33:10 +01:00
Claus Vium
0d43b06042 Fix MissingEpisodeProvider (almost) 2019-02-15 19:33:10 +01:00
Claus Vium
ced9868357 Fix a copy paste mistake and add series end date 2019-02-15 19:33:10 +01:00
Claus Vium
23c867f946 Remove TvdbPrescanTask as it looks like it was used for pre-fetching data, which is no longer relevant 2019-02-15 19:33:10 +01:00
Claus Vium
42c233c74e Add much needed exception handling and logging 2019-02-15 19:33:10 +01:00
Claus Vium
1f8e74f3a8 Add caching for all tvdb requests 2019-02-15 19:33:10 +01:00
Claus Vium
d6835f8dd6 Use the locking properly, this is not Python... 2019-02-15 19:33:10 +01:00
Claus Vium
86940e96d5 More MemoryCache PoC 2019-02-15 19:33:10 +01:00
Claus Vium
75d90c8e4c Add caching PoC 2019-02-15 19:33:10 +01:00
Claus Vium
ecbc0538f6 Add some error handling, grab imdb id and other minor fixes 2019-02-15 19:33:10 +01:00
Claus Vium
2a26760911 Episode provider is somewhat broken 2019-02-15 19:33:10 +01:00
Claus Vium
19b6808602 Remove some junk from series provider 2019-02-15 19:33:10 +01:00
Claus Vium
c2202be0f8 Some of it works??? 2019-02-15 19:33:10 +01:00
Claus Vium
9729ae52a3 initial commit 2019-02-15 19:33:10 +01:00
Vasily
7cc69f30c4 Merge pull request #801 from Bond-009/di
Move to Microsoft.Extensions.DependencyInjection
2019-02-15 21:21:58 +03:00
Brian J. Murrell
e33706ab25 Code review updates
Also fix a bug in the tarball creation that existed even prior
to moving it into create_tarball.sh
2019-02-15 10:22:52 -05:00
Brian J. Murrell
4018b7e2d5 COPR auto building
This adds enhancements so that Fedora/EL packages can be automatically
built in COPR when a webhook is received.  A typical webhook could be
for tagging events for example or even a "Release" webhook to only
build releases.
2019-02-15 08:21:55 -05:00
Vasily
8425d76198 Merge pull request #875 from Bond-009/error
Treat warnings as errors for release builds
2019-02-15 13:58:49 +03:00
Vasily
9bf009c4f8 Merge pull request #898 from EraYaN/namingrules-editorconfig
Switch to Roslyn naming rules in EditorConfig
2019-02-15 13:40:10 +03:00
PloughPuff
a6bde0943e Implement proper FFmpeg version checking
Three routes to determine FFmpeg version:
1) Grab the 'ffmpeg version x.y' from from the -version output.  This should work for all pre-built binaries.
2) Compare the library versions against known contents of FFmpeg versions.  This is fallback aimed at custom builds.
3) Compare libavcodec version to determine if newer than latest known release.  This suggests user is running within latest/HEAD/master build.
2019-02-14 22:08:48 +00:00
Erwin de Haan
db1ebe2559 Static fields prefix 's_' -> '_' 2019-02-14 20:14:29 +01:00
Erwin de Haan
dbebc4774f Switched to Roslyn naming rules 2019-02-14 20:06:20 +01:00
Bond-009
0fbc4545d1 Address comments 2019-02-14 17:02:46 +01:00
Vasily
5d4bef5478 Update jellyfin-web submodule to master as of 14.02.2019 2019-02-14 09:14:04 -05:00
Vasily
cac3a3e945 Merge pull request #863 from fruhnow/tvg-chno
Adding support for "tvg-chno"-Tag in M3U Channel Lists
2019-02-14 12:46:31 +03:00
Bond-009
bca569da42 Reduce the amount of db calls during the post scan event 2019-02-13 22:10:37 +01:00
Bond-009
a82303ccd1 Fix uncaught xml error 2019-02-13 21:41:24 +01:00
ploughpuff
a2dd2ddd55 Rewrite rules for determining app paths and use XDG_CONFIG_HOME for configDir (#781)
Re-write rules for determining dataDir, configDir and logDir.  Generally, arguments from command line take precedence, then JELLYFIN env vars, before using XDG names.

Co-Authored-By: ploughpuff <33969763+ploughpuff@users.noreply.github.com>
2019-02-13 16:35:14 +01:00
Bond-009
5835c4b21d Remove comment 2019-02-13 12:58:46 +01:00
Claus Vium
d8e6808d77 Update Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs
fix to styling

Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-02-13 00:44:07 -08:00
Claus Vium
9e58e31de0 Update Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs
fix to styling

Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-02-13 00:43:48 -08:00
Phallacy
77602aff88 Minor fixes re:PR870, added null checks from PR876 2019-02-13 00:33:00 -08:00
Phallacy
1ffd443d5a fixed nul user check to be first per justaman 2019-02-12 22:30:26 -08:00
Phallacy
1dc5a624a7 fixed gitignore fail 2019-02-12 22:24:05 -08:00
Erwin de Haan
3f878d63a5 Added Debug build and seperate the check-abi pipeline. 2019-02-12 22:44:01 +01:00
Bond-009
a5882ae162 Treat warnings as errors for release builds 2019-02-12 22:15:11 +01:00
Bond-009
c74028d08d Address comments 2019-02-12 21:59:56 +01:00
Bond-009
3f13851be5 Address comments 2019-02-12 21:06:47 +01:00
Bond_009
ea446fd4a3 Revert back to netcoreapp2.1 2019-02-12 21:06:47 +01:00
Bond_009
585b5201f1 Last bits 2019-02-12 21:06:47 +01:00
Bond_009
8d98885cda Less string allocations 2019-02-12 21:06:47 +01:00
Bond_009
da9418c1b2 Useless copy 2019-02-12 21:06:47 +01:00
Bond_009
9dba930a85 Warn faster for slow requests 2019-02-12 21:06:47 +01:00
Bond_009
7722cb3ffa Some Lists -> IEnumerable 2019-02-12 21:06:47 +01:00
Bond_009
3e6819c718 Don't clone lists 2019-02-12 21:06:47 +01:00
Bond_009
41fb1e5106 Tuple -> ValueTuple 2019-02-12 21:06:47 +01:00
Bond_009
64d5ec12e2 Use HashSets for increased perf 2019-02-12 21:06:47 +01:00
Bond_009
d409623086 Don't create multiple instances of the same type 2019-02-12 20:52:23 +01:00
Bond_009
9af28607c9 Simplify plugin loading 2019-02-12 20:52:23 +01:00
Bond_009
81a8ebde22 Move to Microsoft.Extensions.DependencyInjection
This PR replaces SimpleInjector with
Microsoft.Extensions.DependencyInjection.
2019-02-12 20:52:23 +01:00
Erwin de Haan
8055b70ab1 Fixed full pipeline, runs correctly now with drone exec 2019-02-12 16:21:46 +01:00
Phallacy
05bbf71b6d sha256 with salt auth and sha1 interop 2019-02-12 02:16:03 -08:00
LogicalPhallacy
8bf88f4cb2 Merge pull request #9 from jellyfin/master
Yanking in latest changes
2019-02-11 22:48:50 -08:00
Felix Ruhnow
edf5ee0cc4 combining some of the if's and adressing #820 2019-02-11 10:11:07 +01:00
Felix Ruhnow
86089ec03a Adding support for "tvg-chno"-Tag in M3U Channel Lists 2019-02-10 22:23:47 +01:00
Erwin de Haan
29d6783471 Switched to debian for the compat runners. 2019-02-10 21:10:03 +01:00
Erwin de Haan
236e21efcb Fixed extension of compat checker and added err_ignore flag. 2019-02-10 21:04:39 +01:00
Erwin de Haan
30ec203eff Added first test for dotnet-compat ABI testing to drone. 2019-02-10 20:57:31 +01:00
Bond_009
a6a4cd5667 Removed some unused fields 2019-02-09 15:57:42 +01:00
Bond_009
3a5bbcf2a8 Style fixes 2019-02-09 15:45:36 +01:00
Bond_009
449074e73f Make more things async 2019-02-09 15:39:17 +01:00
Bond_009
2fc97212a7 Make some methods async 2019-02-09 13:41:09 +01:00
Phallacy
4519ce26e2 Upgrade crypto provider, retarget better framework 2019-01-31 00:24:53 -08:00
Phallacy
49d9649b8e added submodule dir to gitignore 2019-01-30 23:35:17 -08:00
964 changed files with 22312 additions and 49663 deletions

371
.ci/azure-pipelines.yml Normal file
View File

@@ -0,0 +1,371 @@
name: $(Date:yyyyMMdd)$(Rev:.r)
variables:
- name: TestProjects
value: 'tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj'
- name: RestoreBuildProjects
value: 'Jellyfin.Server/Jellyfin.Server.csproj'
pr:
autoCancel: true
trigger:
batch: true
jobs:
- job: main_build
displayName: Main Build
pool:
vmImage: ubuntu-latest
strategy:
matrix:
release:
BuildConfiguration: Release
debug:
BuildConfiguration: Debug
maxParallel: 2
steps:
- checkout: self
clean: true
submodules: true
persistCredentials: true
- task: CmdLine@2
displayName: "Check out web"
condition: and(succeeded(), or(contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
script: 'git clone --single-branch --branch $(Build.SourceBranchName) --depth=1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web'
- task: CmdLine@2
displayName: "Check out web (PR)"
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest'))
inputs:
script: 'git clone --single-branch --branch $(System.PullRequest.TargetBranch) --depth 1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web'
- task: NodeTool@0
displayName: 'Install Node.js'
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
versionSpec: '10.x'
- task: CmdLine@2
displayName: "Build Web UI"
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
script: yarn install
workingDirectory: $(Agent.TempDirectory)/jellyfin-web
- task: CopyFiles@2
displayName: Copy the web UI
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
sourceFolder: $(Agent.TempDirectory)/jellyfin-web/dist # Optional
contents: '**'
targetFolder: $(Build.SourcesDirectory)/MediaBrowser.WebDashboard/jellyfin-web
cleanTargetFolder: true # Optional
overWrite: true # Optional
flattenFolders: false # Optional
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: false
projects: '$(RestoreBuildProjects)'
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
zipAfterPublish: false
- task: PublishPipelineArtifact@0
displayName: 'Publish Artifact Naming'
condition: and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
inputs:
targetPath: '$(build.artifactstagingdirectory)/Jellyfin.Server/Emby.Naming.dll'
artifactName: 'Jellyfin.Naming'
- task: PublishPipelineArtifact@0
displayName: 'Publish Artifact Controller'
condition: and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
inputs:
targetPath: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Controller.dll'
artifactName: 'Jellyfin.Controller'
- task: PublishPipelineArtifact@0
displayName: 'Publish Artifact Model'
condition: and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
inputs:
targetPath: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Model.dll'
artifactName: 'Jellyfin.Model'
- task: PublishPipelineArtifact@0
displayName: 'Publish Artifact Common'
condition: and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
inputs:
targetPath: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Common.dll'
artifactName: 'Jellyfin.Common'
- job: main_test
displayName: Main Test
pool:
vmImage: windows-latest
steps:
- checkout: self
clean: true
submodules: true
persistCredentials: false
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
publishWebProjects: false
projects: '$(TestProjects)'
arguments: '--configuration $(BuildConfiguration)'
zipAfterPublish: false
- task: VisualStudioTestPlatformInstaller@1
inputs:
packageFeedSelector: 'nugetOrg' # Options: nugetOrg, customFeed, netShare
versionSelector: 'latestPreRelease' # Required when packageFeedSelector == NugetOrg || PackageFeedSelector == CustomFeed# Options: latestPreRelease, latestStable, specificVersion
- task: VSTest@2
inputs:
testSelector: 'testAssemblies' # Options: testAssemblies, testPlan, testRun
testAssemblyVer2: | # Required when testSelector == TestAssemblies
**\bin\$(BuildConfiguration)\**\*test*.dll
!**\obj\**
!**\xunit.runner.visualstudio.testadapter.dll
!**\xunit.runner.visualstudio.dotnetcore.testadapter.dll
#testPlan: # Required when testSelector == TestPlan
#testSuite: # Required when testSelector == TestPlan
#testConfiguration: # Required when testSelector == TestPlan
#tcmTestRun: '$(test.RunId)' # Optional
searchFolder: '$(System.DefaultWorkingDirectory)'
#testFiltercriteria: # Optional
#runOnlyImpactedTests: False # Optional
#runAllTestsAfterXBuilds: '50' # Optional
#uiTests: false # Optional
#vstestLocationMethod: 'version' # Optional. Options: version, location
#vsTestVersion: 'latest' # Optional. Options: latest, 16.0, 15.0, 14.0, toolsInstaller
#vstestLocation: # Optional
#runSettingsFile: # Optional
#overrideTestrunParameters: # Optional
#pathtoCustomTestAdapters: # Optional
runInParallel: True # Optional
runTestsInIsolation: True # Optional
codeCoverageEnabled: True # Optional
#otherConsoleOptions: # Optional
#distributionBatchType: 'basedOnTestCases' # Optional. Options: basedOnTestCases, basedOnExecutionTime, basedOnAssembly
#batchingBasedOnAgentsOption: 'autoBatchSize' # Optional. Options: autoBatchSize, customBatchSize
#customBatchSizeValue: '10' # Required when distributionBatchType == BasedOnTestCases && BatchingBasedOnAgentsOption == CustomBatchSize
#batchingBasedOnExecutionTimeOption: 'autoBatchSize' # Optional. Options: autoBatchSize, customTimeBatchSize
#customRunTimePerBatchValue: '60' # Required when distributionBatchType == BasedOnExecutionTime && BatchingBasedOnExecutionTimeOption == CustomTimeBatchSize
#dontDistribute: False # Optional
#testRunTitle: # Optional
#platform: # Optional
configuration: 'Debug' # Optional
publishRunAttachments: true # Optional
#diagnosticsEnabled: false # Optional
#collectDumpOn: 'onAbortOnly' # Optional. Options: onAbortOnly, always, never
#rerunFailedTests: False # Optional
#rerunType: 'basedOnTestFailurePercentage' # Optional. Options: basedOnTestFailurePercentage, basedOnTestFailureCount
#rerunFailedThreshold: '30' # Optional
#rerunFailedTestCasesMaxLimit: '5' # Optional
#rerunMaxAttempts: '3' # Optional
# - task: PublishTestResults@2
# inputs:
# testResultsFormat: 'VSTest' # Options: JUnit, NUnit, VSTest, xUnit, cTest
# testResultsFiles: '**/*.trx'
# #searchFolder: '$(System.DefaultWorkingDirectory)' # Optional
# mergeTestResults: true # Optional
# #failTaskOnFailedTests: false # Optional
# #testRunTitle: # Optional
# #buildPlatform: # Optional
# #buildConfiguration: # Optional
# #publishRunAttachments: true # Optional
- job: main_build_win
displayName: Main Build Windows
pool:
vmImage: windows-latest
strategy:
matrix:
release:
BuildConfiguration: Release
maxParallel: 2
steps:
- checkout: self
clean: true
submodules: true
persistCredentials: true
- task: CmdLine@2
displayName: "Check out web"
condition: and(succeeded(), or(contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
script: 'git clone --single-branch --branch $(Build.SourceBranchName) --depth=1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web'
- task: CmdLine@2
displayName: "Check out web (PR)"
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest'))
inputs:
script: 'git clone --single-branch --branch $(System.PullRequest.TargetBranch) --depth 1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web'
- task: NodeTool@0
displayName: 'Install Node.js'
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
versionSpec: '10.x'
- task: CmdLine@2
displayName: "Build Web UI"
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
script: yarn install
workingDirectory: $(Agent.TempDirectory)/jellyfin-web
- task: CopyFiles@2
displayName: Copy the web UI
condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion'))
inputs:
sourceFolder: $(Agent.TempDirectory)/jellyfin-web/dist # Optional
contents: '**'
targetFolder: $(Build.SourcesDirectory)/MediaBrowser.WebDashboard/jellyfin-web
cleanTargetFolder: true # Optional
overWrite: true # Optional
flattenFolders: false # Optional
- task: CmdLine@2
displayName: Clone the UX repository
inputs:
script: git clone --depth=1 https://github.com/jellyfin/jellyfin-ux $(Agent.TempDirectory)\jellyfin-ux
- task: PowerShell@2
displayName: Build the NSIS Installer
inputs:
targetType: 'filePath' # Optional. Options: filePath, inline
filePath: ./deployment/windows/build-jellyfin.ps1 # Required when targetType == FilePath
arguments: -InstallFFMPEG -InstallNSSM -MakeNSIS -UXLocation $(Agent.TempDirectory)\jellyfin-ux -InstallLocation $(build.artifactstagingdirectory)
#script: '# Write your PowerShell commands here.Write-Host Hello World' # Required when targetType == Inline
errorActionPreference: 'stop' # Optional. Options: stop, continue, silentlyContinue
#failOnStderr: false # Optional
#ignoreLASTEXITCODE: false # Optional
#pwsh: false # Optional
workingDirectory: $(Build.SourcesDirectory) # Optional
- task: CopyFiles@2
displayName: Copy the NSIS Installer to the artifact directory
inputs:
sourceFolder: $(Build.SourcesDirectory)/deployment/windows/ # Optional
contents: 'jellyfin*.exe'
targetFolder: $(System.ArtifactsDirectory)/setup
cleanTargetFolder: true # Optional
overWrite: true # Optional
flattenFolders: true # Optional
- task: PublishPipelineArtifact@0
displayName: 'Publish Setup Artifact'
condition: and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
inputs:
targetPath: '$(build.artifactstagingdirectory)/setup'
artifactName: 'Jellyfin Server Setup'
- job: dotnet_compat
displayName: Compatibility Check
pool:
vmImage: ubuntu-latest
dependsOn: main_build
condition: and(succeeded(), variables['System.PullRequest.PullRequestNumber']) # Only execute if the pullrequest numer is defined. (So not for normal CI builds)
strategy:
matrix:
Naming:
NugetPackageName: Jellyfin.Naming
AssemblyFileName: Emby.Naming.dll
Controller:
NugetPackageName: Jellyfin.Controller
AssemblyFileName: MediaBrowser.Controller.dll
Model:
NugetPackageName: Jellyfin.Model
AssemblyFileName: MediaBrowser.Model.dll
Common:
NugetPackageName: Jellyfin.Common
AssemblyFileName: MediaBrowser.Common.dll
maxParallel: 2
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
displayName: Download the New Assembly Build Artifact
inputs:
source: 'current' # Options: current, specific
#preferTriggeringPipeline: false # Optional
#tags: # Optional
artifact: '$(NugetPackageName)' # Optional
#patterns: '**' # Optional
path: '$(System.ArtifactsDirectory)/new-artifacts'
#project: # Required when source == Specific
#pipeline: # Required when source == Specific
runVersion: 'latest' # Required when source == Specific. Options: latest, latestFromBranch, specific
#runBranch: 'refs/heads/master' # Required when source == Specific && runVersion == LatestFromBranch
#runId: # Required when source == Specific && runVersion == Specific
- task: CopyFiles@2
displayName: Copy New Assembly to new-release folder
inputs:
sourceFolder: $(System.ArtifactsDirectory)/new-artifacts # Optional
contents: '**/*.dll'
targetFolder: $(System.ArtifactsDirectory)/new-release
cleanTargetFolder: true # Optional
overWrite: true # Optional
flattenFolders: true # Optional
- task: DownloadPipelineArtifact@2
displayName: Download the Reference Assembly Build Artifact
inputs:
source: 'specific' # Options: current, specific
#preferTriggeringPipeline: false # Optional
#tags: # Optional
artifact: '$(NugetPackageName)' # Optional
#patterns: '**' # Optional
path: '$(System.ArtifactsDirectory)/current-artifacts'
project: '$(System.TeamProjectId)' # Required when source == Specific
pipeline: '$(System.DefinitionId)' # Required when source == Specific
runVersion: 'latestFromBranch' # Required when source == Specific. Options: latest, latestFromBranch, specific
runBranch: 'refs/heads/$(System.PullRequest.TargetBranch)' # Required when source == Specific && runVersion == LatestFromBranch
#runId: # Required when source == Specific && runVersion == Specific
- task: CopyFiles@2
displayName: Copy Reference Assembly to current-release folder
inputs:
sourceFolder: $(System.ArtifactsDirectory)/current-artifacts # Optional
contents: '**/*.dll'
targetFolder: $(System.ArtifactsDirectory)/current-release
cleanTargetFolder: true # Optional
overWrite: true # Optional
flattenFolders: true # Optional
- task: DownloadGitHubRelease@0
displayName: Download ABI compatibility check tool from GitHub
inputs:
connection: Jellyfin Release Download
userRepository: EraYaN/dotnet-compatibility
defaultVersionType: 'latest' # Options: latest, specificVersion, specificTag
#version: # Required when defaultVersionType != Latest
itemPattern: '**-ci.zip' # Optional
downloadPath: '$(System.ArtifactsDirectory)'
- task: ExtractFiles@1
displayName: Extract ABI compatibility check tool
inputs:
archiveFilePatterns: '$(System.ArtifactsDirectory)/*-ci.zip'
destinationFolder: $(System.ArtifactsDirectory)/tools
cleanDestinationFolder: true
- task: CmdLine@2
displayName: Execute ABI compatibility check tool
inputs:
script: 'dotnet tools/CompatibilityCheckerCoreCLI.dll current-release/$(AssemblyFileName) new-release/$(AssemblyFileName) --azure-pipelines'
workingDirectory: $(System.ArtifactsDirectory) # Optional
#failOnStderr: false # Optional

46
.ci/publish-nightly.yml Normal file
View File

@@ -0,0 +1,46 @@
name: Nightly-$(date:yyyyMMdd).$(rev:r)
variables:
- name: Version
value: '1.0.0'
trigger: none
pr: none
jobs:
- job: publish_artifacts_nightly
displayName: Publish Artifacts Nightly
pool:
vmImage: ubuntu-latest
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
displayName: Download the Windows Setup Artifact
inputs:
source: 'specific' # Options: current, specific
artifact: 'Jellyfin Server Setup' # Optional
path: '$(System.ArtifactsDirectory)/win-installer'
project: '$(System.TeamProjectId)' # Required when source == Specific
pipelineId: 1 # Required when source == Specific
runVersion: 'latestFromBranch' # Required when source == Specific. Options: latest, latestFromBranch, specific
runBranch: 'refs/heads/master' # Required when source == Specific && runVersion == LatestFromBranch
- task: SSH@0
displayName: 'Create Drop directory'
inputs:
sshEndpoint: 'Jellyfin Build Server'
commands: 'mkdir -p /srv/incoming/jellyfin_$(Version)/win-installer && ln -s /srv/incoming/jellyfin_$(Version) /srv/incoming/jellyfin_nightly_azure_upload'
- task: CopyFilesOverSSH@0
displayName: 'Copy the Windows Setup to the Repo'
inputs:
sshEndpoint: 'Jellyfin Build Server'
sourceFolder: '$(System.ArtifactsDirectory)/win-installer'
contents: 'jellyfin_*.exe'
targetFolder: '/srv/incoming/jellyfin_nightly_azure_upload/win-installer'
- task: SSH@0
displayName: 'Clean up SCP symlink'
inputs:
sshEndpoint: 'Jellyfin Build Server'
commands: 'rm -f /srv/incoming/jellyfin_nightly_azure_upload'

48
.ci/publish-release.yml Normal file
View File

@@ -0,0 +1,48 @@
name: Release-$(Version)-$(date:yyyyMMdd).$(rev:r)
variables:
- name: Version
value: '1.0.0'
- name: UsedRunId
value: 0
trigger: none
pr: none
jobs:
- job: publish_artifacts_release
displayName: Publish Artifacts Release
pool:
vmImage: ubuntu-latest
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
displayName: Download the Windows Setup Artifact
inputs:
source: 'specific' # Options: current, specific
artifact: 'Jellyfin Server Setup' # Optional
path: '$(System.ArtifactsDirectory)/win-installer'
project: '$(System.TeamProjectId)' # Required when source == Specific
pipelineId: 1 # Required when source == Specific
runVersion: 'specific' # Required when source == Specific. Options: latest, latestFromBranch, specific
runId: $(UsedRunId)
- task: SSH@0
displayName: 'Create Drop directory'
inputs:
sshEndpoint: 'Jellyfin Build Server'
commands: 'mkdir -p /srv/incoming/jellyfin_$(Version)/win-installer && ln -s /srv/incoming/jellyfin_$(Version) /srv/incoming/jellyfin_release_azure_upload'
- task: CopyFilesOverSSH@0
displayName: 'Copy the Windows Setup to the Repo'
inputs:
sshEndpoint: 'Jellyfin Build Server'
sourceFolder: '$(System.ArtifactsDirectory)/win-installer'
contents: 'jellyfin_*.exe'
targetFolder: '/srv/incoming/jellyfin_release_azure_upload/win-installer'
- task: SSH@0
displayName: 'Clean up SCP symlink'
inputs:
sshEndpoint: 'Jellyfin Build Server'
commands: 'rm -f /srv/incoming/jellyfin_release_azure_upload'

8
.copr/Makefile Normal file
View 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)"

View File

@@ -8,3 +8,4 @@ README.md
deployment/*/dist
deployment/*/pkg-dist
deployment/collect-dist/
ci/

View File

@@ -1,12 +1,30 @@
---
kind: pipeline
name: build
name: build-debug
steps:
- name: submodules
image: docker:git
commands:
- git submodule update --init --recursive
- name: build
image: microsoft/dotnet:2-sdk
commands:
- dotnet publish --configuration release --output /release Jellyfin.Server
- dotnet publish "Jellyfin.Server" --configuration Debug --output "../ci/ci-debug"
---
kind: pipeline
name: build-release
steps:
- name: submodules
image: docker:git
commands:
- git submodule update --init --recursive
- name: build
image: microsoft/dotnet:2-sdk
commands:
- dotnet publish "Jellyfin.Server" --configuration Release --output "../ci/ci-release"

View File

@@ -15,6 +15,10 @@ insert_final_newline = true
end_of_line = lf
max_line_length = null
# YAML indentation
[*.{yml,yaml}]
indent_size = 2
# XML indentation
[*.{csproj,xml}]
indent_size = 2
@@ -55,15 +59,77 @@ 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
# Style Definitions (From Roslyn)
# Non-private static fields are PascalCase
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
# Constants are PascalCase
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
dotnet_naming_symbols.constants.applicable_kinds = field, local
dotnet_naming_symbols.constants.required_modifiers = const
dotnet_naming_style.constant_style.capitalization = pascal_case
# Static fields are camelCase and start with s_
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_style.static_field_style.capitalization = camel_case
dotnet_naming_style.static_field_style.required_prefix = _
# Instance fields are camelCase and start with _
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix = _
# Locals and parameters are camelCase
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
dotnet_naming_style.camel_case_style.capitalization = camel_case
# Local functions are PascalCase
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
dotnet_naming_style.local_function_style.capitalization = pascal_case
# By default, name items with PascalCase
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.all_members.applicable_kinds = *
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
###############################
# C# Coding Conventions #
###############################

2
.gitattributes vendored
View File

@@ -1 +1,3 @@
* text=auto eol=lf
CONTRIBUTORS.md merge=union

View File

@@ -30,6 +30,7 @@ assignees: ''
- OS: [e.g. Docker, Debian, Windows]
- Browser: [e.g. Firefox, Chrome, Safari]
- Jellyfin Version: [e.g. 10.0.1]
- Reverse proxy: [e.g. no, nginx, apache, etc.]
**Additional context**
<!-- Add any other context about the problem here. -->

View File

@@ -1,20 +0,0 @@
---
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. -->

View File

@@ -1,14 +0,0 @@
---
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. -->

View File

@@ -0,0 +1,32 @@
---
name: Media playback issue
about: Create a media playback issue report
title: ''
labels: mediaplayback
assignees: ''
---
**Media Info of the file**
<!-- Use the Media Info tool (set to text format, download here: https://mediaarea.net/en/MediaInfo) or copy the info from the web ui for the file with the playback issue. -->
**Logs**
<!-- Please paste any log message from during the playback issue, for example the ffmpeg command line can be very useful. -->
**Stats for Nerds Screenshots**
<!-- If available, add screenshots of the stats for nerds screen to help show the issue problem. -->
**Server System (please complete the following information):**
- OS: [e.g. Docker on Linux, Docker on Windows, Debian, Windows]
- Jellyfin Version: [e.g. 10.0.1]
- Hardware settings & device: [e.g. NVENC on GTX1060, VAAPI on Intel i7 8700K]
- Reverse proxy: [e.g. no, nginx, apache, etc.]
- Other hardware notes: [e.g. Media mounted in CIFS/SMB share, Media mounted from Google Drive]
**Client System (please complete the following information):**
- Device: [e.g. Apple iPhone XS, Xbox One S, LG OLED55C8, Samsung Galaxy Note9, Custom HTPC]
- OS: [e.g. iOS, Android, Windows, macOS]
- Client: [e.g. Web/Browser, webOS, Android, Android TV, Electron]
- Browser (if Web client): [e.g. Firefox, Chrome, Safari]
- Client and Browser Version: [e.g. 10.3.4 and 68.0]

View File

@@ -1,6 +1,6 @@
<!--
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.
For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation.
-->
**Changes**

22
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 90
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14
# Issues with these labels will never be considered stale
exemptLabels:
- regression
- security
- dotnet-3.0-future
- roadmap
- future
- feature
- enhancement
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
Issues go stale after 90d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 14d of inactivity.
If this issue is safe to close now please do so.
If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

14
.gitignore vendored
View File

@@ -239,11 +239,6 @@ pip-log.txt
##########
.idea/
##########
# Visual Studio Code
##########
.vscode/
#########################
# Build artifacts
#########################
@@ -264,3 +259,12 @@ deployment/**/pkg-dist-tmp/
deployment/collect-dist/
jellyfin_version.ini
ci/
# Doxygen
doc/
# Deployment artifacts
dist
*.exe

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "MediaBrowser.WebDashboard/jellyfin-web"]
path = MediaBrowser.WebDashboard/jellyfin-web
url = https://github.com/jellyfin/jellyfin-web.git

View File

@@ -11,6 +11,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
</Project>

View File

@@ -165,7 +165,7 @@ namespace BDInfo
foreach (var file in files)
{
PlaylistFiles.Add(
file.Name.ToUpper(), new TSPlaylistFile(this, file, _fileSystem));
file.Name.ToUpper(), new TSPlaylistFile(this, file));
}
}
@@ -185,7 +185,7 @@ namespace BDInfo
foreach (var file in files)
{
StreamClipFiles.Add(
file.Name.ToUpper(), new TSStreamClipFile(file, _fileSystem));
file.Name.ToUpper(), new TSStreamClipFile(file));
}
}
@@ -212,7 +212,6 @@ namespace BDInfo
public void Scan()
{
var errorStreamClipFiles = new List<TSStreamClipFile>();
foreach (var streamClipFile in StreamClipFiles.Values)
{
try
@@ -221,7 +220,6 @@ namespace BDInfo
}
catch (Exception ex)
{
errorStreamClipFiles.Add(streamClipFile);
if (StreamClipFileScanError != null)
{
if (StreamClipFileScanError(streamClipFile, ex))
@@ -250,7 +248,6 @@ namespace BDInfo
StreamFiles.Values.CopyTo(streamFiles, 0);
Array.Sort(streamFiles, CompareStreamFiles);
var errorPlaylistFiles = new List<TSPlaylistFile>();
foreach (var playlistFile in PlaylistFiles.Values)
{
try
@@ -259,7 +256,6 @@ namespace BDInfo
}
catch (Exception ex)
{
errorPlaylistFiles.Add(playlistFile);
if (PlaylistFileScanError != null)
{
if (PlaylistFileScanError(playlistFile, ex))
@@ -275,7 +271,6 @@ namespace BDInfo
}
}
var errorStreamFiles = new List<TSStreamFile>();
foreach (var streamFile in streamFiles)
{
try
@@ -296,7 +291,6 @@ namespace BDInfo
}
catch (Exception ex)
{
errorStreamFiles.Add(streamFile);
if (StreamFileScanError != null)
{
if (StreamFileScanError(streamFile, ex))
@@ -431,7 +425,7 @@ namespace BDInfo
{
return 1;
}
else if ((x != null || x.FileInfo != null) && (y == null || y.FileInfo == null))
else if ((x != null && x.FileInfo != null) && (y == null || y.FileInfo == null))
{
return -1;
}
@@ -451,6 +445,5 @@ namespace BDInfo
}
}
}
}
}

View File

@@ -9,8 +9,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[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: AssemblyProduct("Jellyfin Server")]
[assembly: AssemblyCopyright("Copyright © 2016 CinemaSquid. Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]

View File

@@ -28,7 +28,6 @@ namespace BDInfo
{
public class TSPlaylistFile
{
private readonly IFileSystem _fileSystem;
private FileSystemMetadata FileInfo = null;
public string FileType = null;
public bool IsInitialized = false;
@@ -64,21 +63,19 @@ namespace BDInfo
new List<TSGraphicsStream>();
public TSPlaylistFile(BDROM bdrom,
FileSystemMetadata fileInfo, IFileSystem fileSystem)
FileSystemMetadata fileInfo)
{
BDROM = bdrom;
FileInfo = fileInfo;
_fileSystem = fileSystem;
Name = fileInfo.Name.ToUpper();
}
public TSPlaylistFile(BDROM bdrom,
string name,
List<TSStreamClip> clips, IFileSystem fileSystem)
List<TSStreamClip> clips)
{
BDROM = bdrom;
Name = name;
_fileSystem = fileSystem;
IsCustom = true;
foreach (var clip in clips)
{

View File

@@ -28,7 +28,6 @@ namespace BDInfo
{
public class TSStreamClipFile
{
private readonly IFileSystem _fileSystem;
public FileSystemMetadata FileInfo = null;
public string FileType = null;
public bool IsValid = false;
@@ -37,10 +36,9 @@ namespace BDInfo
public Dictionary<ushort, TSStream> Streams =
new Dictionary<ushort, TSStream>();
public TSStreamClipFile(FileSystemMetadata fileInfo, IFileSystem fileSystem)
public TSStreamClipFile(FileSystemMetadata fileInfo)
{
FileInfo = fileInfo;
_fileSystem = fileSystem;
Name = fileInfo.Name.ToUpper();
}

View File

@@ -19,6 +19,17 @@
- [LogicalPhallacy](https://github.com/LogicalPhallacy/)
- [RazeLighter777](https://github.com/RazeLighter777)
- [WillWill56](https://github.com/WillWill56)
- [Liggy](https://github.com/Liggy)
- [fruhnow](https://github.com/fruhnow)
- [Lynxy](https://github.com/Lynxy)
- [fasheng](https://github.com/fasheng)
- [ploughpuff](https://github.com/ploughpuff)
- [pjeanjean](https://github.com/pjeanjean)
- [DrPandemic](https://github.com/drpandemic)
- [joern-h](https://github.com/joern-h)
- [Khinenw](https://github.com/HelloWorld017)
- [fhriley](https://github.com/fhriley)
- [nevado](https://github.com/nevado)
# Emby Contributors

View File

@@ -1,27 +1,42 @@
ARG DOTNET_VERSION=2
ARG DOTNET_VERSION=2.2
ARG FFMPEG_VERSION=latest
FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
FROM node:alpine as web-builder
ARG JELLYFIN_WEB_VERSION=v10.4.0
RUN apk add curl \
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& cd jellyfin-web-* \
&& yarn install \
&& yarn build \
&& mv dist /dist
FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
WORKDIR /repo
COPY . .
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
RUN dotnet publish \
--configuration release \
--output /jellyfin \
Jellyfin.Server
RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-x64 "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
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
FROM jellyfin/ffmpeg:${FFMPEG_VERSION} as ffmpeg
FROM mcr.microsoft.com/dotnet/core/runtime:${DOTNET_VERSION}
COPY --from=ffmpeg / /
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web
# Install dependencies:
# libfontconfig1: needed for Skia
# mesa-va-drivers: needed for VAAPI
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
libfontconfig1 mesa-va-drivers \
&& apt-get clean autoclean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /cache /config /media \
&& chmod 777 /cache /config /media
EXPOSE 8096
VOLUME /cache /config /media
ENTRYPOINT dotnet /jellyfin/jellyfin.dll --datadir /config --cachedir /cache
ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
--datadir /config \
--cachedir /cache \
--ffmpeg /usr/local/bin/ffmpeg

View File

@@ -3,12 +3,17 @@
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 node:alpine as web-builder
ARG JELLYFIN_WEB_VERSION=v10.4.0
RUN apk add curl \
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& cd jellyfin-web-* \
&& yarn install \
&& yarn build \
&& mv dist /dist
FROM microsoft/dotnet:${DOTNET_VERSION}-sdk-stretch as builder
FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
WORKDIR /repo
COPY . .
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
@@ -17,20 +22,23 @@ 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 dotnet publish \
-r linux-arm \
--configuration release \
--output /jellyfin \
Jellyfin.Server
RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-arm "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm32v7
COPY --from=qemu_extract qemu-arm-static /usr/bin
FROM multiarch/qemu-user-static:x86_64-arm as qemu
FROM mcr.microsoft.com/dotnet/core/runtime:${DOTNET_VERSION}-stretch-slim-arm32v7
COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /cache /config /media \
&& chmod 777 /cache /config /media
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web
EXPOSE 8096
VOLUME /cache /config /media
ENTRYPOINT dotnet /jellyfin/jellyfin.dll --datadir /config --cachedir /cache
ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
--datadir /config \
--cachedir /cache \
--ffmpeg /usr/bin/ffmpeg

View File

@@ -3,13 +3,17 @@
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 node:alpine as web-builder
ARG JELLYFIN_WEB_VERSION=v10.4.0
RUN apk add curl \
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& cd jellyfin-web-* \
&& yarn install \
&& yarn build \
&& mv dist /dist
FROM microsoft/dotnet:${DOTNET_VERSION}-sdk-stretch as builder
FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
WORKDIR /repo
COPY . .
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
@@ -18,20 +22,23 @@ 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 dotnet publish \
-r linux-arm64 \
--configuration release \
--output /jellyfin \
Jellyfin.Server
RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-arm64 "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8
COPY --from=qemu_extract qemu-aarch64-static /usr/bin
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
FROM mcr.microsoft.com/dotnet/core/runtime:${DOTNET_VERSION}-stretch-slim-arm64v8
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /cache /config /media \
&& chmod 777 /cache /config /media
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web
EXPOSE 8096
VOLUME /cache /config /media
ENTRYPOINT dotnet /jellyfin/jellyfin.dll --datadir /config --cachedir /cache
ENTRYPOINT dotnet /jellyfin/jellyfin.dll \
--datadir /config \
--cachedir /cache \
--ffmpeg /usr/bin/ffmpeg

2565
Doxyfile Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
</Project>

View File

@@ -1,36 +0,0 @@
namespace DvdLib.Ifo
{
public enum AudioCodec
{
AC3 = 0,
MPEG1 = 2,
MPEG2ext = 3,
LPCM = 4,
DTS = 6,
}
public enum ApplicationMode
{
Unspecified = 0,
Karaoke = 1,
Surround = 2,
}
public class AudioAttributes
{
public readonly AudioCodec Codec;
public readonly bool MultichannelExtensionPresent;
public readonly ApplicationMode Mode;
public readonly byte QuantDRC;
public readonly byte SampleRate;
public readonly byte Channels;
public readonly ushort LanguageCode;
public readonly byte LanguageExtension;
public readonly byte CodeExtension;
}
public class MultiChannelExtension
{
}
}

View File

@@ -26,17 +26,17 @@ namespace DvdLib.Ifo
if (vmgPath == null)
{
var allIfos = allFiles.Where(i => string.Equals(i.Extension, ".ifo", StringComparison.OrdinalIgnoreCase));
foreach (var ifo in allIfos)
foreach (var ifo in allFiles)
{
var num = ifo.Name.Split('_').ElementAtOrDefault(1);
var numbersRead = new List<ushort>();
if (!string.Equals(ifo.Extension, ".ifo", StringComparison.OrdinalIgnoreCase))
{
continue;
}
if (!string.IsNullOrEmpty(num) && ushort.TryParse(num, out var ifoNumber) && !numbersRead.Contains(ifoNumber))
var nums = ifo.Name.Split(new [] { '_' }, StringSplitOptions.RemoveEmptyEntries);
if (nums.Length >= 2 && ushort.TryParse(nums[1], out var ifoNumber))
{
ReadVTS(ifoNumber, ifo.FullName);
numbersRead.Add(ifoNumber);
}
}
}
@@ -76,7 +76,7 @@ namespace DvdLib.Ifo
}
}
private void ReadVTS(ushort vtsNum, List<FileSystemMetadata> allFiles)
private void ReadVTS(ushort vtsNum, IEnumerable<FileSystemMetadata> allFiles)
{
var filename = string.Format("VTS_{0:00}_0.IFO", vtsNum);

View File

@@ -1,17 +0,0 @@
using System.Collections.Generic;
namespace DvdLib.Ifo
{
public class ProgramChainCommandTable
{
public readonly ushort LastByteAddress;
public readonly List<VirtualMachineCommand> PreCommands;
public readonly List<VirtualMachineCommand> PostCommands;
public readonly List<VirtualMachineCommand> CellCommands;
}
public class VirtualMachineCommand
{
public readonly byte[] Command;
}
}

View File

@@ -25,13 +25,10 @@ namespace DvdLib.Ifo
public byte[] SubpictureStreamControl { get; private set; } // 32*4 entries
private ushort _nextProgramNumber;
public readonly ProgramChain Next;
private ushort _prevProgramNumber;
public readonly ProgramChain Previous;
private ushort _goupProgramNumber;
public readonly ProgramChain Goup; // ?? maybe Group
public ProgramPlaybackMode PlaybackMode { get; private set; }
public uint ProgramCount { get; private set; }
@@ -40,7 +37,6 @@ namespace DvdLib.Ifo
public byte[] Palette { get; private set; } // 16*4 entries
private ushort _commandTableOffset;
public readonly ProgramChainCommandTable CommandTable;
private ushort _programMapOffset;
private ushort _cellPlaybackOffset;

View File

@@ -1,46 +0,0 @@
namespace DvdLib.Ifo
{
public enum VideoCodec
{
MPEG1 = 0,
MPEG2 = 1,
}
public enum VideoFormat
{
NTSC = 0,
PAL = 1,
}
public enum AspectRatio
{
ar4to3 = 0,
ar16to9 = 3
}
public enum FilmMode
{
None = -1,
Camera = 0,
Film = 1,
}
public class VideoAttributes
{
public readonly VideoCodec Codec;
public readonly VideoFormat Format;
public readonly AspectRatio Aspect;
public readonly bool AutomaticPanScan;
public readonly bool AutomaticLetterBox;
public readonly bool Line21CCField1;
public readonly bool Line21CCField2;
public readonly int Width;
public readonly int Height;
public readonly bool Letterboxed;
public readonly FilmMode FilmMode;
public VideoAttributes()
{
}
}
}

View File

@@ -9,8 +9,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[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: AssemblyProduct("Jellyfin Server")]
[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]

View File

@@ -136,7 +136,7 @@ namespace Emby.Dlna.Api
{
var url = Request.AbsoluteUri;
var serverAddress = url.Substring(0, url.IndexOf("/dlna/", StringComparison.OrdinalIgnoreCase));
var xml = _dlnaManager.GetServerDescriptionXml(Request.Headers.ToDictionary(), request.UuId, serverAddress);
var xml = _dlnaManager.GetServerDescriptionXml(Request.Headers, request.UuId, serverAddress);
var cacheLength = TimeSpan.FromDays(1);
var cacheKey = Request.RawUrl.GetMD5();
@@ -147,21 +147,21 @@ namespace Emby.Dlna.Api
public object Get(GetContentDirectory request)
{
var xml = ContentDirectory.GetServiceXml(Request.Headers.ToDictionary());
var xml = ContentDirectory.GetServiceXml();
return _resultFactory.GetResult(Request, xml, XMLContentType);
}
public object Get(GetMediaReceiverRegistrar request)
{
var xml = MediaReceiverRegistrar.GetServiceXml(Request.Headers.ToDictionary());
var xml = MediaReceiverRegistrar.GetServiceXml();
return _resultFactory.GetResult(Request, xml, XMLContentType);
}
public object Get(GetConnnectionManager request)
{
var xml = ConnectionManager.GetServiceXml(Request.Headers.ToDictionary());
var xml = ConnectionManager.GetServiceXml();
return _resultFactory.GetResult(Request, xml, XMLContentType);
}
@@ -193,7 +193,7 @@ namespace Emby.Dlna.Api
return service.ProcessControlRequest(new ControlRequest
{
Headers = Request.Headers.ToDictionary(),
Headers = Request.Headers,
InputXml = requestStream,
TargetServerUuId = id,
RequestedUrl = Request.AbsoluteUri

View File

@@ -7,6 +7,7 @@ namespace Emby.Dlna.Configuration
public bool EnableServer { get; set; }
public bool EnableDebugLog { get; set; }
public bool BlastAliveMessages { get; set; }
public bool SendOnlyMatchedHost { get; set; }
public int ClientDiscoveryIntervalSeconds { get; set; }
public int BlastAliveMessageIntervalSeconds { get; set; }
public string DefaultUserId { get; set; }
@@ -16,6 +17,7 @@ namespace Emby.Dlna.Configuration
EnablePlayTo = true;
EnableServer = true;
BlastAliveMessages = true;
SendOnlyMatchedHost = true;
ClientDiscoveryIntervalSeconds = 60;
BlastAliveMessageIntervalSeconds = 1800;
}

View File

@@ -1,9 +1,7 @@
using System.Collections.Generic;
using Emby.Dlna.Service;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Dlna;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace Emby.Dlna.ConnectionManager
@@ -13,18 +11,16 @@ namespace Emby.Dlna.ConnectionManager
private readonly IDlnaManager _dlna;
private readonly ILogger _logger;
private readonly IServerConfigurationManager _config;
protected readonly IXmlReaderSettingsFactory XmlReaderSettingsFactory;
public ConnectionManager(IDlnaManager dlna, IServerConfigurationManager config, ILogger logger, IHttpClient httpClient, IXmlReaderSettingsFactory xmlReaderSettingsFactory)
public ConnectionManager(IDlnaManager dlna, IServerConfigurationManager config, ILogger logger, IHttpClient httpClient)
: base(logger, httpClient)
{
_dlna = dlna;
_config = config;
_logger = logger;
XmlReaderSettingsFactory = xmlReaderSettingsFactory;
}
public string GetServiceXml(IDictionary<string, string> headers)
public string GetServiceXml()
{
return new ConnectionManagerXmlBuilder().GetXml();
}
@@ -34,7 +30,7 @@ namespace Emby.Dlna.ConnectionManager
var profile = _dlna.GetProfile(request.Headers) ??
_dlna.GetDefaultProfile();
return new ControlHandler(_config, _logger, XmlReaderSettingsFactory, profile).ProcessControlRequest(request);
return new ControlHandler(_config, _logger, profile).ProcessControlRequest(request);
}
}
}

View File

@@ -4,7 +4,6 @@ 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
@@ -32,7 +31,8 @@ namespace Emby.Dlna.ConnectionManager
};
}
public ControlHandler(IServerConfigurationManager config, ILogger logger, IXmlReaderSettingsFactory xmlReaderSettingsFactory, DeviceProfile profile) : base(config, logger, xmlReaderSettingsFactory)
public ControlHandler(IServerConfigurationManager config, ILogger logger, DeviceProfile profile)
: base(config, logger)
{
_profile = profile;
}

View File

@@ -11,7 +11,6 @@ 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
@@ -28,7 +27,6 @@ namespace Emby.Dlna.ContentDirectory
private readonly IMediaSourceManager _mediaSourceManager;
private readonly IUserViewManager _userViewManager;
private readonly IMediaEncoder _mediaEncoder;
protected readonly IXmlReaderSettingsFactory XmlReaderSettingsFactory;
private readonly ITVSeriesManager _tvSeriesManager;
public ContentDirectory(IDlnaManager dlna,
@@ -38,7 +36,12 @@ namespace Emby.Dlna.ContentDirectory
IServerConfigurationManager config,
IUserManager userManager,
ILogger logger,
IHttpClient httpClient, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, IUserViewManager userViewManager, IMediaEncoder mediaEncoder, IXmlReaderSettingsFactory xmlReaderSettingsFactory, ITVSeriesManager tvSeriesManager)
IHttpClient httpClient,
ILocalizationManager localization,
IMediaSourceManager mediaSourceManager,
IUserViewManager userViewManager,
IMediaEncoder mediaEncoder,
ITVSeriesManager tvSeriesManager)
: base(logger, httpClient)
{
_dlna = dlna;
@@ -51,7 +54,6 @@ namespace Emby.Dlna.ContentDirectory
_mediaSourceManager = mediaSourceManager;
_userViewManager = userViewManager;
_mediaEncoder = mediaEncoder;
XmlReaderSettingsFactory = xmlReaderSettingsFactory;
_tvSeriesManager = tvSeriesManager;
}
@@ -65,7 +67,7 @@ namespace Emby.Dlna.ContentDirectory
}
}
public string GetServiceXml(IDictionary<string, string> headers)
public string GetServiceXml()
{
return new ContentDirectoryXmlBuilder().GetXml();
}
@@ -94,7 +96,6 @@ namespace Emby.Dlna.ContentDirectory
_mediaSourceManager,
_userViewManager,
_mediaEncoder,
XmlReaderSettingsFactory,
_tvSeriesManager)
.ProcessControlRequest(request);
}

View File

@@ -25,7 +25,6 @@ using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace Emby.Dlna.ContentDirectory
@@ -51,8 +50,22 @@ namespace Emby.Dlna.ContentDirectory
private readonly DeviceProfile _profile;
public ControlHandler(ILogger logger, ILibraryManager libraryManager, DeviceProfile profile, string serverAddress, string accessToken, IImageProcessor imageProcessor, IUserDataManager userDataManager, User user, int systemUpdateId, IServerConfigurationManager config, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, IUserViewManager userViewManager, IMediaEncoder mediaEncoder, IXmlReaderSettingsFactory xmlReaderSettingsFactory, ITVSeriesManager tvSeriesManager)
: base(config, logger, xmlReaderSettingsFactory)
public ControlHandler(
ILogger logger,
ILibraryManager libraryManager,
DeviceProfile profile,
string serverAddress,
string accessToken,
IImageProcessor imageProcessor,
IUserDataManager userDataManager,
User user, int systemUpdateId,
IServerConfigurationManager config,
ILocalizationManager localization,
IMediaSourceManager mediaSourceManager,
IUserViewManager userViewManager,
IMediaEncoder mediaEncoder,
ITVSeriesManager tvSeriesManager)
: base(config, logger)
{
_libraryManager = libraryManager;
_userDataManager = userDataManager;
@@ -260,7 +273,7 @@ namespace Emby.Dlna.ContentDirectory
if (item.IsDisplayedAsFolder || serverItem.StubType.HasValue)
{
var childrenResult = (GetUserItems(item, serverItem.StubType, user, sortCriteria, start, requestedCount));
var childrenResult = GetUserItems(item, serverItem.StubType, user, sortCriteria, start, requestedCount);
_didlBuilder.WriteFolderElement(writer, item, serverItem.StubType, null, childrenResult.TotalRecordCount, filter, id);
}
@@ -273,10 +286,10 @@ namespace Emby.Dlna.ContentDirectory
}
else
{
var childrenResult = (GetUserItems(item, serverItem.StubType, user, sortCriteria, start, requestedCount));
var childrenResult = GetUserItems(item, serverItem.StubType, user, sortCriteria, start, requestedCount);
totalCount = childrenResult.TotalRecordCount;
provided = childrenResult.Items.Length;
provided = childrenResult.Items.Count;
foreach (var i in childrenResult.Items)
{
@@ -296,6 +309,7 @@ namespace Emby.Dlna.ContentDirectory
}
}
}
writer.WriteFullEndElement();
//writer.WriteEndDocument();
}
@@ -373,7 +387,7 @@ namespace Emby.Dlna.ContentDirectory
totalCount = childrenResult.TotalRecordCount;
provided = childrenResult.Items.Length;
provided = childrenResult.Items.Count;
var dlnaOptions = _config.GetDlnaConfiguration();
@@ -664,7 +678,7 @@ namespace Emby.Dlna.ContentDirectory
return new QueryResult<ServerItem>
{
Items = list.ToArray(),
Items = list,
TotalRecordCount = list.Count
};
}
@@ -742,7 +756,7 @@ namespace Emby.Dlna.ContentDirectory
return new QueryResult<ServerItem>
{
Items = list.ToArray(),
Items = list,
TotalRecordCount = list.Count
};
}
@@ -847,7 +861,7 @@ namespace Emby.Dlna.ContentDirectory
return new QueryResult<ServerItem>
{
Items = list.ToArray(),
Items = list,
TotalRecordCount = list.Count
};
}

View File

@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.IO;
using Microsoft.AspNetCore.Http;
namespace Emby.Dlna
{
public class ControlRequest
{
public IDictionary<string, string> Headers { get; set; }
public IHeaderDictionary Headers { get; set; }
public Stream InputXml { get; set; }
@@ -15,7 +15,7 @@ namespace Emby.Dlna
public ControlRequest()
{
Headers = new Dictionary<string, string>();
Headers = new HeaderDictionary();
}
}
}

View File

@@ -158,7 +158,7 @@ namespace Emby.Dlna.Didl
AddGeneralProperties(item, null, context, writer, filter);
AddSamsungBookmarkInfo(item, user, writer);
AddSamsungBookmarkInfo(item, user, writer, streamInfo);
// refID?
// storeAttribute(itemNode, object, ClassProperties.REF_ID, false);
@@ -181,19 +181,6 @@ namespace Emby.Dlna.Didl
writer.WriteFullEndElement();
}
private string GetMimeType(string input)
{
var mime = MimeTypes.GetMimeType(input);
// TODO: Instead of being hard-coded here, this should probably be moved into all of the existing profiles
if (string.Equals(mime, "video/mp2t", StringComparison.OrdinalIgnoreCase))
{
mime = "video/mpeg";
}
return mime;
}
private void AddVideoResource(DlnaOptions options, XmlWriter writer, BaseItem video, string deviceId, Filter filter, StreamInfo streamInfo = null)
{
if (streamInfo == null)
@@ -384,7 +371,7 @@ namespace Emby.Dlna.Didl
var filename = url.Substring(0, url.IndexOf('?'));
var mimeType = mediaProfile == null || string.IsNullOrEmpty(mediaProfile.MimeType)
? GetMimeType(filename)
? MimeTypes.GetMimeType(filename)
: mediaProfile.MimeType;
writer.WriteAttributeString("protocolInfo", string.Format(
@@ -520,7 +507,7 @@ namespace Emby.Dlna.Didl
var filename = url.Substring(0, url.IndexOf('?'));
var mimeType = mediaProfile == null || string.IsNullOrEmpty(mediaProfile.MimeType)
? GetMimeType(filename)
? MimeTypes.GetMimeType(filename)
: mediaProfile.MimeType;
var contentFeatures = new ContentFeatureBuilder(_profile).BuildAudioHeader(streamInfo.Container,
@@ -545,17 +532,10 @@ namespace Emby.Dlna.Didl
}
public static bool IsIdRoot(string id)
{
if (string.IsNullOrWhiteSpace(id)
=> string.IsNullOrWhiteSpace(id)
|| string.Equals(id, "0", StringComparison.OrdinalIgnoreCase)
// Samsung sometimes uses 1 as root
|| string.Equals(id, "1", StringComparison.OrdinalIgnoreCase))
{
return true;
}
return false;
}
|| string.Equals(id, "1", StringComparison.OrdinalIgnoreCase);
public void WriteFolderElement(XmlWriter writer, BaseItem folder, StubType? stubType, BaseItem context, int childCount, Filter filter, string requestedId = null)
{
@@ -601,7 +581,7 @@ namespace Emby.Dlna.Didl
writer.WriteFullEndElement();
}
private void AddSamsungBookmarkInfo(BaseItem item, User user, XmlWriter writer)
private void AddSamsungBookmarkInfo(BaseItem item, User user, XmlWriter writer, StreamInfo streamInfo)
{
if (!item.SupportsPositionTicksResume || item is Folder)
{
@@ -625,10 +605,11 @@ namespace Emby.Dlna.Didl
}
var userdata = _userDataManager.GetUserData(user, item);
var playbackPositionTicks = (streamInfo != null && streamInfo.StartPositionTicks > 0) ? streamInfo.StartPositionTicks : userdata.PlaybackPositionTicks;
if (userdata.PlaybackPositionTicks > 0)
if (playbackPositionTicks > 0)
{
var elementValue = string.Format("BM={0}", Convert.ToInt32(TimeSpan.FromTicks(userdata.PlaybackPositionTicks).TotalSeconds).ToString(_usCulture));
var elementValue = string.Format("BM={0}", Convert.ToInt32(TimeSpan.FromTicks(playbackPositionTicks).TotalSeconds).ToString(_usCulture));
AddValue(writer, "sec", "dcmInfo", elementValue, secAttribute.Value);
}
}
@@ -818,10 +799,9 @@ namespace Emby.Dlna.Didl
{
AddCommonFields(item, itemStubType, context, writer, filter);
var hasArtists = item as IHasArtist;
var hasAlbumArtists = item as IHasAlbumArtist;
if (hasArtists != null)
if (item is IHasArtist hasArtists)
{
foreach (var artist in hasArtists.Artists)
{
@@ -921,8 +901,6 @@ namespace Emby.Dlna.Didl
}
}
AddImageResElement(item, writer, 160, 160, "jpg", "JPEG_TN");
if (!_profile.EnableSingleAlbumArtLimit || string.Equals(item.MediaType, MediaType.Photo, StringComparison.OrdinalIgnoreCase))
{
AddImageResElement(item, writer, 4096, 4096, "jpg", "JPEG_LRG");
@@ -931,6 +909,9 @@ namespace Emby.Dlna.Didl
AddImageResElement(item, writer, 4096, 4096, "png", "PNG_LRG");
AddImageResElement(item, writer, 160, 160, "png", "PNG_TN");
}
AddImageResElement(item, writer, 160, 160, "jpg", "JPEG_TN");
}
private void AddEmbeddedImageAsCover(string name, XmlWriter writer)
@@ -971,7 +952,7 @@ namespace Emby.Dlna.Didl
writer.WriteAttributeString("protocolInfo", string.Format(
"http-get:*:{0}:{1}",
GetMimeType("file." + format),
MimeTypes.GetMimeType("file." + format),
contentFeatures
));
@@ -1102,7 +1083,7 @@ namespace Emby.Dlna.Didl
public static string GetClientId(Guid idValue, StubType? stubType)
{
var id = idValue.ToString("N");
var id = idValue.ToString("N", CultureInfo.InvariantCulture);
if (stubType.HasValue)
{
@@ -1116,7 +1097,7 @@ namespace Emby.Dlna.Didl
{
var url = string.Format("{0}/Items/{1}/Images/{2}/0/{3}/{4}/{5}/{6}/0/0",
_serverAddress,
info.ItemId.ToString("N"),
info.ItemId.ToString("N", CultureInfo.InvariantCulture),
info.Type,
info.ImageTag,
format,

View File

@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@@ -15,9 +17,10 @@ using MediaBrowser.Controller.Drawing;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Reflection;
using MediaBrowser.Model.Serialization;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Primitives;
namespace Emby.Dlna
{
@@ -29,7 +32,7 @@ namespace Emby.Dlna
private readonly ILogger _logger;
private readonly IJsonSerializer _jsonSerializer;
private readonly IServerApplicationHost _appHost;
private readonly IAssemblyInfo _assemblyInfo;
private static readonly Assembly _assembly = typeof(DlnaManager).Assembly;
private readonly Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>> _profiles = new Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>>(StringComparer.Ordinal);
@@ -38,7 +41,8 @@ namespace Emby.Dlna
IFileSystem fileSystem,
IApplicationPaths appPaths,
ILoggerFactory loggerFactory,
IJsonSerializer jsonSerializer, IServerApplicationHost appHost, IAssemblyInfo assemblyInfo)
IJsonSerializer jsonSerializer,
IServerApplicationHost appHost)
{
_xmlSerializer = xmlSerializer;
_fileSystem = fileSystem;
@@ -46,7 +50,6 @@ namespace Emby.Dlna
_logger = loggerFactory.CreateLogger("Dlna");
_jsonSerializer = jsonSerializer;
_appHost = appHost;
_assemblyInfo = assemblyInfo;
}
public async Task InitProfilesAsync()
@@ -203,16 +206,13 @@ namespace Emby.Dlna
}
}
public DeviceProfile GetProfile(IDictionary<string, string> headers)
public DeviceProfile GetProfile(IHeaderDictionary headers)
{
if (headers == null)
{
throw new ArgumentNullException(nameof(headers));
}
// Convert to case insensitive
headers = new Dictionary<string, string>(headers, StringComparer.OrdinalIgnoreCase);
var profile = GetProfiles().FirstOrDefault(i => i.Identification != null && IsMatch(headers, i.Identification));
if (profile != null)
@@ -228,12 +228,12 @@ namespace Emby.Dlna
return profile;
}
private bool IsMatch(IDictionary<string, string> headers, DeviceIdentification profileInfo)
private bool IsMatch(IHeaderDictionary headers, DeviceIdentification profileInfo)
{
return profileInfo.Headers.Any(i => IsMatch(headers, i));
}
private bool IsMatch(IDictionary<string, string> headers, HttpHeaderInfo header)
private bool IsMatch(IHeaderDictionary headers, HttpHeaderInfo header)
{
// Handle invalid user setup
if (string.IsNullOrEmpty(header.Name))
@@ -241,14 +241,14 @@ namespace Emby.Dlna
return false;
}
if (headers.TryGetValue(header.Name, out string value))
if (headers.TryGetValue(header.Name, out StringValues value))
{
switch (header.Match)
{
case HeaderMatchType.Equals:
return string.Equals(value, header.Value, StringComparison.OrdinalIgnoreCase);
case HeaderMatchType.Substring:
var isMatch = value.IndexOf(header.Value, StringComparison.OrdinalIgnoreCase) != -1;
var isMatch = value.ToString().IndexOf(header.Value, StringComparison.OrdinalIgnoreCase) != -1;
//_logger.LogDebug("IsMatch-Substring value: {0} testValue: {1} isMatch: {2}", value, header.Value, isMatch);
return isMatch;
case HeaderMatchType.Regex:
@@ -301,7 +301,7 @@ namespace Emby.Dlna
profile = ReserializeProfile(tempProfile);
profile.Id = path.ToLowerInvariant().GetMD5().ToString("N");
profile.Id = path.ToLowerInvariant().GetMD5().ToString("N", CultureInfo.InvariantCulture);
_profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
@@ -353,7 +353,7 @@ namespace Emby.Dlna
Info = new DeviceProfileInfo
{
Id = file.FullName.ToLowerInvariant().GetMD5().ToString("N"),
Id = file.FullName.ToLowerInvariant().GetMD5().ToString("N", CultureInfo.InvariantCulture),
Name = _fileSystem.GetFileNameWithoutExtension(file),
Type = type
}
@@ -366,15 +366,18 @@ namespace Emby.Dlna
var systemProfilesPath = SystemProfilesPath;
foreach (var name in _assemblyInfo.GetManifestResourceNames(GetType())
.Where(i => i.StartsWith(namespaceName))
.ToList())
foreach (var name in _assembly.GetManifestResourceNames())
{
if (!name.StartsWith(namespaceName))
{
continue;
}
var filename = Path.GetFileName(name).Substring(namespaceName.Length);
var path = Path.Combine(systemProfilesPath, filename);
using (var stream = _assemblyInfo.GetManifestResourceStream(GetType(), name))
using (var stream = _assembly.GetManifestResourceStream(name))
{
var fileInfo = _fileSystem.GetFileInfo(path);
@@ -491,7 +494,7 @@ namespace Emby.Dlna
internal string Path { get; set; }
}
public string GetServerDescriptionXml(IDictionary<string, string> headers, string serverUuId, string serverAddress)
public string GetServerDescriptionXml(IHeaderDictionary headers, string serverUuId, string serverAddress)
{
var profile = GetProfile(headers) ??
GetDefaultProfile();
@@ -512,7 +515,7 @@ namespace Emby.Dlna
return new ImageStream
{
Format = format,
Stream = _assemblyInfo.GetManifestResourceStream(GetType(), resource)
Stream = _assembly.GetManifestResourceStream(resource)
};
}
}

View File

@@ -14,6 +14,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
@@ -58,4 +59,9 @@
<EmbeddedResource Include="Profiles\Xml\Xbox One.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
</ItemGroup>
</Project>

View File

@@ -55,7 +55,7 @@ namespace Emby.Dlna.Eventing
public EventSubscriptionResponse CreateEventSubscription(string notificationType, string requestedTimeoutString, string callbackUrl)
{
var timeout = ParseTimeout(requestedTimeoutString) ?? 300;
var id = "uuid:" + Guid.NewGuid().ToString("N");
var id = "uuid:" + Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);
// Remove logging for now because some devices are sending this very frequently
// TODO re-enable with dlna debug logging setting

View File

@@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace Emby.Dlna
{
public interface IUpnpService
@@ -7,9 +5,8 @@ namespace Emby.Dlna
/// <summary>
/// Gets the content directory XML.
/// </summary>
/// <param name="headers">The headers.</param>
/// <returns>System.String.</returns>
string GetServiceXml(IDictionary<string, string> headers);
string GetServiceXml();
/// <summary>
/// Processes the control request.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,5 +1,6 @@
using System;
using System.Linq;
using System.Net.Sockets;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using Emby.Dlna.PlayTo;
@@ -20,10 +21,10 @@ using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.Net;
using MediaBrowser.Model.System;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
using Rssdp;
using Rssdp.Infrastructure;
using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
namespace Emby.Dlna.Main
{
@@ -48,9 +49,8 @@ namespace Emby.Dlna.Main
private readonly IDeviceDiscovery _deviceDiscovery;
private SsdpDevicePublisher _Publisher;
private readonly ISocketFactory _socketFactory;
private readonly IEnvironmentInfo _environmentInfo;
private readonly INetworkManager _networkManager;
private ISsdpCommunicationsServer _communicationsServer;
@@ -76,10 +76,8 @@ namespace Emby.Dlna.Main
IDeviceDiscovery deviceDiscovery,
IMediaEncoder mediaEncoder,
ISocketFactory socketFactory,
IEnvironmentInfo environmentInfo,
INetworkManager networkManager,
IUserViewManager userViewManager,
IXmlReaderSettingsFactory xmlReaderSettingsFactory,
ITVSeriesManager tvSeriesManager)
{
_config = config;
@@ -96,11 +94,11 @@ namespace Emby.Dlna.Main
_deviceDiscovery = deviceDiscovery;
_mediaEncoder = mediaEncoder;
_socketFactory = socketFactory;
_environmentInfo = environmentInfo;
_networkManager = networkManager;
_logger = loggerFactory.CreateLogger("Dlna");
ContentDirectory = new ContentDirectory.ContentDirectory(dlnaManager,
ContentDirectory = new ContentDirectory.ContentDirectory(
dlnaManager,
userDataManager,
imageProcessor,
libraryManager,
@@ -112,12 +110,11 @@ namespace Emby.Dlna.Main
mediaSourceManager,
userViewManager,
mediaEncoder,
xmlReaderSettingsFactory,
tvSeriesManager);
ConnectionManager = new ConnectionManager.ConnectionManager(dlnaManager, config, _logger, httpClient, xmlReaderSettingsFactory);
ConnectionManager = new ConnectionManager.ConnectionManager(dlnaManager, config, _logger, httpClient);
MediaReceiverRegistrar = new MediaReceiverRegistrar.MediaReceiverRegistrar(_logger, httpClient, config, xmlReaderSettingsFactory);
MediaReceiverRegistrar = new MediaReceiverRegistrar.MediaReceiverRegistrar(_logger, httpClient, config);
Current = this;
}
@@ -169,9 +166,10 @@ namespace Emby.Dlna.Main
{
if (_communicationsServer == null)
{
var enableMultiSocketBinding = _environmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows;
var enableMultiSocketBinding = OperatingSystem.Id == OperatingSystemId.Windows ||
OperatingSystem.Id == OperatingSystemId.Linux;
_communicationsServer = new SsdpCommunicationsServer(_socketFactory, _networkManager, _logger, enableMultiSocketBinding)
_communicationsServer = new SsdpCommunicationsServer(_config, _socketFactory, _networkManager, _logger, enableMultiSocketBinding)
{
IsShared = true
};
@@ -229,7 +227,7 @@ namespace Emby.Dlna.Main
try
{
_Publisher = new SsdpDevicePublisher(_communicationsServer, _environmentInfo.OperatingSystemName, _environmentInfo.OperatingSystemVersion);
_Publisher = new SsdpDevicePublisher(_communicationsServer, _networkManager, OperatingSystem.Name, Environment.OSVersion.VersionString, _config.GetDlnaConfiguration().SendOnlyMatchedHost);
_Publisher.LogFunction = LogMessage;
_Publisher.SupportPnpRootDevice = false;
@@ -245,17 +243,17 @@ namespace Emby.Dlna.Main
private async Task RegisterServerEndpoints()
{
var addresses = (await _appHost.GetLocalIpAddresses(CancellationToken.None).ConfigureAwait(false)).ToList();
var addresses = await _appHost.GetLocalIpAddresses(CancellationToken.None).ConfigureAwait(false);
var udn = CreateUuid(_appHost.SystemId);
foreach (var address in addresses)
{
// TODO: Remove this condition on platforms that support it
//if (address.AddressFamily == IpAddressFamily.InterNetworkV6)
//{
// continue;
//}
if (address.AddressFamily == AddressFamily.InterNetworkV6)
{
// Not support IPv6 right now
continue;
}
var fullService = "urn:schemas-upnp-org:device:MediaServer:1";
@@ -268,6 +266,8 @@ namespace Emby.Dlna.Main
{
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.
Address = address,
SubnetMask = _networkManager.GetLocalIpSubnetMask(address),
FriendlyName = "Jellyfin",
Manufacturer = "Jellyfin",
ModelName = "Jellyfin Server",
@@ -308,7 +308,7 @@ namespace Emby.Dlna.Main
{
guid = text.GetMD5();
}
return guid.ToString("N");
return guid.ToString("N", CultureInfo.InvariantCulture);
}
private void SetProperies(SsdpDevice device, string fullDeviceType)

View File

@@ -3,7 +3,6 @@ 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
@@ -36,7 +35,8 @@ namespace Emby.Dlna.MediaReceiverRegistrar
};
}
public ControlHandler(IServerConfigurationManager config, ILogger logger, IXmlReaderSettingsFactory xmlReaderSettingsFactory) : base(config, logger, xmlReaderSettingsFactory)
public ControlHandler(IServerConfigurationManager config, ILogger logger)
: base(config, logger)
{
}
}

View File

@@ -1,8 +1,6 @@
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
@@ -10,16 +8,14 @@ namespace Emby.Dlna.MediaReceiverRegistrar
public class MediaReceiverRegistrar : BaseService, IMediaReceiverRegistrar
{
private readonly IServerConfigurationManager _config;
protected readonly IXmlReaderSettingsFactory XmlReaderSettingsFactory;
public MediaReceiverRegistrar(ILogger logger, IHttpClient httpClient, IServerConfigurationManager config, IXmlReaderSettingsFactory xmlReaderSettingsFactory)
public MediaReceiverRegistrar(ILogger logger, IHttpClient httpClient, IServerConfigurationManager config)
: base(logger, httpClient)
{
_config = config;
XmlReaderSettingsFactory = xmlReaderSettingsFactory;
}
public string GetServiceXml(IDictionary<string, string> headers)
public string GetServiceXml()
{
return new MediaReceiverRegistrarXmlBuilder().GetXml();
}
@@ -28,7 +24,7 @@ namespace Emby.Dlna.MediaReceiverRegistrar
{
return new ControlHandler(
_config,
Logger, XmlReaderSettingsFactory)
Logger)
.ProcessControlRequest(request);
}
}

View File

@@ -1,9 +0,0 @@
using System;
namespace Emby.Dlna.PlayTo
{
public class CurrentIdEventArgs : EventArgs
{
public string Id { get; set; }
}
}

View File

@@ -4,6 +4,7 @@ using System.Globalization;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
using Emby.Dlna.Common;
using Emby.Dlna.Server;
@@ -733,26 +734,21 @@ namespace Emby.Dlna.PlayTo
return (true, null);
}
XElement uPnpResponse;
XElement uPnpResponse = null;
// Handle different variations sent back by devices
try
{
uPnpResponse = XElement.Parse(trackString);
uPnpResponse = ParseResponse(trackString);
}
catch (Exception)
catch (Exception ex)
{
// first try to add a root node with a dlna namesapce
try
{
uPnpResponse = XElement.Parse("<data xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">" + trackString + "</data>");
uPnpResponse = uPnpResponse.Descendants().First();
}
catch (Exception ex)
{
_logger.LogError(ex, "Unable to parse xml {0}", trackString);
return (true, null);
}
_logger.LogError(ex, "Uncaught exception while parsing xml");
}
if (uPnpResponse == null)
{
_logger.LogError("Failed to parse xml: \n {Xml}", trackString);
return (true, null);
}
var e = uPnpResponse.Element(uPnpNamespaces.items);
@@ -762,6 +758,43 @@ namespace Emby.Dlna.PlayTo
return (true, uTrack);
}
private XElement ParseResponse(string xml)
{
// Handle different variations sent back by devices
try
{
return XElement.Parse(xml);
}
catch (XmlException)
{
}
// first try to add a root node with a dlna namesapce
try
{
return XElement.Parse("<data xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">" + xml + "</data>")
.Descendants()
.First();
}
catch (XmlException)
{
}
// some devices send back invalid xml
try
{
return XElement.Parse(xml.Replace("&", "&amp;"));
}
catch (XmlException)
{
}
return null;
}
private static uBaseObject CreateUBaseObject(XElement container, string trackUri)
{
if (container == null)
@@ -1093,6 +1126,11 @@ namespace Emby.Dlna.PlayTo
private void OnPlaybackStart(uBaseObject mediaInfo)
{
if (string.IsNullOrWhiteSpace(mediaInfo.Url))
{
return;
}
PlaybackStart?.Invoke(this, new PlaybackStartEventArgs
{
MediaInfo = mediaInfo
@@ -1101,8 +1139,7 @@ namespace Emby.Dlna.PlayTo
private void OnPlaybackProgress(uBaseObject mediaInfo)
{
var mediaUrl = mediaInfo.Url;
if (string.IsNullOrWhiteSpace(mediaUrl))
if (string.IsNullOrWhiteSpace(mediaInfo.Url))
{
return;
}
@@ -1115,7 +1152,6 @@ namespace Emby.Dlna.PlayTo
private void OnPlaybackStop(uBaseObject mediaInfo)
{
PlaybackStopped?.Invoke(this, new PlaybackStoppedEventArgs
{
MediaInfo = mediaInfo

View File

@@ -6,6 +6,7 @@ using System.Threading;
using System.Threading.Tasks;
using Emby.Dlna.Didl;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.Dlna;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Entities;
@@ -17,8 +18,8 @@ using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.Services;
using MediaBrowser.Model.Session;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Logging;
namespace Emby.Dlna.PlayTo
@@ -101,9 +102,10 @@ namespace Emby.Dlna.PlayTo
{
_sessionManager.ReportSessionEnded(_session.Id);
}
catch
catch (Exception ex)
{
// Could throw if the session is already gone
_logger.LogError(ex, "Error reporting the end of session {Id}", _session.Id);
}
}
@@ -111,20 +113,14 @@ namespace Emby.Dlna.PlayTo
{
var info = e.Argument;
info.Headers.TryGetValue("NTS", out string nts);
if (!info.Headers.TryGetValue("USN", out string usn)) usn = string.Empty;
if (!info.Headers.TryGetValue("NT", out string nt)) nt = string.Empty;
if (usn.IndexOf(_device.Properties.UUID, StringComparison.OrdinalIgnoreCase) != -1 &&
!_disposed)
if (!_disposed
&& info.Headers.TryGetValue("USN", out string usn)
&& usn.IndexOf(_device.Properties.UUID, StringComparison.OrdinalIgnoreCase) != -1
&& (usn.IndexOf("MediaRenderer:", StringComparison.OrdinalIgnoreCase) != -1
|| (info.Headers.TryGetValue("NT", out string nt)
&& nt.IndexOf("MediaRenderer:", StringComparison.OrdinalIgnoreCase) != -1)))
{
if (usn.IndexOf("MediaRenderer:", StringComparison.OrdinalIgnoreCase) != -1 ||
nt.IndexOf("MediaRenderer:", StringComparison.OrdinalIgnoreCase) != -1)
{
OnDeviceUnavailable();
}
OnDeviceUnavailable();
}
}
@@ -611,22 +607,34 @@ namespace Emby.Dlna.PlayTo
public void Dispose()
{
if (!_disposed)
{
_disposed = true;
_device.PlaybackStart -= _device_PlaybackStart;
_device.PlaybackProgress -= _device_PlaybackProgress;
_device.PlaybackStopped -= _device_PlaybackStopped;
_device.MediaChanged -= _device_MediaChanged;
//_deviceDiscovery.DeviceLeft -= _deviceDiscovery_DeviceLeft;
_device.OnDeviceUnavailable = null;
_device.Dispose();
}
Dispose(true);
GC.SuppressFinalize(this);
}
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
protected virtual void Dispose(bool disposing)
{
if (_disposed)
{
return;
}
if (disposing)
{
_device.Dispose();
}
_device.PlaybackStart -= _device_PlaybackStart;
_device.PlaybackProgress -= _device_PlaybackProgress;
_device.PlaybackStopped -= _device_PlaybackStopped;
_device.MediaChanged -= _device_MediaChanged;
_deviceDiscovery.DeviceLeft -= _deviceDiscovery_DeviceLeft;
_device.OnDeviceUnavailable = null;
_device = null;
_disposed = true;
}
private static readonly CultureInfo _usCulture = CultureInfo.ReadOnly(new CultureInfo("en-US"));
private Task SendGeneralCommand(GeneralCommand command, CancellationToken cancellationToken)
{
@@ -847,13 +855,13 @@ namespace Emby.Dlna.PlayTo
if (index == -1) return request;
var query = url.Substring(index + 1);
QueryParamCollection values = MyHttpUtility.ParseQueryString(query);
Dictionary<string, string> values = QueryHelpers.ParseQuery(query).ToDictionary(kv => kv.Key, kv => kv.Value.ToString());
request.DeviceProfileId = values.Get("DeviceProfileId");
request.DeviceId = values.Get("DeviceId");
request.MediaSourceId = values.Get("MediaSourceId");
request.LiveStreamId = values.Get("LiveStreamId");
request.IsDirectStream = string.Equals("true", values.Get("Static"), StringComparison.OrdinalIgnoreCase);
request.DeviceProfileId = values.GetValueOrDefault("DeviceProfileId");
request.DeviceId = values.GetValueOrDefault("DeviceId");
request.MediaSourceId = values.GetValueOrDefault("MediaSourceId");
request.LiveStreamId = values.GetValueOrDefault("LiveStreamId");
request.IsDirectStream = string.Equals("true", values.GetValueOrDefault("Static"), StringComparison.OrdinalIgnoreCase);
request.AudioStreamIndex = GetIntValue(values, "AudioStreamIndex");
request.SubtitleStreamIndex = GetIntValue(values, "SubtitleStreamIndex");
@@ -867,9 +875,9 @@ namespace Emby.Dlna.PlayTo
}
}
private static int? GetIntValue(QueryParamCollection values, string name)
private static int? GetIntValue(IReadOnlyDictionary<string, string> values, string name)
{
var value = values.Get(name);
var value = values.GetValueOrDefault(name);
if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result))
{
@@ -879,9 +887,9 @@ namespace Emby.Dlna.PlayTo
return null;
}
private static long GetLongValue(QueryParamCollection values, string name)
private static long GetLongValue(IReadOnlyDictionary<string, string> values, string name)
{
var value = values.Get(name);
var value = values.GetValueOrDefault(name);
if (long.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result))
{

View File

@@ -1,5 +1,7 @@
using System;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Extensions;
@@ -14,7 +16,6 @@ using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.Net;
using MediaBrowser.Model.Session;
using Microsoft.Extensions.Logging;
@@ -141,7 +142,7 @@ namespace Emby.Dlna.PlayTo
return usn;
}
return usn.GetMD5().ToString("N");
return usn.GetMD5().ToString("N", CultureInfo.InvariantCulture);
}
private async Task AddDevice(UpnpDeviceInfo info, string location, CancellationToken cancellationToken)
@@ -156,7 +157,7 @@ namespace Emby.Dlna.PlayTo
}
else
{
uuid = location.GetMD5().ToString("N");
uuid = location.GetMD5().ToString("N", CultureInfo.InvariantCulture);
}
var sessionInfo = _sessionManager.LogSessionActivity("DLNA", _appHost.ApplicationVersion, uuid, null, uri.OriginalString, null);
@@ -172,7 +173,7 @@ namespace Emby.Dlna.PlayTo
_sessionManager.UpdateDeviceName(sessionInfo.Id, deviceName);
string serverAddress;
if (info.LocalIpAddress == null || info.LocalIpAddress.Equals(IpAddressInfo.Any) || info.LocalIpAddress.Equals(IpAddressInfo.IPv6Any))
if (info.LocalIpAddress == null || info.LocalIpAddress.Equals(IPAddress.Any) || info.LocalIpAddress.Equals(IPAddress.IPv6Any))
{
serverAddress = await _appHost.GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
}

View File

@@ -9,8 +9,6 @@ namespace Emby.Dlna.PlayTo
{
public class PlaylistItemFactory
{
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
public PlaylistItem Create(Photo item, DeviceProfile profile)
{
var playlistItem = new PlaylistItem

View File

@@ -16,6 +16,8 @@ namespace Emby.Dlna.PlayTo
private const string USERAGENT = "Microsoft-Windows/6.2 UPnP/1.0 Microsoft-DLNA DLNADOC/1.50";
private const string FriendlyName = "Jellyfin";
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
private readonly IHttpClient _httpClient;
private readonly IServerConfigurationManager _config;
@@ -25,7 +27,8 @@ namespace Emby.Dlna.PlayTo
_config = config;
}
public async Task<XDocument> SendCommandAsync(string baseUrl,
public async Task<XDocument> SendCommandAsync(
string baseUrl,
DeviceService service,
string command,
string postData,
@@ -34,16 +37,21 @@ namespace Emby.Dlna.PlayTo
{
var cancellationToken = CancellationToken.None;
using (var response = await PostSoapDataAsync(NormalizeServiceUrl(baseUrl, service.ControlUrl), "\"" + service.ServiceType + "#" + command + "\"", postData, header, logRequest, cancellationToken)
var url = NormalizeServiceUrl(baseUrl, service.ControlUrl);
using (var response = await PostSoapDataAsync(
url,
$"\"{service.ServiceType}#{command}\"",
postData,
header,
logRequest,
cancellationToken)
.ConfigureAwait(false))
using (var stream = response.Content)
using (var reader = new StreamReader(stream, Encoding.UTF8))
{
using (var stream = response.Content)
{
using (var reader = new StreamReader(stream, Encoding.UTF8))
{
return XDocument.Parse(reader.ReadToEnd(), LoadOptions.PreserveWhitespace);
}
}
return XDocument.Parse(
await reader.ReadToEndAsync().ConfigureAwait(false),
LoadOptions.PreserveWhitespace);
}
}
@@ -61,9 +69,8 @@ namespace Emby.Dlna.PlayTo
return baseUrl + serviceUrl;
}
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
public async Task SubscribeAsync(string url,
public async Task SubscribeAsync(
string url,
string ip,
int port,
string localIp,
@@ -76,9 +83,6 @@ namespace Emby.Dlna.PlayTo
UserAgent = USERAGENT,
LogErrorResponseBody = true,
BufferContent = false,
// The periodic requests may keep some devices awake
LogRequestAsDebug = true
};
options.RequestHeaders["HOST"] = ip + ":" + port.ToString(_usCulture);
@@ -101,47 +105,41 @@ namespace Emby.Dlna.PlayTo
LogErrorResponseBody = true,
BufferContent = false,
// The periodic requests may keep some devices awake
LogRequestAsDebug = true,
CancellationToken = cancellationToken
};
options.RequestHeaders["FriendlyName.DLNA.ORG"] = FriendlyName;
using (var response = await _httpClient.SendAsync(options, "GET").ConfigureAwait(false))
using (var stream = response.Content)
using (var reader = new StreamReader(stream, Encoding.UTF8))
{
using (var stream = response.Content)
{
using (var reader = new StreamReader(stream, Encoding.UTF8))
{
return XDocument.Parse(reader.ReadToEnd(), LoadOptions.PreserveWhitespace);
}
}
return XDocument.Parse(
await reader.ReadToEndAsync().ConfigureAwait(false),
LoadOptions.PreserveWhitespace);
}
}
private Task<HttpResponseInfo> PostSoapDataAsync(string url,
private Task<HttpResponseInfo> PostSoapDataAsync(
string url,
string soapAction,
string postData,
string header,
bool logRequest,
CancellationToken cancellationToken)
{
if (!soapAction.StartsWith("\""))
soapAction = "\"" + soapAction + "\"";
if (soapAction[0] != '\"')
{
soapAction = $"\"{soapAction}\"";
}
var options = new HttpRequestOptions
{
Url = url,
UserAgent = USERAGENT,
LogRequest = logRequest || _config.GetDlnaConfiguration().EnableDebugLog,
LogErrorResponseBody = true,
BufferContent = false,
// The periodic requests may keep some devices awake
LogRequestAsDebug = true,
CancellationToken = cancellationToken
};
@@ -155,7 +153,6 @@ namespace Emby.Dlna.PlayTo
}
options.RequestContentType = "text/xml";
options.AppendCharsetToMimeType = true;
options.RequestContent = postData;
return _httpClient.Post(options);

View File

@@ -107,12 +107,18 @@ namespace Emby.Dlna.PlayTo
foreach (var arg in action.ArgumentList)
{
if (arg.Direction == "out")
{
continue;
}
if (arg.Name == "InstanceID")
{
stateString += BuildArgumentXml(arg, "0");
}
else
{
stateString += BuildArgumentXml(arg, null);
}
}
return string.Format(CommandBase, action.Name, xmlNamespace, stateString);
@@ -125,11 +131,18 @@ namespace Emby.Dlna.PlayTo
foreach (var arg in action.ArgumentList)
{
if (arg.Direction == "out")
{
continue;
}
if (arg.Name == "InstanceID")
{
stateString += BuildArgumentXml(arg, "0");
}
else
{
stateString += BuildArgumentXml(arg, value.ToString(), commandParameter);
}
}
return string.Format(CommandBase, action.Name, xmlNamesapce, stateString);
@@ -142,11 +155,17 @@ namespace Emby.Dlna.PlayTo
foreach (var arg in action.ArgumentList)
{
if (arg.Name == "InstanceID")
{
stateString += BuildArgumentXml(arg, "0");
}
else if (dictionary.ContainsKey(arg.Name))
{
stateString += BuildArgumentXml(arg, dictionary[arg.Name]);
}
else
{
stateString += BuildArgumentXml(arg, value.ToString());
}
}
return string.Format(CommandBase, action.Name, xmlNamesapce, stateString);

View File

@@ -1,9 +0,0 @@
using System;
namespace Emby.Dlna.PlayTo
{
public class TransportStateEventArgs : EventArgs
{
public TRANSPORTSTATE State { get; set; }
}
}

View File

@@ -1,47 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
namespace Emby.Dlna.PlayTo
{
public class uParser
{
public static IList<uBaseObject> ParseBrowseXml(XDocument doc)
{
if (doc == null)
{
throw new ArgumentException("doc");
}
var list = new List<uBaseObject>();
var document = doc.Document;
if (document == null)
return list;
var item = (from result in document.Descendants("Result") select result).FirstOrDefault();
if (item == null)
return list;
var uPnpResponse = XElement.Parse((string)item);
var uObjects = from container in uPnpResponse.Elements(uPnpNamespaces.containers)
select new uParserObject { Element = container };
var uObjects2 = from container in uPnpResponse.Elements(uPnpNamespaces.items)
select new uParserObject { Element = container };
list.AddRange(uObjects.Concat(uObjects2).Select(CreateObjectFromXML).Where(uObject => uObject != null));
return list;
}
public static uBaseObject CreateObjectFromXML(uParserObject uItem)
{
return UpnpContainer.Create(uItem.Element);
}
}
}

View File

@@ -1,9 +0,0 @@
using System.Xml.Linq;
namespace Emby.Dlna.PlayTo
{
public class uParserObject
{
public XElement Element { get; set; }
}
}

View File

@@ -9,7 +9,7 @@ namespace Emby.Dlna.Profiles
{
Name = "Dish Hopper-Joey";
ProtocolInfo = "http-get:*:video/mp2t:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*";
ProtocolInfo = "http-get:*:video/mp2t:*,http-get:*:video/mpeg:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*";
Identification = new DeviceIdentification
{

View File

@@ -28,7 +28,7 @@
<MaxStaticBitrate>140000000</MaxStaticBitrate>
<MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate>
<MaxStaticMusicBitrate xsi:nil="true" />
<ProtocolInfo>http-get:*:video/mp2t:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*</ProtocolInfo>
<ProtocolInfo>http-get:*:video/mp2t:http-get:*:video/mpeg:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*</ProtocolInfo>
<TimelineOffsetSeconds>0</TimelineOffsetSeconds>
<RequiresPlainVideoItems>false</RequiresPlainVideoItems>
<RequiresPlainFolders>false</RequiresPlainFolders>

View File

@@ -8,8 +8,8 @@ using System.Resources;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[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: AssemblyProduct("Jellyfin Server")]
[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]

View File

@@ -7,7 +7,6 @@ using System.Xml;
using Emby.Dlna.Didl;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Extensions;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace Emby.Dlna.Service
@@ -18,13 +17,11 @@ namespace Emby.Dlna.Service
protected readonly IServerConfigurationManager Config;
protected readonly ILogger _logger;
protected readonly IXmlReaderSettingsFactory XmlReaderSettingsFactory;
protected BaseControlHandler(IServerConfigurationManager config, ILogger logger, IXmlReaderSettingsFactory xmlReaderSettingsFactory)
protected BaseControlHandler(IServerConfigurationManager config, ILogger logger)
{
Config = config;
_logger = logger;
XmlReaderSettingsFactory = xmlReaderSettingsFactory;
}
public ControlResponse ProcessControlRequest(ControlRequest request)
@@ -61,11 +58,13 @@ namespace Emby.Dlna.Service
using (var streamReader = new StreamReader(request.InputXml))
{
var readerSettings = XmlReaderSettingsFactory.Create(false);
readerSettings.CheckCharacters = false;
readerSettings.IgnoreProcessingInstructions = true;
readerSettings.IgnoreComments = true;
var readerSettings = new XmlReaderSettings()
{
ValidationType = ValidationType.None,
CheckCharacters = false,
IgnoreProcessingInstructions = true,
IgnoreComments = true
};
using (var reader = XmlReader.Create(streamReader, readerSettings))
{

View File

@@ -3,6 +3,8 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
@@ -15,4 +17,9 @@
<Compile Include="..\SharedVersion.cs" />
</ItemGroup>
<PropertyGroup>
<!-- We need at least C# 7.1 for the "default literal" feature-->
<LangVersion>latest</LangVersion>
</PropertyGroup>
</Project>

View File

@@ -22,42 +22,47 @@ using Microsoft.Extensions.Logging;
namespace Emby.Drawing
{
/// <summary>
/// Class ImageProcessor
/// Class ImageProcessor.
/// </summary>
public class ImageProcessor : IImageProcessor, IDisposable
{
/// <summary>
/// The us culture
/// </summary>
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
// Increment this when there's a change requiring caches to be invalidated
private const string Version = "3";
/// <summary>
/// Gets the list of currently registered image processors
/// Image processors are specialized metadata providers that run after the normal ones
/// </summary>
/// <value>The image enhancers.</value>
public IImageEnhancer[] ImageEnhancers { get; private set; }
private static readonly HashSet<string> _transparentImageTypes
= new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".png", ".webp", ".gif" };
/// <summary>
/// The _logger
/// </summary>
private readonly ILogger _logger;
private readonly IFileSystem _fileSystem;
private readonly IServerApplicationPaths _appPaths;
private IImageEncoder _imageEncoder;
private readonly Func<ILibraryManager> _libraryManager;
private readonly Func<IMediaEncoder> _mediaEncoder;
private readonly Dictionary<string, LockInfo> _locks = new Dictionary<string, LockInfo>();
private bool _disposed = false;
/// <summary>
///
/// </summary>
/// <param name="logger"></param>
/// <param name="appPaths"></param>
/// <param name="fileSystem"></param>
/// <param name="imageEncoder"></param>
/// <param name="libraryManager"></param>
/// <param name="mediaEncoder"></param>
public ImageProcessor(
ILoggerFactory loggerFactory,
ILogger<ImageProcessor> logger,
IServerApplicationPaths appPaths,
IFileSystem fileSystem,
IImageEncoder imageEncoder,
Func<ILibraryManager> libraryManager,
Func<IMediaEncoder> mediaEncoder)
{
_logger = loggerFactory.CreateLogger(nameof(ImageProcessor));
_logger = logger;
_fileSystem = fileSystem;
_imageEncoder = imageEncoder;
_libraryManager = libraryManager;
@@ -69,20 +74,11 @@ namespace Emby.Drawing
ImageHelper.ImageProcessor = this;
}
public IImageEncoder ImageEncoder
{
get => _imageEncoder;
set
{
if (value == null)
{
throw new ArgumentNullException(nameof(value));
}
private string ResizedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "resized-images");
_imageEncoder = value;
}
}
private string EnhancedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "enhanced-images");
/// <inheritdoc />
public IReadOnlyCollection<string> SupportedInputFormats =>
new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
@@ -115,18 +111,20 @@ namespace Emby.Drawing
"wbmp"
};
/// <inheritdoc />
public IReadOnlyCollection<IImageEnhancer> ImageEnhancers { get; set; }
/// <inheritdoc />
public bool SupportsImageCollageCreation => _imageEncoder.SupportsImageCollageCreation;
private string ResizedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "resized-images");
private string EnhancedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "enhanced-images");
public void AddParts(IEnumerable<IImageEnhancer> enhancers)
/// <inheritdoc />
public IImageEncoder ImageEncoder
{
ImageEnhancers = enhancers.ToArray();
get => _imageEncoder;
set => _imageEncoder = value ?? throw new ArgumentNullException(nameof(value));
}
/// <inheritdoc />
public async Task ProcessImage(ImageProcessingOptions options, Stream toStream)
{
var file = await ProcessImage(options).ConfigureAwait(false);
@@ -137,15 +135,15 @@ namespace Emby.Drawing
}
}
/// <inheritdoc />
public IReadOnlyCollection<ImageFormat> GetSupportedImageOutputFormats()
=> _imageEncoder.SupportedOutputFormats;
private static readonly HashSet<string> TransparentImageTypes
= new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".png", ".webp", ".gif" };
/// <inheritdoc />
public bool SupportsTransparency(string path)
=> TransparentImageTypes.Contains(Path.GetExtension(path));
=> _transparentImageTypes.Contains(Path.GetExtension(path));
/// <inheritdoc />
public async Task<(string path, string mimeType, DateTime dateModified)> ProcessImage(ImageProcessingOptions options)
{
if (options == null)
@@ -180,10 +178,16 @@ namespace Emby.Drawing
var supportedImageInfo = await GetSupportedImage(originalImagePath, dateModified).ConfigureAwait(false);
originalImagePath = supportedImageInfo.path;
dateModified = supportedImageInfo.dateModified;
bool requiresTransparency = TransparentImageTypes.Contains(Path.GetExtension(originalImagePath));
if (options.Enhancers.Length > 0)
if (!File.Exists(originalImagePath))
{
return (originalImagePath, MimeTypes.GetMimeType(originalImagePath), dateModified);
}
dateModified = supportedImageInfo.dateModified;
bool requiresTransparency = _transparentImageTypes.Contains(Path.GetExtension(originalImagePath));
if (options.Enhancers.Count > 0)
{
if (item == null)
{
@@ -265,8 +269,6 @@ namespace Emby.Drawing
{
// If it fails for whatever reason, return the original image
_logger.LogError(ex, "Error encoding image");
// Just spit out the original file if all the options are default
return (originalImagePath, MimeTypes.GetMimeType(originalImagePath), dateModified);
}
finally
@@ -275,7 +277,7 @@ namespace Emby.Drawing
}
}
private ImageFormat GetOutputFormat(ImageFormat[] clientSupportedFormats, bool requiresTransparency)
private ImageFormat GetOutputFormat(IReadOnlyCollection<ImageFormat> clientSupportedFormats, bool requiresTransparency)
{
var serverFormats = GetSupportedImageOutputFormats();
@@ -316,11 +318,6 @@ namespace Emby.Drawing
}
}
/// <summary>
/// Increment this when there's a change requiring caches to be invalidated
/// </summary>
private const string Version = "3";
/// <summary>
/// Gets the cache file path based on a set of parameters
/// </summary>
@@ -368,9 +365,11 @@ namespace Emby.Drawing
return GetCachePath(ResizedImageCachePath, filename, "." + format.ToString().ToLowerInvariant());
}
/// <inheritdoc />
public ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info)
=> GetImageDimensions(item, info, true);
/// <inheritdoc />
public ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info, bool updateItem)
{
int width = info.Width;
@@ -396,26 +395,19 @@ namespace Emby.Drawing
return size;
}
/// <summary>
/// Gets the size of the image.
/// </summary>
/// <inheritdoc />
public ImageDimensions GetImageDimensions(string path)
=> _imageEncoder.GetImageSize(path);
/// <summary>
/// Gets the image cache tag.
/// </summary>
/// <param name="item">The item.</param>
/// <param name="image">The image.</param>
/// <returns>Guid.</returns>
/// <exception cref="ArgumentNullException">item</exception>
/// <inheritdoc />
public string GetImageCacheTag(BaseItem item, ItemImageInfo image)
{
var supportedEnhancers = GetSupportedEnhancers(item, image.Type);
var supportedEnhancers = GetSupportedEnhancers(item, image.Type).ToArray();
return GetImageCacheTag(item, image, supportedEnhancers);
}
/// <inheritdoc />
public string GetImageCacheTag(BaseItem item, ChapterInfo chapter)
{
try
@@ -433,31 +425,24 @@ namespace Emby.Drawing
}
}
/// <summary>
/// Gets the image cache tag.
/// </summary>
/// <param name="item">The item.</param>
/// <param name="image">The image.</param>
/// <param name="imageEnhancers">The image enhancers.</param>
/// <returns>Guid.</returns>
/// <exception cref="ArgumentNullException">item</exception>
public string GetImageCacheTag(BaseItem item, ItemImageInfo image, IImageEnhancer[] imageEnhancers)
/// <inheritdoc />
public string GetImageCacheTag(BaseItem item, ItemImageInfo image, IReadOnlyCollection<IImageEnhancer> imageEnhancers)
{
string originalImagePath = image.Path;
DateTime dateModified = image.DateModified;
ImageType imageType = image.Type;
// Optimization
if (imageEnhancers.Length == 0)
if (imageEnhancers.Count == 0)
{
return (originalImagePath + dateModified.Ticks).GetMD5().ToString("N");
return (originalImagePath + dateModified.Ticks).GetMD5().ToString("N", CultureInfo.InvariantCulture);
}
// Cache name is created with supported enhancers combined with the last config change so we pick up new config changes
var cacheKeys = imageEnhancers.Select(i => i.GetConfigurationCacheKey(item, imageType)).ToList();
cacheKeys.Add(originalImagePath + dateModified.Ticks);
return string.Join("|", cacheKeys).GetMD5().ToString("N");
return string.Join("|", cacheKeys).GetMD5().ToString("N", CultureInfo.InvariantCulture);
}
private async Task<(string path, DateTime dateModified)> GetSupportedImage(string originalImagePath, DateTime dateModified)
@@ -476,7 +461,7 @@ namespace Emby.Drawing
{
try
{
string filename = (originalImagePath + dateModified.Ticks.ToString(UsCulture)).GetMD5().ToString("N");
string filename = (originalImagePath + dateModified.Ticks.ToString(CultureInfo.InvariantCulture)).GetMD5().ToString("N", CultureInfo.InvariantCulture);
string cacheExtension = _mediaEncoder().SupportsEncoder("libwebp") ? ".webp" : ".png";
var outputPath = Path.Combine(_appPaths.ImageCachePath, "converted-images", filename + cacheExtension);
@@ -503,16 +488,10 @@ namespace Emby.Drawing
return (originalImagePath, dateModified);
}
/// <summary>
/// Gets the enhanced image.
/// </summary>
/// <param name="item">The item.</param>
/// <param name="imageType">Type of the image.</param>
/// <param name="imageIndex">Index of the image.</param>
/// <returns>Task{System.String}.</returns>
/// <inheritdoc />
public async Task<string> GetEnhancedImage(BaseItem item, ImageType imageType, int imageIndex)
{
var enhancers = GetSupportedEnhancers(item, imageType);
var enhancers = GetSupportedEnhancers(item, imageType).ToArray();
ItemImageInfo imageInfo = item.GetImageInfo(imageType, imageIndex);
@@ -528,7 +507,7 @@ namespace Emby.Drawing
bool inputImageSupportsTransparency,
BaseItem item,
int imageIndex,
IImageEnhancer[] enhancers,
IReadOnlyCollection<IImageEnhancer> enhancers,
CancellationToken cancellationToken)
{
var originalImagePath = image.Path;
@@ -569,6 +548,7 @@ namespace Emby.Drawing
/// <param name="imageIndex">Index of the image.</param>
/// <param name="supportedEnhancers">The supported enhancers.</param>
/// <param name="cacheGuid">The cache unique identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;System.String&gt;.</returns>
/// <exception cref="ArgumentNullException">
/// originalImagePath
@@ -580,9 +560,9 @@ namespace Emby.Drawing
BaseItem item,
ImageType imageType,
int imageIndex,
IImageEnhancer[] supportedEnhancers,
IReadOnlyCollection<IImageEnhancer> supportedEnhancers,
string cacheGuid,
CancellationToken cancellationToken)
CancellationToken cancellationToken = default)
{
if (string.IsNullOrEmpty(originalImagePath))
{
@@ -676,6 +656,7 @@ namespace Emby.Drawing
{
throw new ArgumentNullException(nameof(path));
}
if (string.IsNullOrEmpty(uniqueName))
{
throw new ArgumentNullException(nameof(uniqueName));
@@ -718,6 +699,7 @@ namespace Emby.Drawing
return Path.Combine(path, prefix, filename);
}
/// <inheritdoc />
public void CreateImageCollage(ImageCollageOptions options)
{
_logger.LogInformation("Creating image collage and saving to {Path}", options.OutputPath);
@@ -727,38 +709,25 @@ namespace Emby.Drawing
_logger.LogInformation("Completed creation of image collage and saved to {Path}", options.OutputPath);
}
public IImageEnhancer[] GetSupportedEnhancers(BaseItem item, ImageType imageType)
/// <inheritdoc />
public IEnumerable<IImageEnhancer> GetSupportedEnhancers(BaseItem item, ImageType imageType)
{
List<IImageEnhancer> list = null;
foreach (var i in ImageEnhancers)
{
try
if (i.Supports(item, imageType))
{
if (i.Supports(item, imageType))
{
if (list == null)
{
list = new List<IImageEnhancer>();
}
list.Add(i);
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Error in image enhancer: {0}", i.GetType().Name);
yield return i;
}
}
return list == null ? Array.Empty<IImageEnhancer>() : list.ToArray();
}
private Dictionary<string, LockInfo> _locks = new Dictionary<string, LockInfo>();
private class LockInfo
{
public SemaphoreSlim Lock = new SemaphoreSlim(1, 1);
public int Count = 1;
}
private LockInfo GetLock(string key)
{
lock (_locks)
@@ -791,7 +760,7 @@ namespace Emby.Drawing
}
}
private bool _disposed;
/// <inheritdoc />
public void Dispose()
{
_disposed = true;

View File

@@ -5,38 +5,42 @@ using MediaBrowser.Model.Drawing;
namespace Emby.Drawing
{
/// <summary>
/// A fallback implementation of <see cref="IImageEncoder" />.
/// </summary>
public class NullImageEncoder : IImageEncoder
{
/// <inheritdoc />
public IReadOnlyCollection<string> SupportedInputFormats
=> new HashSet<string>(StringComparer.OrdinalIgnoreCase) { "png", "jpeg", "jpg" };
/// <inheritdoc />
public IReadOnlyCollection<ImageFormat> SupportedOutputFormats
=> new HashSet<ImageFormat>() { ImageFormat.Jpg, ImageFormat.Png };
public void CropWhiteSpace(string inputPath, string outputPath)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public string Name => "Null Image Encoder";
/// <inheritdoc />
public bool SupportsImageCollageCreation => false;
/// <inheritdoc />
public bool SupportsImageEncoding => false;
/// <inheritdoc />
public ImageDimensions GetImageSize(string path)
=> throw new NotImplementedException();
/// <inheritdoc />
public string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat selectedOutputFormat)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public void CreateImageCollage(ImageCollageOptions options)
{
throw new NotImplementedException();
}
public string Name => "Null Image Encoder";
public bool SupportsImageCollageCreation => false;
public bool SupportsImageEncoding => false;
public ImageDimensions GetImageSize(string path)
{
throw new NotImplementedException();
}
}
}

View File

@@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[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: AssemblyProduct("Jellyfin Server")]
[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View File

@@ -1,108 +0,0 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML

View File

@@ -1,25 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2009
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IsoMounter", "IsoMounter\IsoMounter.csproj", "{B94C929C-6552-4620-9BE5-422DD9A151BA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B94C929C-6552-4620-9BE5-422DD9A151BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B94C929C-6552-4620-9BE5-422DD9A151BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B94C929C-6552-4620-9BE5-422DD9A151BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B94C929C-6552-4620-9BE5-422DD9A151BA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C0E8EAD1-E4D7-44CD-B801-03BD12F30B1B}
EndGlobalSection
EndGlobal

View File

@@ -1,8 +0,0 @@
using MediaBrowser.Model.Plugins;
namespace IsoMounter.Configuration
{
public class PluginConfiguration : BasePluginConfiguration
{
}
}

View File

@@ -1,17 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<Compile Include="..\..\SharedVersion.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
<ProjectReference Include="..\..\MediaBrowser.Common\MediaBrowser.Common.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
</Project>

View File

@@ -1,481 +0,0 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Diagnostics;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.System;
using Microsoft.Extensions.Logging;
namespace IsoMounter
{
public class LinuxIsoManager : IIsoMounter
{
[DllImport("libc", SetLastError = true)]
static extern uint getuid();
#region Private Fields
private readonly IEnvironmentInfo EnvironmentInfo;
private readonly bool ExecutablesAvailable;
private readonly IFileSystem FileSystem;
private readonly ILogger _logger;
private readonly string MountCommand;
private readonly string MountPointRoot;
private readonly IProcessFactory ProcessFactory;
private readonly string SudoCommand;
private readonly string UmountCommand;
#endregion
#region Constructor(s)
public LinuxIsoManager(ILogger logger, IFileSystem fileSystem, IEnvironmentInfo environment, IProcessFactory processFactory)
{
EnvironmentInfo = environment;
FileSystem = fileSystem;
_logger = logger;
ProcessFactory = processFactory;
MountPointRoot = Path.DirectorySeparatorChar + "tmp" + Path.DirectorySeparatorChar + "Emby";
_logger.LogDebug(
"[{0}] System PATH is currently set to [{1}].",
Name,
Environment.GetEnvironmentVariable("PATH") ?? ""
);
_logger.LogDebug(
"[{0}] System path separator is [{1}].",
Name,
Path.PathSeparator
);
_logger.LogDebug(
"[{0}] Mount point root is [{1}].",
Name,
MountPointRoot
);
//
// Get the location of the executables we need to support mounting/unmounting ISO images.
//
SudoCommand = GetFullPathForExecutable("sudo");
_logger.LogInformation(
"[{0}] Using version of [sudo] located at [{1}].",
Name,
SudoCommand
);
MountCommand = GetFullPathForExecutable("mount");
_logger.LogInformation(
"[{0}] Using version of [mount] located at [{1}].",
Name,
MountCommand
);
UmountCommand = GetFullPathForExecutable("umount");
_logger.LogInformation(
"[{0}] Using version of [umount] located at [{1}].",
Name,
UmountCommand
);
if (!string.IsNullOrEmpty(SudoCommand) && !string.IsNullOrEmpty(MountCommand) && !string.IsNullOrEmpty(UmountCommand))
{
ExecutablesAvailable = true;
}
else
{
ExecutablesAvailable = false;
}
}
#endregion
#region Interface Implementation for IIsoMounter
public bool IsInstalled => true;
public string Name => "LinuxMount";
public bool RequiresInstallation => false;
public bool CanMount(string path)
{
if (EnvironmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.Linux)
{
return false;
}
_logger.LogInformation(
"[{0}] Checking we can attempt to mount [{1}], Extension = [{2}], Operating System = [{3}], Executables Available = [{4}].",
Name,
path,
Path.GetExtension(path),
EnvironmentInfo.OperatingSystem,
ExecutablesAvailable
);
if (ExecutablesAvailable)
{
return string.Equals(Path.GetExtension(path), ".iso", StringComparison.OrdinalIgnoreCase);
}
else
{
return false;
}
}
public Task Install(CancellationToken cancellationToken)
{
return Task.FromResult(false);
}
public Task<IIsoMount> Mount(string isoPath, CancellationToken cancellationToken)
{
if (MountISO(isoPath, out LinuxMount mountedISO))
{
return Task.FromResult<IIsoMount>(mountedISO);
}
else
{
throw new IOException(string.Format(
"An error occurred trying to mount image [$0].",
isoPath
));
}
}
#endregion
#region Interface Implementation for IDisposable
// Flag: Has Dispose already been called?
private bool disposed = false;
public void Dispose()
{
// Dispose of unmanaged resources.
Dispose(true);
// Suppress finalization.
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposed)
{
return;
}
_logger.LogInformation(
"[{0}] Disposing [{1}].",
Name,
disposing
);
if (disposing)
{
//
// Free managed objects here.
//
}
//
// Free any unmanaged objects here.
//
disposed = true;
}
#endregion
#region Private Methods
private string GetFullPathForExecutable(string name)
{
foreach (string test in (Environment.GetEnvironmentVariable("PATH") ?? "").Split(Path.PathSeparator))
{
string path = test.Trim();
if (!string.IsNullOrEmpty(path) && File.Exists(path = Path.Combine(path, name)))
{
return Path.GetFullPath(path);
}
}
return string.Empty;
}
private uint GetUID()
{
var uid = getuid();
_logger.LogDebug(
"[{0}] GetUserId() returned [{2}].",
Name,
uid
);
return uid;
}
private bool ExecuteCommand(string cmdFilename, string cmdArguments)
{
bool processFailed = false;
var process = ProcessFactory.Create(
new ProcessOptions
{
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
FileName = cmdFilename,
Arguments = cmdArguments,
IsHidden = true,
ErrorDialog = false,
EnableRaisingEvents = true
}
);
try
{
process.Start();
//StreamReader outputReader = process.StandardOutput.;
//StreamReader errorReader = process.StandardError;
_logger.LogDebug(
"[{Name}] Standard output from process is [{Error}].",
Name,
process.StandardOutput.ReadToEnd()
);
_logger.LogDebug(
"[{Name}] Standard error from process is [{Error}].",
Name,
process.StandardError.ReadToEnd()
);
}
catch (Exception ex)
{
processFailed = true;
_logger.LogDebug(ex, "[{Name}] Unhandled exception executing command.", Name);
}
if (!processFailed && process.ExitCode == 0)
{
return true;
}
else
{
return false;
}
}
private bool MountISO(string isoPath, out LinuxMount mountedISO)
{
string cmdArguments;
string cmdFilename;
string mountPoint = Path.Combine(MountPointRoot, Guid.NewGuid().ToString());
if (!string.IsNullOrEmpty(isoPath))
{
_logger.LogInformation(
"[{Name}] Attempting to mount [{Path}].",
Name,
isoPath
);
_logger.LogDebug(
"[{Name}] ISO will be mounted at [{Path}].",
Name,
mountPoint
);
}
else
{
throw new ArgumentNullException(nameof(isoPath));
}
try
{
Directory.CreateDirectory(mountPoint);
}
catch (UnauthorizedAccessException)
{
throw new IOException("Unable to create mount point(Permission denied) for " + isoPath);
}
catch (Exception)
{
throw new IOException("Unable to create mount point for " + isoPath);
}
if (GetUID() == 0)
{
cmdFilename = MountCommand;
cmdArguments = string.Format("\"{0}\" \"{1}\"", isoPath, mountPoint);
}
else
{
cmdFilename = SudoCommand;
cmdArguments = string.Format("\"{0}\" \"{1}\" \"{2}\"", MountCommand, isoPath, mountPoint);
}
_logger.LogDebug(
"[{0}] Mount command [{1}], mount arguments [{2}].",
Name,
cmdFilename,
cmdArguments
);
if (ExecuteCommand(cmdFilename, cmdArguments))
{
_logger.LogInformation(
"[{0}] ISO mount completed successfully.",
Name
);
mountedISO = new LinuxMount(this, isoPath, mountPoint);
}
else
{
_logger.LogInformation(
"[{0}] ISO mount completed with errors.",
Name
);
try
{
Directory.Delete(mountPoint, false);
}
catch (Exception ex)
{
_logger.LogInformation(ex, "[{Name}] Unhandled exception removing mount point.", Name);
}
mountedISO = null;
}
return mountedISO != null;
}
private void UnmountISO(LinuxMount mount)
{
string cmdArguments;
string cmdFilename;
if (mount != null)
{
_logger.LogInformation(
"[{0}] Attempting to unmount ISO [{1}] mounted on [{2}].",
Name,
mount.IsoPath,
mount.MountedPath
);
}
else
{
throw new ArgumentNullException(nameof(mount));
}
if (GetUID() == 0)
{
cmdFilename = UmountCommand;
cmdArguments = string.Format("\"{0}\"", mount.MountedPath);
}
else
{
cmdFilename = SudoCommand;
cmdArguments = string.Format("\"{0}\" \"{1}\"", UmountCommand, mount.MountedPath);
}
_logger.LogDebug(
"[{0}] Umount command [{1}], umount arguments [{2}].",
Name,
cmdFilename,
cmdArguments
);
if (ExecuteCommand(cmdFilename, cmdArguments))
{
_logger.LogInformation(
"[{0}] ISO unmount completed successfully.",
Name
);
}
else
{
_logger.LogInformation(
"[{0}] ISO unmount completed with errors.",
Name
);
}
try
{
Directory.Delete(mount.MountedPath, false);
}
catch (Exception ex)
{
_logger.LogInformation(ex, "[{Name}] Unhandled exception removing mount point.", Name);
}
}
#endregion
#region Internal Methods
internal void OnUnmount(LinuxMount mount)
{
UnmountISO(mount);
}
#endregion
}
}

View File

@@ -1,83 +0,0 @@
using System;
using MediaBrowser.Model.IO;
namespace IsoMounter
{
internal class LinuxMount : IIsoMount
{
#region Private Fields
private readonly LinuxIsoManager linuxIsoManager;
#endregion
#region Constructor(s)
internal LinuxMount(LinuxIsoManager isoManager, string isoPath, string mountFolder)
{
linuxIsoManager = isoManager;
IsoPath = isoPath;
MountedPath = mountFolder;
}
#endregion
#region Interface Implementation for IDisposable
// Flag: Has Dispose already been called?
private bool disposed = false;
public void Dispose()
{
// Dispose of unmanaged resources.
Dispose(true);
// Suppress finalization.
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposed)
{
return;
}
if (disposing)
{
//
// Free managed objects here.
//
linuxIsoManager.OnUnmount(this);
}
//
// Free any unmanaged objects here.
//
disposed = true;
}
#endregion
#region Interface Implementation for IIsoMount
public string IsoPath { get; private set; }
public string MountedPath { get; private set; }
#endregion
}
}

View File

@@ -1,30 +0,0 @@
using System;
using IsoMounter.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Serialization;
namespace IsoMounter
{
public class Plugin : BasePlugin<PluginConfiguration>
{
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) : base(applicationPaths, xmlSerializer)
{
}
private Guid _id = new Guid("4682DD4C-A675-4F1B-8E7C-79ADF137A8F8");
public override Guid Id => _id;
/// <summary>
/// Gets the name of the plugin
/// </summary>
/// <value>The name.</value>
public override string Name => "Iso Mounter";
/// <summary>
/// Gets the description.
/// </summary>
/// <value>The description.</value>
public override string Description => "Mount and stream ISO contents";
}
}

View File

@@ -1,21 +0,0 @@
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
// 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("IsoMounter")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[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")]
// 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)]

View File

@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -1,14 +0,0 @@
# MediaBrowser.IsoMounting.Linux
This implements two core interfaces, IIsoManager, and IIsoMount.
### IIsoManager
The manager class can be used to create a mount, and also determine if the mounter is capable of mounting a given file.
### IIsoMount
IIsoMount then represents a mount instance, which will be unmounted on disposal.
***
This Linux version use sudo, mount and umount.
You need to add this to your sudo file via visudo(change the username):
Defaults:jsmith !requiretty
jsmith ALL=(root) NOPASSWD: /bin/mount
jsmith ALL=(root) NOPASSWD: /bin/umount

View File

@@ -33,27 +33,29 @@ namespace Emby.Naming.Audio
// Normalize
// Remove whitespace
filename = filename.Replace("-", " ");
filename = filename.Replace(".", " ");
filename = filename.Replace("(", " ");
filename = filename.Replace(")", " ");
filename = filename.Replace('-', ' ');
filename = filename.Replace('.', ' ');
filename = filename.Replace('(', ' ');
filename = filename.Replace(')', ' ');
filename = Regex.Replace(filename, @"\s+", " ");
filename = filename.TrimStart();
foreach (var prefix in _options.AlbumStackingPrefixes)
{
if (filename.IndexOf(prefix, StringComparison.OrdinalIgnoreCase) == 0)
if (filename.IndexOf(prefix, StringComparison.OrdinalIgnoreCase) != 0)
{
var tmp = filename.Substring(prefix.Length);
continue;
}
tmp = tmp.Trim().Split(' ').FirstOrDefault() ?? string.Empty;
var tmp = filename.Substring(prefix.Length);
if (int.TryParse(tmp, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val))
{
result.IsMultiPart = true;
break;
}
tmp = tmp.Trim().Split(' ').FirstOrDefault() ?? string.Empty;
if (int.TryParse(tmp, NumberStyles.Integer, CultureInfo.InvariantCulture, out _))
{
result.IsMultiPart = true;
break;
}
}

View File

@@ -7,11 +7,13 @@ namespace Emby.Naming.Audio
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the part.
/// </summary>
/// <value>The part.</value>
public string Part { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is multi part.
/// </summary>

View File

@@ -12,35 +12,56 @@ namespace Emby.Naming.AudioBook
/// </summary>
/// <value>The path.</value>
public string Path { get; set; }
/// <summary>
/// Gets or sets the container.
/// </summary>
/// <value>The container.</value>
public string Container { get; set; }
/// <summary>
/// Gets or sets the part number.
/// </summary>
/// <value>The part number.</value>
public int? PartNumber { get; set; }
/// <summary>
/// Gets or sets the chapter number.
/// </summary>
/// <value>The chapter number.</value>
public int? ChapterNumber { get; set; }
/// <summary>
/// Gets or sets the type.
/// </summary>
/// <value>The type.</value>
public bool IsDirectory { get; set; }
/// <inheritdoc/>
public int CompareTo(AudioBookFileInfo other)
{
if (ReferenceEquals(this, other)) return 0;
if (ReferenceEquals(null, other)) return 1;
if (ReferenceEquals(this, other))
{
return 0;
}
if (ReferenceEquals(null, other))
{
return 1;
}
var chapterNumberComparison = Nullable.Compare(ChapterNumber, other.ChapterNumber);
if (chapterNumberComparison != 0) return chapterNumberComparison;
if (chapterNumberComparison != 0)
{
return chapterNumberComparison;
}
var partNumberComparison = Nullable.Compare(PartNumber, other.PartNumber);
if (partNumberComparison != 0) return partNumberComparison;
if (partNumberComparison != 0)
{
return partNumberComparison;
}
return string.Compare(Path, other.Path, StringComparison.Ordinal);
}
}

View File

@@ -1,3 +1,4 @@
using System;
using System.Globalization;
using System.IO;
using System.Text.RegularExpressions;
@@ -14,14 +15,13 @@ namespace Emby.Naming.AudioBook
_options = options;
}
public AudioBookFilePathParserResult Parse(string path, bool IsDirectory)
public AudioBookFilePathParserResult Parse(string path)
{
var result = Parse(path);
return !result.Success ? new AudioBookFilePathParserResult() : result;
}
if (path == null)
{
throw new ArgumentNullException(nameof(path));
}
private AudioBookFilePathParserResult Parse(string path)
{
var result = new AudioBookFilePathParserResult();
var fileName = Path.GetFileNameWithoutExtension(path);
foreach (var expression in _options.AudioBookPartsExpressions)
@@ -40,6 +40,7 @@ namespace Emby.Naming.AudioBook
}
}
}
if (!result.PartNumber.HasValue)
{
var value = match.Groups["part"];

View File

@@ -3,7 +3,9 @@ namespace Emby.Naming.AudioBook
public class AudioBookFilePathParserResult
{
public int? PartNumber { get; set; }
public int? ChapterNumber { get; set; }
public bool Success { get; set; }
}
}

View File

@@ -7,33 +7,40 @@ namespace Emby.Naming.AudioBook
/// </summary>
public class AudioBookInfo
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
public int? Year { get; set; }
/// <summary>
/// Gets or sets the files.
/// </summary>
/// <value>The files.</value>
public List<AudioBookFileInfo> Files { get; set; }
/// <summary>
/// Gets or sets the extras.
/// </summary>
/// <value>The extras.</value>
public List<AudioBookFileInfo> Extras { get; set; }
/// <summary>
/// Gets or sets the alternate versions.
/// </summary>
/// <value>The alternate versions.</value>
public List<AudioBookFileInfo> AlternateVersions { get; set; }
public AudioBookInfo()
{
Files = new List<AudioBookFileInfo>();
Extras = new List<AudioBookFileInfo>();
AlternateVersions = new List<AudioBookFileInfo>();
}
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the year.
/// </summary>
public int? Year { get; set; }
/// <summary>
/// Gets or sets the files.
/// </summary>
/// <value>The files.</value>
public List<AudioBookFileInfo> Files { get; set; }
/// <summary>
/// Gets or sets the extras.
/// </summary>
/// <value>The extras.</value>
public List<AudioBookFileInfo> Extras { get; set; }
/// <summary>
/// Gets or sets the alternate versions.
/// </summary>
/// <value>The alternate versions.</value>
public List<AudioBookFileInfo> AlternateVersions { get; set; }
}
}

View File

@@ -15,7 +15,7 @@ namespace Emby.Naming.AudioBook
_options = options;
}
public IEnumerable<AudioBookInfo> Resolve(List<FileSystemMetadata> files)
public IEnumerable<AudioBookInfo> Resolve(IEnumerable<FileSystemMetadata> files)
{
var audioBookResolver = new AudioBookResolver(_options);

View File

@@ -24,19 +24,21 @@ namespace Emby.Naming.AudioBook
return Resolve(path, true);
}
public AudioBookFileInfo Resolve(string path, bool IsDirectory = false)
public AudioBookFileInfo Resolve(string path, bool isDirectory = false)
{
if (string.IsNullOrEmpty(path))
{
throw new ArgumentNullException(nameof(path));
}
if (IsDirectory) // TODO
// TODO
if (isDirectory)
{
return null;
}
var extension = Path.GetExtension(path);
// Check supported extensions
if (!_options.AudioFileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase))
{
@@ -45,8 +47,7 @@ namespace Emby.Naming.AudioBook
var container = extension.TrimStart('.');
var parsingResult = new AudioBookFilePathParser(_options)
.Parse(path, IsDirectory);
var parsingResult = new AudioBookFilePathParser(_options).Parse(path);
return new AudioBookFileInfo
{
@@ -54,7 +55,7 @@ namespace Emby.Naming.AudioBook
Container = container,
PartNumber = parsingResult.PartNumber,
ChapterNumber = parsingResult.ChapterNumber,
IsDirectory = IsDirectory
IsDirectory = isDirectory
};
}
}

View File

@@ -6,17 +6,28 @@ namespace Emby.Naming.Common
public class EpisodeExpression
{
private string _expression;
public string Expression { get => _expression;
set { _expression = value; _regex = null; } }
private Regex _regex;
public string Expression
{
get => _expression;
set
{
_expression = value;
_regex = null;
}
}
public bool IsByDate { get; set; }
public bool IsOptimistic { get; set; }
public bool IsNamed { get; set; }
public bool SupportsAbsoluteEpisodeNumbers { get; set; }
public string[] DateTimeFormats { get; set; }
private Regex _regex;
public Regex Regex => _regex ?? (_regex = new Regex(Expression, RegexOptions.IgnoreCase | RegexOptions.Compiled));
public EpisodeExpression(string expression, bool byDate)

View File

@@ -6,10 +6,12 @@ namespace Emby.Naming.Common
/// The audio
/// </summary>
Audio = 0,
/// <summary>
/// The photo
/// </summary>
Photo = 1,
/// <summary>
/// The video
/// </summary>

View File

@@ -8,19 +8,25 @@ namespace Emby.Naming.Common
public class NamingOptions
{
public string[] AudioFileExtensions { get; set; }
public string[] AlbumStackingPrefixes { get; set; }
public string[] SubtitleFileExtensions { get; set; }
public char[] SubtitleFlagDelimiters { get; set; }
public string[] SubtitleForcedFlags { get; set; }
public string[] SubtitleDefaultFlags { get; set; }
public EpisodeExpression[] EpisodeExpressions { get; set; }
public string[] EpisodeWithoutSeasonExpressions { get; set; }
public string[] EpisodeMultiPartExpressions { get; set; }
public string[] VideoFileExtensions { get; set; }
public string[] StubFileExtensions { get; set; }
public string[] AudioBookPartsExpressions { get; set; }
@@ -28,12 +34,14 @@ namespace Emby.Naming.Common
public StubTypeRule[] StubTypes { get; set; }
public char[] VideoFlagDelimiters { get; set; }
public Format3DRule[] Format3DRules { get; set; }
public string[] VideoFileStackingExpressions { get; set; }
public string[] CleanDateTimes { get; set; }
public string[] CleanStrings { get; set; }
public string[] CleanDateTimes { get; set; }
public string[] CleanStrings { get; set; }
public EpisodeExpression[] MultipleEpisodeExpressions { get; set; }
@@ -41,7 +49,7 @@ namespace Emby.Naming.Common
public NamingOptions()
{
VideoFileExtensions = new string[]
VideoFileExtensions = new[]
{
".m4v",
".3gp",
@@ -106,53 +114,53 @@ namespace Emby.Naming.Common
{
new StubTypeRule
{
StubType = "dvd",
Token = "dvd"
StubType = "dvd",
Token = "dvd"
},
new StubTypeRule
{
StubType = "hddvd",
Token = "hddvd"
StubType = "hddvd",
Token = "hddvd"
},
new StubTypeRule
{
StubType = "bluray",
Token = "bluray"
StubType = "bluray",
Token = "bluray"
},
new StubTypeRule
{
StubType = "bluray",
Token = "brrip"
StubType = "bluray",
Token = "brrip"
},
new StubTypeRule
{
StubType = "bluray",
Token = "bd25"
StubType = "bluray",
Token = "bd25"
},
new StubTypeRule
{
StubType = "bluray",
Token = "bd50"
StubType = "bluray",
Token = "bd50"
},
new StubTypeRule
{
StubType = "vhs",
Token = "vhs"
StubType = "vhs",
Token = "vhs"
},
new StubTypeRule
{
StubType = "tv",
Token = "HDTV"
StubType = "tv",
Token = "HDTV"
},
new StubTypeRule
{
StubType = "tv",
Token = "PDTV"
StubType = "tv",
Token = "PDTV"
},
new StubTypeRule
{
StubType = "tv",
Token = "DSR"
StubType = "tv",
Token = "DSR"
}
};
@@ -286,7 +294,7 @@ namespace Emby.Naming.Common
new EpisodeExpression(@"[\._ -]()[Ee][Pp]_?([0-9]+)([^\\/]*)$"),
new EpisodeExpression("([0-9]{4})[\\.-]([0-9]{2})[\\.-]([0-9]{2})", true)
{
DateTimeFormats = new []
DateTimeFormats = new[]
{
"yyyy.MM.dd",
"yyyy-MM-dd",
@@ -295,7 +303,7 @@ namespace Emby.Naming.Common
},
new EpisodeExpression("([0-9]{2})[\\.-]([0-9]{2})[\\.-]([0-9]{4})", true)
{
DateTimeFormats = new []
DateTimeFormats = new[]
{
"dd.MM.yyyy",
"dd-MM-yyyy",
@@ -348,9 +356,7 @@ namespace Emby.Naming.Common
},
// "1-12 episode title"
new EpisodeExpression(@"([0-9]+)-([0-9]+)")
{
},
new EpisodeExpression(@"([0-9]+)-([0-9]+)"),
// "01 - blah.avi", "01-blah.avi"
new EpisodeExpression(@".*(\\|\/)(?<epnumber>\d{1,3})(-(?<endingepnumber>\d{2,3}))*\s?-\s?[^\\\/]*$")
@@ -427,7 +433,7 @@ namespace Emby.Naming.Common
Token = "_trailer",
MediaType = MediaType.Video
},
new ExtraRule
new ExtraRule
{
ExtraType = "trailer",
RuleType = ExtraRuleType.Suffix,
@@ -462,7 +468,7 @@ namespace Emby.Naming.Common
Token = "_sample",
MediaType = MediaType.Video
},
new ExtraRule
new ExtraRule
{
ExtraType = "sample",
RuleType = ExtraRuleType.Suffix,
@@ -476,7 +482,6 @@ namespace Emby.Naming.Common
Token = "theme",
MediaType = MediaType.Audio
},
new ExtraRule
{
ExtraType = "scene",
@@ -526,8 +531,8 @@ namespace Emby.Naming.Common
Token = "-short",
MediaType = MediaType.Video
}
};
Format3DRules = new[]
{
// Kodi rules:
@@ -648,12 +653,10 @@ namespace Emby.Naming.Common
@".*(\\|\/)(?<seriesname>((?![sS]?\d{1,4}[xX]\d{1,3})[^\\\/])*)?([sS]?(?<seasonnumber>\d{1,4})[xX](?<epnumber>\d{1,3}))(-[xX]?[eE]?(?<endingepnumber>\d{1,3}))+[^\\\/]*$",
@".*(\\|\/)(?<seriesname>[^\\\/]*)[sS](?<seasonnumber>\d{1,4})[xX\.]?[eE](?<epnumber>\d{1,3})((-| - )?[xXeE](?<endingepnumber>\d{1,3}))+[^\\\/]*$",
@".*(\\|\/)(?<seriesname>[^\\\/]*)[sS](?<seasonnumber>\d{1,4})[xX\.]?[eE](?<epnumber>\d{1,3})(-[xX]?[eE]?(?<endingepnumber>\d{1,3}))+[^\\\/]*$"
}.Select(i => new EpisodeExpression(i)
{
IsNamed = true
}).ToArray();
{
IsNamed = true
}).ToArray();
VideoFileExtensions = extensions
.Distinct(StringComparer.OrdinalIgnoreCase)

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
@@ -10,7 +10,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj" />
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
</ItemGroup>
<PropertyGroup>
@@ -18,6 +18,18 @@
<PackageId>Jellyfin.Naming</PackageId>
<PackageLicenseUrl>https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt</PackageLicenseUrl>
<RepositoryUrl>https://github.com/jellyfin/jellyfin</RepositoryUrl>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<!-- Code analysers-->
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
</Project>

View File

@@ -5,6 +5,7 @@ namespace Emby.Naming.Extensions
{
public static class StringExtensions
{
// TODO: @bond remove this when moving to netstandard2.1
public static string Replace(this string str, string oldValue, string newValue, StringComparison comparison)
{
var sb = new StringBuilder();

View File

@@ -9,8 +9,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[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: AssemblyProduct("Jellyfin Server")]
[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]

View File

@@ -1,30 +0,0 @@
using System;
using System.Text;
namespace Emby.Naming
{
internal static class StringExtensions
{
public static string Replace(this string str, string oldValue, string newValue, StringComparison comparison)
{
var sb = new StringBuilder();
var previousIndex = 0;
var index = str.IndexOf(oldValue, comparison);
while (index != -1)
{
sb.Append(str.Substring(previousIndex, index - previousIndex));
sb.Append(newValue);
index += oldValue.Length;
previousIndex = index;
index = str.IndexOf(oldValue, index, comparison);
}
sb.Append(str.Substring(previousIndex));
return sb.ToString();
}
}
}

View File

@@ -7,16 +7,19 @@ namespace Emby.Naming.Subtitles
/// </summary>
/// <value>The path.</value>
public string Path { get; set; }
/// <summary>
/// Gets or sets the language.
/// </summary>
/// <value>The language.</value>
public string Language { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is default.
/// </summary>
/// <value><c>true</c> if this instance is default; otherwise, <c>false</c>.</value>
public bool IsDefault { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is forced.
/// </summary>

View File

@@ -7,31 +7,37 @@ namespace Emby.Naming.TV
/// </summary>
/// <value>The path.</value>
public string Path { get; set; }
/// <summary>
/// Gets or sets the container.
/// </summary>
/// <value>The container.</value>
public string Container { get; set; }
/// <summary>
/// Gets or sets the name of the series.
/// </summary>
/// <value>The name of the series.</value>
public string SeriesName { get; set; }
/// <summary>
/// Gets or sets the format3 d.
/// </summary>
/// <value>The format3 d.</value>
public string Format3D { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [is3 d].
/// </summary>
/// <value><c>true</c> if [is3 d]; otherwise, <c>false</c>.</value>
public bool Is3D { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is stub.
/// </summary>
/// <value><c>true</c> if this instance is stub; otherwise, <c>false</c>.</value>
public bool IsStub { get; set; }
/// <summary>
/// Gets or sets the type of the stub.
/// </summary>
@@ -39,12 +45,17 @@ namespace Emby.Naming.TV
public string StubType { get; set; }
public int? SeasonNumber { get; set; }
public int? EpisodeNumber { get; set; }
public int? EndingEpsiodeNumber { get; set; }
public int? Year { get; set; }
public int? Month { get; set; }
public int? Day { get; set; }
public bool IsByDate { get; set; }
}
}

View File

@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using Emby.Naming.Common;
namespace Emby.Naming.TV
@@ -16,38 +15,34 @@ namespace Emby.Naming.TV
_options = options;
}
public EpisodePathParserResult Parse(string path, bool IsDirectory, bool? isNamed = null, bool? isOptimistic = null, bool? supportsAbsoluteNumbers = null, bool fillExtendedInfo = true)
public EpisodePathParserResult Parse(string path, bool isDirectory, bool? isNamed = null, bool? isOptimistic = null, bool? supportsAbsoluteNumbers = null, bool fillExtendedInfo = true)
{
// Added to be able to use regex patterns which require a file extension.
// There were no failed tests without this block, but to be safe, we can keep it until
// the regex which require file extensions are modified so that they don't need them.
if (IsDirectory)
if (isDirectory)
{
path += ".mp4";
}
EpisodePathParserResult result = null;
foreach (var expression in _options.EpisodeExpressions)
{
if (supportsAbsoluteNumbers.HasValue)
if (supportsAbsoluteNumbers.HasValue
&& expression.SupportsAbsoluteEpisodeNumbers != supportsAbsoluteNumbers.Value)
{
if (expression.SupportsAbsoluteEpisodeNumbers != supportsAbsoluteNumbers.Value)
{
continue;
}
continue;
}
if (isNamed.HasValue)
if (isNamed.HasValue && expression.IsNamed != isNamed.Value)
{
if (expression.IsNamed != isNamed.Value)
{
continue;
}
continue;
}
if (isOptimistic.HasValue)
if (isOptimistic.HasValue && expression.IsOptimistic != isOptimistic.Value)
{
if (expression.IsOptimistic != isOptimistic.Value)
{
continue;
}
continue;
}
var currentResult = Parse(path, expression);
@@ -94,7 +89,8 @@ namespace Emby.Naming.TV
DateTime date;
if (expression.DateTimeFormats.Length > 0)
{
if (DateTime.TryParseExact(match.Groups[0].Value,
if (DateTime.TryParseExact(
match.Groups[0].Value,
expression.DateTimeFormats,
CultureInfo.InvariantCulture,
DateTimeStyles.None,
@@ -106,15 +102,12 @@ namespace Emby.Naming.TV
result.Success = true;
}
}
else
else if (DateTime.TryParse(match.Groups[0].Value, out date))
{
if (DateTime.TryParse(match.Groups[0].Value, out date))
{
result.Year = date.Year;
result.Month = date.Month;
result.Day = date.Day;
result.Success = true;
}
result.Year = date.Year;
result.Month = date.Month;
result.Day = date.Day;
result.Success = true;
}
// TODO: Only consider success if date successfully parsed?
@@ -139,7 +132,8 @@ namespace Emby.Naming.TV
// or a 'p' or 'i' as what you would get with a pixel resolution specification.
// It avoids erroneous parsing of something like "series-s09e14-1080p.mkv" as a multi-episode from E14 to E108
int nextIndex = endingNumberGroup.Index + endingNumberGroup.Length;
if (nextIndex >= name.Length || "0123456789iIpP".IndexOf(name[nextIndex]) == -1)
if (nextIndex >= name.Length
|| "0123456789iIpP".IndexOf(name[nextIndex]) == -1)
{
if (int.TryParse(endingNumberGroup.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out num))
{
@@ -157,6 +151,7 @@ namespace Emby.Naming.TV
{
result.SeasonNumber = num;
}
if (int.TryParse(match.Groups[2].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out num))
{
result.EpisodeNumber = num;
@@ -168,8 +163,11 @@ namespace Emby.Naming.TV
// Invalidate match when the season is 200 through 1927 or above 2500
// because it is an error unless the TV show is intentionally using false season numbers.
// It avoids erroneous parsing of something like "Series Special (1920x1080).mkv" as being season 1920 episode 1080.
if (result.SeasonNumber >= 200 && result.SeasonNumber < 1928 || result.SeasonNumber > 2500)
if ((result.SeasonNumber >= 200 && result.SeasonNumber < 1928)
|| result.SeasonNumber > 2500)
{
result.Success = false;
}
result.IsByDate = expression.IsByDate;
}
@@ -191,13 +189,20 @@ namespace Emby.Naming.TV
private void FillAdditional(string path, EpisodePathParserResult info, IEnumerable<EpisodeExpression> expressions)
{
var results = expressions
.Where(i => i.IsNamed)
.Select(i => Parse(path, i))
.Where(i => i.Success);
foreach (var result in results)
foreach (var i in expressions)
{
if (!i.IsNamed)
{
continue;
}
var result = Parse(path, i);
if (!result.Success)
{
continue;
}
if (string.IsNullOrEmpty(info.SeriesName))
{
info.SeriesName = result.SeriesName;
@@ -208,12 +213,10 @@ namespace Emby.Naming.TV
info.EndingEpsiodeNumber = result.EndingEpsiodeNumber;
}
if (!string.IsNullOrEmpty(info.SeriesName))
if (!string.IsNullOrEmpty(info.SeriesName)
&& (!info.EpisodeNumber.HasValue || info.EndingEpsiodeNumber.HasValue))
{
if (!info.EpisodeNumber.HasValue || info.EndingEpsiodeNumber.HasValue)
{
break;
}
break;
}
}
}

View File

@@ -3,14 +3,21 @@ namespace Emby.Naming.TV
public class EpisodePathParserResult
{
public int? SeasonNumber { get; set; }
public int? EpisodeNumber { get; set; }
public int? EndingEpsiodeNumber { get; set; }
public string SeriesName { get; set; }
public bool Success { get; set; }
public bool IsByDate { get; set; }
public int? Year { get; set; }
public int? Month { get; set; }
public int? Day { get; set; }
}
}

View File

@@ -15,7 +15,13 @@ namespace Emby.Naming.TV
_options = options;
}
public EpisodeInfo Resolve(string path, bool IsDirectory, bool? isNamed = null, bool? isOptimistic = null, bool? supportsAbsoluteNumbers = null, bool fillExtendedInfo = true)
public EpisodeInfo Resolve(
string path,
bool isDirectory,
bool? isNamed = null,
bool? isOptimistic = null,
bool? supportsAbsoluteNumbers = null,
bool fillExtendedInfo = true)
{
if (string.IsNullOrEmpty(path))
{
@@ -26,7 +32,7 @@ namespace Emby.Naming.TV
string container = null;
string stubType = null;
if (!IsDirectory)
if (!isDirectory)
{
var extension = Path.GetExtension(path);
// Check supported extensions
@@ -52,7 +58,7 @@ namespace Emby.Naming.TV
var format3DResult = new Format3DParser(_options).Parse(flags);
var parsingResult = new EpisodePathParser(_options)
.Parse(path, IsDirectory, isNamed, isOptimistic, supportsAbsoluteNumbers, fillExtendedInfo);
.Parse(path, isDirectory, isNamed, isOptimistic, supportsAbsoluteNumbers, fillExtendedInfo);
return new EpisodeInfo
{

View File

@@ -3,30 +3,24 @@ using System.Globalization;
using System.IO;
using System.Linq;
using Emby.Naming.Common;
using Emby.Naming.Extensions;
namespace Emby.Naming.TV
{
public class SeasonPathParser
{
private readonly NamingOptions _options;
public SeasonPathParser(NamingOptions options)
{
_options = options;
}
public SeasonPathParserResult Parse(string path, bool supportSpecialAliases, bool supportNumericSeasonFolders)
{
var result = new SeasonPathParserResult();
var seasonNumberInfo = GetSeasonNumberFromPath(path, supportSpecialAliases, supportNumericSeasonFolders);
result.SeasonNumber = seasonNumberInfo.Item1;
result.SeasonNumber = seasonNumberInfo.seasonNumber;
if (result.SeasonNumber.HasValue)
{
result.Success = true;
result.IsSeasonFolder = seasonNumberInfo.Item2;
result.IsSeasonFolder = seasonNumberInfo.isSeasonFolder;
}
return result;
@@ -35,7 +29,7 @@ namespace Emby.Naming.TV
/// <summary>
/// A season folder must contain one of these somewhere in the name
/// </summary>
private static readonly string[] SeasonFolderNames =
private static readonly string[] _seasonFolderNames =
{
"season",
"sæson",
@@ -54,19 +48,23 @@ namespace Emby.Naming.TV
/// <param name="supportSpecialAliases">if set to <c>true</c> [support special aliases].</param>
/// <param name="supportNumericSeasonFolders">if set to <c>true</c> [support numeric season folders].</param>
/// <returns>System.Nullable{System.Int32}.</returns>
private Tuple<int?, bool> GetSeasonNumberFromPath(string path, bool supportSpecialAliases, bool supportNumericSeasonFolders)
private static (int? seasonNumber, bool isSeasonFolder) GetSeasonNumberFromPath(
string path,
bool supportSpecialAliases,
bool supportNumericSeasonFolders)
{
var filename = Path.GetFileName(path);
var filename = Path.GetFileName(path) ?? string.Empty;
if (supportSpecialAliases)
{
if (string.Equals(filename, "specials", StringComparison.OrdinalIgnoreCase))
{
return new Tuple<int?, bool>(0, true);
return (0, true);
}
if (string.Equals(filename, "extras", StringComparison.OrdinalIgnoreCase))
{
return new Tuple<int?, bool>(0, true);
return (0, true);
}
}
@@ -74,7 +72,7 @@ namespace Emby.Naming.TV
{
if (int.TryParse(filename, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val))
{
return new Tuple<int?, bool>(val, true);
return (val, true);
}
}
@@ -84,12 +82,12 @@ namespace Emby.Naming.TV
if (int.TryParse(testFilename, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val))
{
return new Tuple<int?, bool>(val, true);
return (val, true);
}
}
// Look for one of the season folder names
foreach (var name in SeasonFolderNames)
foreach (var name in _seasonFolderNames)
{
var index = filename.IndexOf(name, StringComparison.OrdinalIgnoreCase);
@@ -107,10 +105,10 @@ namespace Emby.Naming.TV
var parts = filename.Split(new[] { '.', '_', ' ', '-' }, StringSplitOptions.RemoveEmptyEntries);
var resultNumber = parts.Select(GetSeasonNumberFromPart).FirstOrDefault(i => i.HasValue);
return new Tuple<int?, bool>(resultNumber, true);
return (resultNumber, true);
}
private int? GetSeasonNumberFromPart(string part)
private static int? GetSeasonNumberFromPart(string part)
{
if (part.Length < 2 || !part.StartsWith("s", StringComparison.OrdinalIgnoreCase))
{
@@ -132,7 +130,7 @@ namespace Emby.Naming.TV
/// </summary>
/// <param name="path">The path.</param>
/// <returns>System.Nullable{System.Int32}.</returns>
private Tuple<int?, bool> GetSeasonNumberFromPathSubstring(string path)
private static (int? seasonNumber, bool isSeasonFolder) GetSeasonNumberFromPathSubstring(string path)
{
var numericStart = -1;
var length = 0;
@@ -174,10 +172,10 @@ namespace Emby.Naming.TV
if (numericStart == -1)
{
return new Tuple<int?, bool>(null, isSeasonFolder);
return (null, isSeasonFolder);
}
return new Tuple<int?, bool>(int.Parse(path.Substring(numericStart, length), CultureInfo.InvariantCulture), isSeasonFolder);
return (int.Parse(path.Substring(numericStart, length), CultureInfo.InvariantCulture), isSeasonFolder);
}
}
}

Some files were not shown because too many files have changed in this diff Show More