From 22093c9e8fe15691cca79795acc2616a8b7ec4ff Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Sat, 15 Dec 2018 19:53:09 +0100 Subject: [PATCH 1/9] Removed some warnings --- DvdLib/Ifo/ProgramChain.cs | 1 - Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs | 17 +++++++---------- Emby.IsoMounting/IsoMounter/LinuxMount.cs | 3 --- .../Library/LibraryManager.cs | 2 +- Mono.Nat/Pmp/PmpNatDevice.cs | 4 ++-- RSSDP/DiscoveredSsdpDevice.cs | 4 +--- RSSDP/SsdpDeviceLocator.cs | 4 ++-- RSSDP/SsdpDevicePublisher.cs | 4 ++-- SocketHttpListener/Net/HttpListenerContext.cs | 6 ------ .../Net/HttpListenerRequestUriBuilder.cs | 6 +++--- SocketHttpListener/WebSocket.cs | 8 ++++---- 11 files changed, 22 insertions(+), 37 deletions(-) diff --git a/DvdLib/Ifo/ProgramChain.cs b/DvdLib/Ifo/ProgramChain.cs index 57cb5d6bd0..6b4e5fa32f 100644 --- a/DvdLib/Ifo/ProgramChain.cs +++ b/DvdLib/Ifo/ProgramChain.cs @@ -35,7 +35,6 @@ namespace DvdLib.Ifo private ushort _goupProgramNumber; public readonly ProgramChain Goup; // ?? maybe Group - private byte _playbackMode; public ProgramPlaybackMode PlaybackMode { get; private set; } public uint ProgramCount { get; private set; } diff --git a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs index 12669d05d3..4716c64b20 100644 --- a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs +++ b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs @@ -144,24 +144,21 @@ namespace IsoMounter return Task.FromResult(false); } - public async Task Mount(string isoPath, CancellationToken cancellationToken) + public Task Mount(string isoPath, CancellationToken cancellationToken) { - LinuxMount mountedISO; - if (MountISO(isoPath, out mountedISO)) { - - return mountedISO; - - }else{ - + if (MountISO(isoPath, out mountedISO)) + { + return Task.FromResult(mountedISO); + } + else + { throw new IOException(String.Format( "An error occurred trying to mount image [$0].", isoPath )); - } - } #endregion diff --git a/Emby.IsoMounting/IsoMounter/LinuxMount.cs b/Emby.IsoMounting/IsoMounter/LinuxMount.cs index 8d1f56e395..9c60f9d0a8 100644 --- a/Emby.IsoMounting/IsoMounter/LinuxMount.cs +++ b/Emby.IsoMounting/IsoMounter/LinuxMount.cs @@ -1,8 +1,5 @@ using System; -using MediaBrowser.Model.Diagnostics; using MediaBrowser.Model.IO; -using MediaBrowser.Model.Logging; -using MediaBrowser.Model.System; namespace IsoMounter { diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 31af9370c7..17516d6b90 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -3179,4 +3179,4 @@ namespace Emby.Server.Implementations.Library CollectionFolder.SaveLibraryOptions(virtualFolderPath, libraryOptions); } } -} \ No newline at end of file +} diff --git a/Mono.Nat/Pmp/PmpNatDevice.cs b/Mono.Nat/Pmp/PmpNatDevice.cs index 2ef66fdbb6..bf27bfebcb 100644 --- a/Mono.Nat/Pmp/PmpNatDevice.cs +++ b/Mono.Nat/Pmp/PmpNatDevice.cs @@ -109,7 +109,7 @@ namespace Mono.Nat.Pmp if (attempt == 0) { - Task.Run(() => CreatePortMapListen(udpClient, mapping, cancellationTokenSource.Token)); + await Task.Run(() => CreatePortMapListen(udpClient, mapping, cancellationTokenSource.Token)); } attempt++; @@ -214,4 +214,4 @@ namespace Mono.Nat.Pmp this.localAddress, this.publicAddress, this.LastSeen); } } -} \ No newline at end of file +} diff --git a/RSSDP/DiscoveredSsdpDevice.cs b/RSSDP/DiscoveredSsdpDevice.cs index 66b8bea36a..7e70817ddf 100644 --- a/RSSDP/DiscoveredSsdpDevice.cs +++ b/RSSDP/DiscoveredSsdpDevice.cs @@ -17,7 +17,6 @@ namespace Rssdp #region Fields - private SsdpRootDevice _Device; private DateTimeOffset _AsAt; #endregion @@ -55,7 +54,6 @@ namespace Rssdp if (_AsAt != value) { _AsAt = value; - _Device = null; } } } @@ -93,4 +91,4 @@ namespace Rssdp #endregion } -} \ No newline at end of file +} diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs index 6a61a52f3e..32289822f9 100644 --- a/RSSDP/SsdpDeviceLocator.cs +++ b/RSSDP/SsdpDeviceLocator.cs @@ -124,7 +124,7 @@ namespace Rssdp.Infrastructure { await SearchAsync(CancellationToken.None).ConfigureAwait(false); } - catch (Exception ex) + catch (Exception) { } @@ -621,4 +621,4 @@ namespace Rssdp.Infrastructure #endregion } -} \ No newline at end of file +} diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index 8d57deb5ef..2646023e89 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -312,7 +312,7 @@ namespace Rssdp.Infrastructure { await _CommsServer.SendMessage(System.Text.Encoding.UTF8.GetBytes(message), endPoint, receivedOnlocalIpAddress, cancellationToken).ConfigureAwait(false); } - catch (Exception ex) + catch (Exception) { } @@ -558,4 +558,4 @@ namespace Rssdp.Infrastructure } } } -} \ No newline at end of file +} diff --git a/SocketHttpListener/Net/HttpListenerContext.cs b/SocketHttpListener/Net/HttpListenerContext.cs index f4679568a3..b90f075671 100644 --- a/SocketHttpListener/Net/HttpListenerContext.cs +++ b/SocketHttpListener/Net/HttpListenerContext.cs @@ -1,19 +1,13 @@ using System; using System.Net; using System.Security.Principal; -using MediaBrowser.Model.Cryptography; -using MediaBrowser.Model.IO; -using MediaBrowser.Model.Logging; -using MediaBrowser.Model.Text; using SocketHttpListener.Net.WebSockets; -using SocketHttpListener.Primitives; using System.Threading.Tasks; namespace SocketHttpListener.Net { public sealed unsafe partial class HttpListenerContext { - internal HttpListener _listener; private HttpListenerResponse _response; private IPrincipal _user; diff --git a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs index e61bde32e3..34b5eaf74b 100644 --- a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs +++ b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs @@ -253,7 +253,7 @@ namespace SocketHttpListener.Net //if (NetEventSource.IsEnabled) // NetEventSource.Error(this, SR.Format(SR.net_log_listener_cant_convert_percent_value, codePoint)); } - catch (EncoderFallbackException e) + catch (EncoderFallbackException) { // If utf8Encoding.GetBytes() fails //if (NetEventSource.IsEnabled) NetEventSource.Error(this, SR.Format(SR.net_log_listener_cant_convert_to_utf8, unicodeString, e.Message)); @@ -303,11 +303,11 @@ namespace SocketHttpListener.Net return true; } - catch (DecoderFallbackException e) + catch (DecoderFallbackException) { //if (NetEventSource.IsEnabled) NetEventSource.Error(this, SR.Format(SR.net_log_listener_cant_convert_bytes, GetOctetsAsString(_rawOctets), e.Message)); } - catch (EncoderFallbackException e) + catch (EncoderFallbackException) { // If utf8Encoding.GetBytes() fails //if (NetEventSource.IsEnabled) NetEventSource.Error(this, SR.Format(SR.net_log_listener_cant_convert_to_utf8, decodedString, e.Message)); diff --git a/SocketHttpListener/WebSocket.cs b/SocketHttpListener/WebSocket.cs index 385b25aed6..fd0c3e5bff 100644 --- a/SocketHttpListener/WebSocket.cs +++ b/SocketHttpListener/WebSocket.cs @@ -299,7 +299,7 @@ namespace SocketHttpListener } OnError.Emit(this, new ErrorEventArgs(message)); } - catch (Exception ex) + catch (Exception) { } } @@ -310,7 +310,7 @@ namespace SocketHttpListener { OnError.Emit(this, new ErrorEventArgs(message)); } - catch (Exception ex) + catch (Exception) { } } @@ -423,7 +423,7 @@ namespace SocketHttpListener private bool processPingFrame(WebSocketFrame frame) { - var mask = Mask.Unmask; + //var mask = Mask.Unmask; return true; } @@ -796,4 +796,4 @@ namespace SocketHttpListener #endregion } -} \ No newline at end of file +} From cb8cd1ff55d86317032365df0b6730815d8a8243 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Sun, 16 Dec 2018 00:48:40 +0100 Subject: [PATCH 2/9] Log exception where possible --- Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs | 8 ++------ RSSDP/SsdpDevicePublisher.cs | 9 +++++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs index 4716c64b20..620d3bae9e 100644 --- a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs +++ b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs @@ -146,14 +146,10 @@ namespace IsoMounter public Task Mount(string isoPath, CancellationToken cancellationToken) { - LinuxMount mountedISO; - - if (MountISO(isoPath, out mountedISO)) - { + if (MountISO(isoPath, out LinuxMount mountedISO)) { return Task.FromResult(mountedISO); } - else - { + else { throw new IOException(String.Format( "An error occurred trying to mount image [$0].", isoPath diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index 2646023e89..cee9b7f911 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -310,11 +310,16 @@ namespace Rssdp.Infrastructure try { - await _CommsServer.SendMessage(System.Text.Encoding.UTF8.GetBytes(message), endPoint, receivedOnlocalIpAddress, cancellationToken).ConfigureAwait(false); + await _CommsServer.SendMessage( + System.Text.Encoding.UTF8.GetBytes(message), + endPoint, + receivedOnlocalIpAddress, + cancellationToken) + .ConfigureAwait(false); } catch (Exception) { - + } //WriteTrace(String.Format("Sent search response to " + endPoint.ToString()), device); From 060d2f1b19c0f6256b84c79ca14596e032ff744f Mon Sep 17 00:00:00 2001 From: Anthony Lavado Date: Mon, 17 Dec 2018 03:10:15 -0500 Subject: [PATCH 3/9] Complete overhaul of README - Moves all build/package information to Wiki - Adds new badges for quick info - Adds new styles, and looks good on mobile --- README.md | 109 ++++++++++++++++++++++-------------------------------- 1 file changed, 44 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 1a19df56c3..51a6d5db28 100644 --- a/README.md +++ b/README.md @@ -1,76 +1,55 @@ -Jellyfin -============ +

