Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Commit

Permalink
Deployable on Azure
Browse files Browse the repository at this point in the history
Other changes: Update to .NET Framework 4.6.2! Allow upgrades with Visual
Studio.
  • Loading branch information
Mygod committed Jan 8, 2017
1 parent 3138755 commit 42b9ff7
Show file tree
Hide file tree
Showing 27 changed files with 164 additions and 153 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ local.properties
*.dotCover
.vs/
*.pubxml
*.DotSettings

## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/
Expand Down Expand Up @@ -164,4 +165,8 @@ pip-log.txt
# Mac crap
.DS_Store

*.vshost.*
*.vshost.*

# Skylark
/Data/Site.privileges
/plugins/BackgroundRunner.*
6 changes: 3 additions & 3 deletions AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Mygod")]
[assembly: AssemblyProduct("Skylark")]
[assembly: AssemblyCopyright("Copyright (C) Mygod 2013-2014")]
[assembly: AssemblyCopyright("Copyright (C) Mygod 2013-2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -31,5 +31,5 @@
//
// 可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值,
// 方法是按如下所示使用“*”:
[assembly: AssemblyVersion("2.1.12.310")]
[assembly: AssemblyFileVersion("2.1.12.310")]
[assembly: AssemblyVersion("2.2.0.310")]
[assembly: AssemblyFileVersion("2.2.0.310")]
6 changes: 3 additions & 3 deletions BackgroundRunner/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Mygod")]
[assembly: AssemblyProduct("Skylark Background Runner")]
[assembly: AssemblyCopyright("Copyright © Mygod 2013-2014")]
[assembly: AssemblyCopyright("Copyright © Mygod 2013-2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.12.310")]
[assembly: AssemblyFileVersion("2.1.12.310")]
[assembly: AssemblyVersion("2.2.0.310")]
[assembly: AssemblyFileVersion("2.2.0.310")]
13 changes: 8 additions & 5 deletions BackgroundRunner/BackgroundRunner.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>
Expand All @@ -8,8 +8,9 @@
<OutputType>Exe</OutputType>
<RootNamespace>Mygod.Skylark.BackgroundRunner</RootNamespace>
<AssemblyName>BackgroundRunner</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -29,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -38,6 +41,7 @@
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>..\plugins\</OutputPath>
Expand All @@ -47,6 +51,7 @@
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="MygodLibrary">
Expand All @@ -69,9 +74,7 @@
<Compile Include="..\Tasks.cs">
<Link>Tasks.cs</Link>
</Compile>
<Compile Include="Program.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
1 change: 0 additions & 1 deletion Data/Banner.png.data

This file was deleted.

4 changes: 0 additions & 4 deletions Data/Site.privileges

This file was deleted.

Binary file removed Files/Banner.png
Binary file not shown.
2 changes: 1 addition & 1 deletion Files/readme.htm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Forbidden.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ul>
<li>
你正在试图访问 云雀™ 的最高机密!<br />
访问 云雀™ 的最高机密是不被允许的,如果你只是想执行一些奇怪的操作,请看看<a href="https://mygod.tk/skylark/api/" rel="noreferrer">开发者 API 指南</a>。
访问 云雀™ 的最高机密是不被允许的,如果你只是想执行一些奇怪的操作,请看看<a href="https://mygod.be/skylark/api/" rel="noreferrer">开发者 API 指南</a>。
</li>
<li>
您访问的并非最高机密,但是由于您职位太小,权限不够。<br />
Expand Down
10 changes: 5 additions & 5 deletions Forbidden.aspx.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 16 additions & 7 deletions Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ public User()
{
Password = AnonymousPassword;
Comment = "游客";
Browse = Download = OperateFiles = OperateTasks = Admin = true;
}
public User(XElement user)
{
Expand All @@ -578,7 +579,7 @@ public User(string value)
}

public readonly string Password, Comment;
public readonly bool Browse, Download, OperateFiles, OperateTasks, Admin;
public bool Browse, Download, OperateFiles, OperateTasks, Admin;

public override string ToString()
{
Expand All @@ -604,14 +605,21 @@ private Privileges()
}
public Privileges(XContainer root)
{
foreach (var user in root.ElementsCaseInsensitive("user").Select(e => new User(e))
.Where(user => !Contains(user.Password))) Add(user);
if (root == null) Add(new User()); // creates default config
else foreach (var user in root.ElementsCaseInsensitive("user").Select(e => new User(e))
.Where(user => !Contains(user.Password))) Add(user);
}

public Privileges(string path = null) : this(XHelper.Load(path ?? Path).Root)
public Privileges(string path = null) : this(LoadOrDefault(path))
{
}

private static XElement LoadOrDefault(string path = null)
{
if (path == null) path = Path;
return (File.Exists(path) ? XHelper.Load(path).Root : null);
}

public static Privileges Parse(string value)
{
var result = new Privileges();
Expand All @@ -634,9 +642,9 @@ public XElement ToElement()
return new XElement("privileges", this.Select(user => user.ToElement()));
}

public void Save(string path = null)
public void Save()
{
ToElement().Save(path ?? Path);
ToElement().Save(Path);
}
}

Expand All @@ -647,7 +655,8 @@ public sealed class Config

public Config()
{
element = FileHelper.GetElement(ConfigPath);
element = File.Exists(ConfigPath) ? FileHelper.GetElement(ConfigPath)
: new XElement("config", new XAttribute("root", "/Browse/")); // creates default
}

public string Root
Expand Down
2 changes: 1 addition & 1 deletion Offline/YouTube.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</script>
</section>
<section>
<div>想要直接下载你管视频?试试<a href="https://mygod.tk/product/hide-ear/" rel="noreferrer">掩耳</a>!提示:显示比特率的是只有视频/音频的,你可以手动/批量合并。</div>
<div>想要直接下载你管视频?试试<a href="https://mygod.be/product/hide-ear/" rel="noreferrer">掩耳</a>!提示:显示比特率的是只有视频/音频的,你可以手动/批量合并。</div>
<% GetEmAll(); %>
</section>
</asp:Content>
10 changes: 5 additions & 5 deletions Offline/YouTube.aspx.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Site.Master
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<asp:ContentPlaceHolder ID="Body" runat="server">
</asp:ContentPlaceHolder>
<footer>
Copyright &copy; 2013-2014 <a href="https://mygod.tk/skylark/" rel="noreferrer">云雀™</a>
Copyright &copy; 2013-2017 <a href="https://mygod.be/skylark/" rel="noreferrer">云雀™</a>
<% if (user.Admin) Response.Write("<a href=\"/Update/\">"); %>
V<%=CurrentAssembly.GetName().Version %> Cola
<% if (user.Admin) Response.Write("</a>"); %>
Expand Down
34 changes: 17 additions & 17 deletions Site.Master.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 42b9ff7

Please sign in to comment.