forked from ShokoAnime/ShokoServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/japanesemediamanager/Shok…
- Loading branch information
Showing
124 changed files
with
5,996 additions
and
4,998 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM mono:5.2 | ||
|
||
#MAINTAINER Cayde Dixon <[email protected]> | ||
|
||
RUN curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | apt-key add - | ||
RUN echo "deb http://dl.bintray.com/cazzar/shoko-deps jesse main" | tee -a /etc/apt/sources.list | ||
|
||
RUN apt-get update && apt-get install -y --force-yes libmediainfo0 librhash0 sqlite.interop | ||
|
||
RUN mkdir -p /usr/src/app/source /usr/src/app/build | ||
COPY . /usr/src/app/source | ||
WORKDIR /usr/src/app/source | ||
|
||
ADD https://github.com/NuGet/Home/releases/download/3.3/NuGet.exe . | ||
RUN mono NuGet.exe restore | ||
RUN xbuild /property:Configuration=CLI /property:OutDir=/usr/src/app/build/ | ||
RUN rm -rf /usr/src/app/source | ||
RUN rm /usr/src/app/build/System.Net.Http.dll | ||
WORKDIR /usr/src/app/build | ||
|
||
VOLUME /root/.shoko/ | ||
VOLUME /usr/src/app/build/webui | ||
|
||
EXPOSE 8111 | ||
ENTRYPOINT mono Shoko.CLI.exe |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<configSections> | ||
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" /> | ||
</configSections> | ||
|
||
<appSettings> | ||
<add key="FirstRun" value="true" /> | ||
<add key="DatabaseType" value="SQLite" /> | ||
<add key="SQLServer_DatabaseServer" value="localhost" /> | ||
<add key="SQLServer_DatabaseName" value="" /> | ||
<add key="SQLServer_Username" value="" /> | ||
<add key="SQLServer_Password" value="" /> | ||
<add key="MySQL_Hostname" value="localhost" /> | ||
<add key="MySQL_SchemaName" value="" /> | ||
<add key="MySQL_Username" value="" /> | ||
<add key="MySQL_Password" value="" /> | ||
<add key="SQLite_DatabaseFile" value="" /> | ||
<add key="AniDB_Username" value="" /> | ||
<add key="AniDB_Password" value="" /> | ||
<add key="AniDB_ServerAddress" value="api.anidb.info" /> | ||
<add key="AniDB_ServerPort" value="9000" /> | ||
<add key="AniDB_ClientPort" value="4556" /> | ||
<add key="AniDB_AVDumpClientPort" value="4557" /> | ||
<add key="AniDB_AVDumpKey" value="" /> | ||
<add key="WebCache_Address" value="omm.hobbydb.net.leaf.arvixe.com" /> | ||
<add key="WebCache_Anonymous" value="false" /> | ||
<add key="WebCache_FileHashes_Get" value="true" /> | ||
<add key="WebCache_FileHashes_Send" value="true" /> | ||
<add key="WebCache_XRefFileEpisode_Get" value="true" /> | ||
<add key="WebCache_XRefFileEpisode_Send" value="true" /> | ||
<add key="WebCache_TvDB_Get" value="true" /> | ||
<add key="WebCache_TvDB_Send" value="false" /> | ||
<add key="TvDB_AutoFanart" value="true" /> | ||
<add key="TvDB_AutoFanartAmount" value="10" /> | ||
<add key="TvDB_AutoWideBanners" value="true" /> | ||
<add key="TvDB_AutoPosters" value="true" /> | ||
<add key="MovieDB_AutoFanart" value="true" /> | ||
<add key="MovieDB_AutoFanartAmount" value="10" /> | ||
<add key="MovieDB_AutoPosters" value="true" /> | ||
<add key="DefaultSeriesLanguage" value="1" /> | ||
<add key="AniDB_DownloadSimilarAnime" value="false" /> | ||
<add key="AniDB_DownloadCharactersCreators" value="false" /> | ||
<add key="AniDB_DownloadReviews" value="false" /> | ||
<add key="AniDB_DownloadReleaseGroups" value="false" /> | ||
<add key="AniDB_DownloadRelatedAnime" value="true" /> | ||
<add key="AniDB_MyList_AddFiles" value="true" /> | ||
<add key="AniDB_MyList_StorageState" value="2" /> | ||
<add key="AniDB_MyList_ReadWatched" value="true" /> | ||
<add key="AniDB_MyList_ReadUnwatched" value="true" /> | ||
<add key="AniDB_MyList_SetWatched" value="true" /> | ||
<add key="AniDB_MyList_SetUnwatched" value="true" /> | ||
<add key="DefaultEpisodeLanguage" value="1" /> | ||
<add key="VideoExtensions" value="MKV,AVI,MP4,MOV,OGM,WMV,MPG,MPEG,MK3D,M4V" /> | ||
<add key="WatchForNewFiles" value="true" /> | ||
<add key="RunImportOnStart" value="false" /> | ||
<add key="Hash_CRC32" value="false" /> | ||
<add key="Hash_MD5" value="false" /> | ||
<add key="Hash_SHA1" value="false" /> | ||
<add key="LanguagePreference" value="x-jat,en" /> | ||
<add key="LanguageUseSynonyms" value="true" /> | ||
<add key="ClientSettingsProvider.ServiceUri" value="" /> | ||
<add key="Import_UseExistingFileWatchedStatus" value="true" /> | ||
<add key="Trakt_Username" value="" /> | ||
<add key="Trakt_Password" value="" /> | ||
<add key="Culture" value="" /> | ||
</appSettings> | ||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<extensions> | ||
<add assembly="Shoko.Server" /> | ||
</extensions> | ||
<targets> | ||
<target name="file" xsi:type="File" fileName="${basedir}/logs/${shortdate}.txt" layout="[${shortdate} ${date:format=HH\:mm\:ss\:fff}] ${level}|${stacktrace} ${message}" /> | ||
<target name="console" xsi:type="ColoredConsole" layout="${date:format=HH\:mm\:ss}| --- ${message}" /> | ||
</targets> | ||
<rules> | ||
<logger name="*" minlevel="Info" writeTo="file" /> | ||
<logger name="*" minlevel="Trace" writeTo="console" /> | ||
</rules> | ||
</nlog> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> | ||
</startup> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.4000" newVersion="4.1.0.4000" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Diagnostics.Tracing" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Runtime.InteropServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.1" newVersion="4.1.1.1" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using Shoko.Server; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Shoko.Server.Commands; | ||
|
||
namespace Shoko.CLI | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
for (int x = 0; x < args.Length; x++) | ||
{ | ||
if (args[x].Equals("instance", StringComparison.InvariantCultureIgnoreCase)) | ||
{ | ||
if (x + 1 < args.Length) | ||
{ | ||
ServerSettings.DefaultInstance = args[x + 1]; | ||
} | ||
} | ||
} | ||
|
||
ServerSettings.LoadSettings(); | ||
ServerState.Instance.LoadSettings(); | ||
|
||
ShokoServer.Instance.StartUpServer(); | ||
|
||
ShokoServer.RunWorkSetupDB(); | ||
|
||
bool running = true; | ||
|
||
ShokoServer.Instance.ServerShutdown += (sender, eventArgs) => running = false; | ||
Utils.YesNoRequired += (sender, e) => | ||
{ | ||
e.Cancel = true; | ||
}; | ||
|
||
ShokoService.CmdProcessorGeneral.OnQueueStateChangedEvent += | ||
ev => Console.WriteLine($"Queue state change: {ev.QueueState.formatMessage()}"); | ||
|
||
while (running) | ||
{ | ||
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(60)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
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("Shoko.CLI")] | ||
|
||
// 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)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("3a8e0177-9701-4a59-a6cd-16c6908839ea")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{3A8E0177-9701-4A59-A6CD-16C6908839EA}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>Shoko.CLI</RootNamespace> | ||
<AssemblyName>Shoko.CLI</AssemblyName> | ||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\Shoko.Server\bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\Shoko.Server\bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="..\SharedAssemblyInfo.cs"> | ||
<Link>Properties\SharedAssemblyInfo.cs</Link> | ||
</Compile> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config"> | ||
<SubType>Designer</SubType> | ||
</None> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Shoko.Commons\Shoko.Commons.csproj"> | ||
<Project>{e0399140-9902-4f38-909d-85e42717ec30}</Project> | ||
<Name>Shoko.Commons</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Shoko.Commons\Shoko.Models\Shoko.Models.csproj"> | ||
<Project>{f73f9df6-580a-4341-b516-8717626f9d42}</Project> | ||
<Name>Shoko.Models</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Shoko.Server\Shoko.Server.csproj"> | ||
<Project>{da8f0783-0f82-4106-9860-6f09ba2ea522}</Project> | ||
<Name>Shoko.Server</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<WCFMetadata Include="Connected Services\" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
Oops, something went wrong.