Jellyfin

+

The Free Software Media System

-Jellyfin is a personal media server. The Jellyfin project was started as a result of Emby's decision to take their code closed-source, as well as various philosophical differences with the core developers. Jellyfin seeks to be the free software alternative to Emby and Plex to provide media management and streaming from a dedicated server to end-user devices. +

+Jellyfin is a free software media system that puts you in control of managing and streaming your media. +

+ +----- + +

+Want to get started? Choose from Prebuilt Packages, or Build from Source. +

+

+Want to contribute? Check out our wiki for guidelines. +

+ +--- + +

+GPL 2.0 License +Build Status +Docker Pull Count +Chat on Matrix +Join our Subreddit +

+ +For further details, please see [our wiki](https://github.com/jellyfin/jellyfin/wiki). + +To receive the latest project updates feel free to join [our public chat on Matrix/Riot](https://matrix.to/#/#jellyfin:matrix.org), and follow us on [Social Media](https://github.com/jellyfin/jellyfin/wiki/Social-Media). + +## About + +The Jellyfin project was started as a result of Emby's decision to take their code closed-source, as well as various philosophical differences with the core developers. Jellyfin seeks to be the free software alternative to Emby and Plex to provide media management and streaming from a dedicated server to end-user devices. Jellyfin is descended from Emby 3.5.2, ported to the .NET Core framework, and aims to contain build facilities for every platform. -For further details, please see [our wiki](https://github.com/jellyfin/jellyfin/wiki). To receive the latest project updates feel free to join [our public chat on Matrix/Riot](https://matrix.to/#/#jellyfin:matrix.org) and to subscribe to [our subreddit](https://www.reddit.com/r/jellyfin/). +## Issues and Feature Requests -## Feature Requests -While our first priority is a stable build, we will eventually add features that were missing in Emby or were not well implemented (technically or philosophically). -[Feature Requests](http://feathub.com/jellyfin/jellyfin) +

+New idea or improvement? +
+Open a Feature Request. +

+

+Something not working right? +
+Open an Issue. +

+ ## Contributing to Jellyfin If you're interested in contributing, please see [our wiki for guidelines](https://github.com/jellyfin/jellyfin/wiki/Contributing-to-Jellyfin). - -## Prebuilt Jellyfin packages - -Prebuild packages are available for Debian/Ubuntu and Arch, and via Docker Hub. - -### Docker - -The Jellyfin Docker image is available on Docker Hub at https://hub.docker.com/r/jellyfin/jellyfin/ - -### Arch - -The Jellyfin package is in the AUR at https://aur.archlinux.org/packages/jellyfin-git/ - -### Unraid - -An Unraid Docker template is available. See [this documentation page](https://github.com/jellyfin/jellyfin/blob/master/unRaid/docker-templates/README.md) for details on installing it. - -### Debian/Ubuntu - -A package repository is available at https://repo.jellyfin.org. - -NOTE: Ubuntu users may find that the `ffmpeg` dependency package is not present in their release or is simply a rebranded `libav` which is not directly compatible. Please [obtain the ffmpeg package directly from the FFMPEG site](https://ffmpeg.org/download.html#build-linux) to use Jellyfin on Ubuntu. - -For instructions on using the repository, please see [our wiki](https://github.com/jellyfin/jellyfin/wiki/Jellyfin-Debian-repository). - -## Building Jellyfin packages from source - -Jellyfin seeks to integrate build facilities for any desired packaging format. Instructions for the various formats can be found below. - -NOTE: When building from source, only cloning the full Git repository is supported, rather than using a `.zip`/`.tar` archive, in order to support submodules. - -### Debian/Ubuntu - -Debian build facilities are integrated into the repo at `debian/`. - -0. Install the `dotnet-sdk-2.2` package via [Microsoft's repositories](https://dotnet.microsoft.com/download/dotnet-core/2.2). -0. Run `dpkg-buildpackage -us -uc`. -0. Install the resulting `jellyfin_*.deb` file on your system. - -A huge thanks to Carlos Hernandez who created the original Debian build configuration for Emby 3.1.1. - -### Windows (64 bit) - -A pre-built windows installer will be available soon. Until then it isn't too hard to install Jellyfin from Source. - -0. Install the dotnet core SDK 2.2 from [Microsoft's Webpage](https://dotnet.microsoft.com/download/dotnet-core/2.2) and [install Git for Windows](https://gitforwindows.org/) -0. Clone Jellyfin into a directory of your choice. - ``` - git clone https://github.com/jellyfin/jellyfin.git C:\Jellyfin - ``` -0. From the Jellyfin directory you can use our Jellyfin build script. Call `Build-Jellyfin.ps1 -InstallFFMPEG` from inside the directory in a powershell window. Make sure you've set your executionpolicy to unrestricted. - - Additional flags: - * If you want to optimize for your environment you can use the `-WindowsVersion` and `-Architecture` flags to do so; the default is generic Windows x64. - * The `-InstallLocation` flag lets you select where the compiled binaries go; the default is `$Env:AppData\JellyFin-Server\` . - * The `-InstallFFMPEG` flag will automatically pull the stable ffmpeg binaries appropriate to your architecture (x86/x64 only for now) from [Zeranoe](https://ffmpeg.zeranoe.com/builds/) and place them in your Jellyfin directory. -0. (Optional) Use [NSSM](https://nssm.cc/) to configure JellyFin to run as a service -0. Jellyfin is now available in the default directory (or the directory you chose). Assuming you kept the default directory, to start it from a Powershell window, run, `&"$env:APPDATA\Jellyfin-Server\EmbyServer.exe"`. To start it from CMD, run, `%APPDATA%\Jellyfin-Server\EmbyServer.exe` From 1a2153c3997f4624512182c747aec4ca0da1f5ed Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Mon, 17 Dec 2018 22:08:09 +0100 Subject: [PATCH 4/9] Update WebSocket.cs --- SocketHttpListener/WebSocket.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/SocketHttpListener/WebSocket.cs b/SocketHttpListener/WebSocket.cs index fd0c3e5bff..7d61850e60 100644 --- a/SocketHttpListener/WebSocket.cs +++ b/SocketHttpListener/WebSocket.cs @@ -423,8 +423,6 @@ namespace SocketHttpListener private bool processPingFrame(WebSocketFrame frame) { - //var mask = Mask.Unmask; - return true; } From e7d18ce11fb2f394931642f448420df09c0f2049 Mon Sep 17 00:00:00 2001 From: Anthony Lavado Date: Tue, 18 Dec 2018 18:09:40 -0500 Subject: [PATCH 5/9] Change formatting slightly Removed the line break in the Feature/Issue links, --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 51a6d5db28..2c5e422e01 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,11 @@ Jellyfin is descended from Emby 3.5.2, ported to the .NET Core framework, and ai

-New idea or improvement? -
+ New idea or improvement? Open a Feature Request.

-Something not working right? -
+ Something not working right? Open an Issue.

From ad8483bf1696cbc249e76e8c2d913d008d251764 Mon Sep 17 00:00:00 2001 From: Anthony Lavado Date: Tue, 18 Dec 2018 18:13:10 -0500 Subject: [PATCH 6/9] Add announce chat link As per @joshuaboniface, adding a link to the announce chat. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c5e422e01..af73ccd51d 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Jellyfin is a free software media system that puts you in control of managing an For further details, please see [our wiki](https://github.com/jellyfin/jellyfin/wiki). -To receive the latest project updates feel free to join [our public chat on Matrix/Riot](https://matrix.to/#/#jellyfin:matrix.org), and follow us on [Social Media](https://github.com/jellyfin/jellyfin/wiki/Social-Media). +To receive the latest updates, please visit [our public chat on Matrix/Riot](https://matrix.to/#/#jellyfin:matrix.org), our [announce chat](https://matrix.to/#/#jellyfin-announce:matrix.org) for release info, and follow us on [Social Media](https://github.com/jellyfin/jellyfin/wiki/Social-Media). ## About From def954e8da6fc7af6376109e60ba0c72d014e336 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Tue, 18 Dec 2018 20:08:34 -0500 Subject: [PATCH 7/9] Remove PUID and PGUID env vars Use Docker's built-in `user` option instead. Ex. `docker run --user 1000:1000 jellyfin/jellyfin` --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5147ffb9af..f5e3452250 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,10 @@ RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \ FROM microsoft/dotnet:${DOTNET_VERSION}-runtime COPY --from=builder /jellyfin /jellyfin -RUN apt update \ - && apt install -y ffmpeg gosu EXPOSE 8096 +RUN apt update \ + && apt install -y ffmpeg VOLUME /config /media -ENV PUID=1000 PGID=1000 -ENTRYPOINT chown $PUID:$PGID /config /media \ - && gosu $PUID:$PGID dotnet /jellyfin/jellyfin.dll -programdata /config +ENTRYPOINT if [ -n "$PUID$PGUID" ]; \ + then echo "PUID/PGID are deprecated. Use Docker user param." >&2; exit 1; \ + else dotnet /jellyfin/jellyfin.dll -programdata /config; fi From f50b22aac443614af48500bd3f7facd4b1c16602 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Thu, 20 Dec 2018 01:15:11 -0500 Subject: [PATCH 8/9] Add aarch64 image There is no 2 version of the dotnet image for aarch64. Need to use a 3 image for now. --- Dockerfile.aarch64 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile.aarch64 diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 new file mode 100644 index 0000000000..da4acc8412 --- /dev/null +++ b/Dockerfile.aarch64 @@ -0,0 +1,17 @@ +ARG DOTNET_VERSION=3.0 + +FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder +WORKDIR /repo +COPY . . +RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \ + && find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \; \ + && dotnet clean \ + && dotnet publish --configuration release --output /jellyfin + +FROM microsoft/dotnet:${DOTNET_VERSION}-runtime +COPY --from=builder /jellyfin /jellyfin +EXPOSE 8096 +RUN apt update \ + && apt install -y ffmpeg +VOLUME /config /media +ENTRYPOINT dotnet /jellyfin/jellyfin.dll -programdata /config From e1a24035b9012282274642391ffe7fb0a6dc4192 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Thu, 20 Dec 2018 18:32:15 -0500 Subject: [PATCH 9/9] Bump Debian packaging version --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index dbd489e8f0..e4176123d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +jellyfin (3.5.2-4) unstable; urgency=medium + + * Correct manifest.json bug and vdpau + + -- Joshua Boniface Thu, 20 Dec 2018 18:31:43 -0500 + jellyfin (3.5.2-3) unstable; urgency=medium * Correct several bugs in 3.5.2-2 packaging