diff --git a/Opus.sln b/Opus.sln index 07358b8..9c3fbfb 100644 --- a/Opus.sln +++ b/Opus.sln @@ -14,9 +14,9 @@ Global {35E54AD4-5E2B-4DCD-9C20-F715D682A22B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {35E54AD4-5E2B-4DCD-9C20-F715D682A22B}.Debug|Any CPU.Build.0 = Debug|Any CPU {35E54AD4-5E2B-4DCD-9C20-F715D682A22B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {35E54AD4-5E2B-4DCD-9C20-F715D682A22B}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {35E54AD4-5E2B-4DCD-9C20-F715D682A22B}.Release|Any CPU.Build.0 = Debug|Any CPU - {35E54AD4-5E2B-4DCD-9C20-F715D682A22B}.Release|Any CPU.Deploy.0 = Debug|Any CPU + {35E54AD4-5E2B-4DCD-9C20-F715D682A22B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35E54AD4-5E2B-4DCD-9C20-F715D682A22B}.Release|Any CPU.Build.0 = Release|Any CPU + {35E54AD4-5E2B-4DCD-9C20-F715D682A22B}.Release|Any CPU.Deploy.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Opus/Assets/Version.txt b/Opus/Assets/Version.txt index 894fa13..f90312b 100644 --- a/Opus/Assets/Version.txt +++ b/Opus/Assets/Version.txt @@ -1,3 +1,3 @@ -Version: 3.4.6 +Version: 3.4.9 Beta: False -Link: https://github.com/AnonymusRaccoon/Opus/releases/download/3.4.6/Opus.v3.4.6.apk +Link: https://github.com/AnonymusRaccoon/Opus/releases/download/3.4.9/Opus.v3.4.9.apk diff --git a/Opus/Code/UI/Adapter/SectionAdapter.cs b/Opus/Code/UI/Adapter/SectionAdapter.cs index 9e19266..8ac07c9 100644 --- a/Opus/Code/UI/Adapter/SectionAdapter.cs +++ b/Opus/Code/UI/Adapter/SectionAdapter.cs @@ -112,17 +112,17 @@ namespace Opus.Adapter if(items[position].channelContent != null) { - holder.recycler.SetAdapter(new SmallListAdapter(items[position].channelContent.GetRange(0, items[position].channelContent.Count > 4 ? 4 : items[position].channelContent.Count), holder.recycler)); + holder.recycler.SetAdapter(new VerticalSectionAdapter(items[position].channelContent.GetRange(0, items[position].channelContent.Count > 4 ? 4 : items[position].channelContent.Count), holder.recycler)); if (items[position].channelContent.Count > 4) { holder.more.Visibility = ViewStates.Visible; ((GradientDrawable)holder.more.Background).SetStroke(5, Android.Content.Res.ColorStateList.ValueOf(Color.Argb(255, 21, 183, 237))); holder.more.SetTextColor(Color.Argb(255, 21, 183, 237)); - holder.more.Text = ((SmallListAdapter)holder.recycler.GetAdapter()).channels.Count > 4 ? MainActivity.instance.GetString(Resource.String.view_less) : MainActivity.instance.GetString(Resource.String.view_more); + holder.more.Text = ((VerticalSectionAdapter)holder.recycler.GetAdapter()).channels.Count > 4 ? MainActivity.instance.GetString(Resource.String.view_less) : MainActivity.instance.GetString(Resource.String.view_more); holder.more.Click += (sender, e) => { - SmallListAdapter adapter = (SmallListAdapter)holder.recycler.GetAdapter(); + VerticalSectionAdapter adapter = (VerticalSectionAdapter)holder.recycler.GetAdapter(); if (adapter.ItemCount == 4) { adapter.channels.AddRange(items[position].channelContent.GetRange(4, items[position].channelContent.Count - 4)); @@ -143,7 +143,7 @@ namespace Opus.Adapter } else { - holder.recycler.SetAdapter(new SmallListAdapter(false, holder.recycler)); + holder.recycler.SetAdapter(new VerticalSectionAdapter(false, holder.recycler)); } } @@ -155,7 +155,7 @@ namespace Opus.Adapter holder.recycler.SetLayoutManager(new LinearLayoutManager(MainActivity.instance, LinearLayoutManager.Vertical, false)); if (items[position].playlistContent != null) { - holder.recycler.SetAdapter(new SmallListAdapter(items[position].playlistContent.GetRange(0, items[position].playlistContent.Count > 4 ? 4 : items[position].playlistContent.Count), holder.recycler)); + holder.recycler.SetAdapter(new VerticalSectionAdapter(items[position].playlistContent.GetRange(0, items[position].playlistContent.Count > 4 ? 4 : items[position].playlistContent.Count), holder.recycler)); if (ChannelDetails.instance != null) { @@ -164,10 +164,10 @@ namespace Opus.Adapter holder.more.Visibility = ViewStates.Visible; ((GradientDrawable)holder.more.Background).SetStroke(5, Android.Content.Res.ColorStateList.ValueOf(Color.Argb(255, 21, 183, 237))); holder.more.SetTextColor(Color.Argb(255, 21, 183, 237)); - holder.more.Text = ((SmallListAdapter)holder.recycler.GetAdapter()).playlists.Count > 4 ? MainActivity.instance.GetString(Resource.String.view_less) : MainActivity.instance.GetString(Resource.String.view_more); + holder.more.Text = ((VerticalSectionAdapter)holder.recycler.GetAdapter()).playlists.Count > 4 ? MainActivity.instance.GetString(Resource.String.view_less) : MainActivity.instance.GetString(Resource.String.view_more); holder.more.Click += (sender, e) => { - SmallListAdapter adapter = (SmallListAdapter)holder.recycler.GetAdapter(); + VerticalSectionAdapter adapter = (VerticalSectionAdapter)holder.recycler.GetAdapter(); if (adapter.ItemCount == 4) { adapter.playlists.AddRange(items[position].playlistContent.GetRange(4, items[position].playlistContent.Count - 4)); @@ -194,7 +194,7 @@ namespace Opus.Adapter } else { - holder.recycler.SetAdapter(new SmallListAdapter(true, holder.recycler)); + holder.recycler.SetAdapter(new VerticalSectionAdapter(true, holder.recycler)); holder.more.Visibility = ViewStates.Gone; } } diff --git a/Opus/Code/UI/Adapter/HomeListAdapter.cs b/Opus/Code/UI/Adapter/VerticalSectionAdapter.cs similarity index 91% rename from Opus/Code/UI/Adapter/HomeListAdapter.cs rename to Opus/Code/UI/Adapter/VerticalSectionAdapter.cs index 25be72e..006cad5 100644 --- a/Opus/Code/UI/Adapter/HomeListAdapter.cs +++ b/Opus/Code/UI/Adapter/VerticalSectionAdapter.cs @@ -13,7 +13,7 @@ using System.Collections.Generic; namespace Opus.Adapter { - public class SmallListAdapter : RecyclerView.Adapter + public class VerticalSectionAdapter : RecyclerView.Adapter { public RecyclerView recycler; public List channels; @@ -33,21 +33,21 @@ namespace Opus.Adapter } } - public SmallListAdapter(List channels, RecyclerView recycler) + public VerticalSectionAdapter(List channels, RecyclerView recycler) { this.recycler = recycler; this.channels = channels; UseChannel = true; } - public SmallListAdapter(List playlists, RecyclerView recycler) + public VerticalSectionAdapter(List playlists, RecyclerView recycler) { this.recycler = recycler; this.playlists = playlists; UseChannel = false; } - public SmallListAdapter(bool UseChannel, RecyclerView recycler) + public VerticalSectionAdapter(bool UseChannel, RecyclerView recycler) { this.recycler = recycler; this.UseChannel = UseChannel; @@ -74,10 +74,9 @@ namespace Opus.Adapter else { holder.Title.Text = playlists[position].Name; - Picasso.With(Application.Context).Load(playlists[position].ImageURL).Placeholder(Resource.Color.background_material_dark).Resize(400, 400).CenterCrop().Into(holder.AlbumArt); + Picasso.With(Application.Context).Load(playlists[position].ImageURL).Placeholder(Resource.Color.background_material_dark).Transform(new RemoveBlackBorder(true)).Into(holder.AlbumArt); if (!holder.RightButtons.FindViewById(Resource.Id.play).HasOnClickListeners) { - //Only support local playlists for now. holder.RightButtons.FindViewById(Resource.Id.play).Click += (sender, e) => { PlaylistManager.PlayInOrder(playlists[position]); }; holder.RightButtons.FindViewById(Resource.Id.shuffle).Click += (sender, e) => { PlaylistManager.Shuffle(playlists[position]); }; } diff --git a/Opus/Code/UI/Fragments/OpenSourceViewer.cs b/Opus/Code/UI/Fragments/OpenSourceViewer.cs index ddcb1cc..ac3fff4 100644 --- a/Opus/Code/UI/Fragments/OpenSourceViewer.cs +++ b/Opus/Code/UI/Fragments/OpenSourceViewer.cs @@ -16,14 +16,21 @@ namespace Opus.Fragments { public static OpenSourceViewer instance; private bool isPaused = false; + /// + /// To update this dictionary, run the "Get-Package | Select-Object Id,LicenseUrl" command on the package manager console. + /// Then copy the output to a notepad and remove every spaces. Then replace http to: '", "http' + /// Then replace every \n to '{ "' + /// Then in extended mode (of notepad ++), replace $ to '" },'. + /// Finaly, past the result below (replace the initialized dictionary and solve the few errors that may be here. + /// private readonly ReadOnlyDictionary libraries = new ReadOnlyDictionary(new Dictionary { - { "AngleSharp", "https://github.com/AngleSharp/AngleSharp/blob/master/LICENSE" }, { "Google.Apis", "https://aka.ms/deprecateLicenseUrl" }, { "Google.Apis.Auth", "https://aka.ms/deprecateLicenseUrl" }, { "Google.Apis.Core", "https://aka.ms/deprecateLicenseUrl" }, { "Google.Apis.YouTube.v3", "https://aka.ms/deprecateLicenseUrl" }, { "Karamunting.Android.AnderWeb.DiscreteSeekBar", "https://github.com/AnderWeb/discreteSeekBar/blob/master/LICENSE" }, + { "LtGt", "https://licenses.nuget.org/MIT" }, { "Microsoft.CSharp", "https://github.com/dotnet/corefx/blob/master/LICENSE.TXT" }, { "Microsoft.NETCore.Platforms", "https://github.com/dotnet/corefx/blob/master/LICENSE.TXT" }, { "NETStandard.Library", "https://github.com/dotnet/standard/blob/master/LICENSE.TXT" }, @@ -33,6 +40,7 @@ namespace Opus.Fragments { "PInvoke.Kernel32", "https://raw.githubusercontent.com/AArnott/pinvoke/cf0176c42b/LICENSE" }, { "PInvoke.NCrypt", "https://raw.githubusercontent.com/AArnott/pinvoke/cf0176c42b/LICENSE" }, { "PInvoke.Windows.Core", "https://raw.githubusercontent.com/AArnott/pinvoke/cf0176c42b/LICENSE" }, + { "Sprache", "https://github.com/sprache/Sprache/blob/master/licence.txt" }, { "sqlite-net-pcl", "https://raw.githubusercontent.com/praeclarum/sqlite-net/master/LICENSE.md" }, { "SQLitePCLRaw.bundle_green", "https://licenses.nuget.org/Apache-2.0" }, { "SQLitePCLRaw.core", "https://licenses.nuget.org/Apache-2.0" }, @@ -46,6 +54,7 @@ namespace Opus.Fragments { "System.ComponentModel.TypeConverter", "http://go.microsoft.com/fwlink/?LinkId=329770" }, { "System.Console", "http://go.microsoft.com/fwlink/?LinkId=329770" }, { "System.Diagnostics.Process", "http://go.microsoft.com/fwlink/?LinkId=329770" }, + { "System.Globalization", "http://go.microsoft.com/fwlink/?LinkId=329770" }, { "System.IO", "http://go.microsoft.com/fwlink/?LinkId=329770" }, { "System.IO.Compression", "http://go.microsoft.com/fwlink/?LinkId=329770" }, { "System.IO.Compression.ZipFile", "http://go.microsoft.com/fwlink/?LinkId=329770" }, @@ -142,7 +151,6 @@ namespace Opus.Fragments { "Xamarin.GooglePlayServices.Cast", "https://go.microsoft.com/fwlink/?linkid=865373" }, { "Xamarin.GooglePlayServices.Cast.Framework", "https://go.microsoft.com/fwlink/?linkid=865373" }, { "Xamarin.GooglePlayServices.Flags", "https://go.microsoft.com/fwlink/?linkid=865373" }, - { "Xamarin.GooglePlayServices.Oss.Licenses", "https://go.microsoft.com/fwlink/?linkid=865373" }, { "Xamarin.GooglePlayServices.Tasks", "https://go.microsoft.com/fwlink/?linkid=865373" }, { "YoutubeExplode", "https://licenses.nuget.org/LGPL-3.0-only" } }); diff --git a/Opus/Opus.csproj b/Opus/Opus.csproj index dca3d06..da0e679 100644 --- a/Opus/Opus.csproj +++ b/Opus/Opus.csproj @@ -72,9 +72,6 @@ d8 - - ..\packages\AngleSharp.0.9.11\lib\portable-windows8+net45+windowsphone8+wpa+monoandroid+monotouch\AngleSharp.dll - ..\packages\Karamunting.Android.AnderWeb.DiscreteSeekBar.1.0.1.1\lib\monoandroid81\DiscreteSeekBar.dll @@ -112,6 +109,9 @@ ..\packages\Google.Apis.YouTube.v3.1.40.2.1593\lib\netstandard2.0\Google.Apis.YouTube.v3.dll + + ..\packages\LtGt.1.0.0\lib\netstandard2.0\LtGt.dll + ..\packages\Newtonsoft.Json.12.0.2\lib\netstandard2.0\Newtonsoft.Json.dll @@ -131,6 +131,9 @@ ..\packages\PInvoke.Windows.Core.0.5.184\lib\netstandard2.0\PInvoke.Windows.Core.dll + + ..\packages\Sprache.2.2.0\lib\netstandard2.0\Sprache.dll + ..\packages\sqlite-net-pcl.1.5.231\lib\netstandard1.1\SQLite-net.dll @@ -319,8 +322,8 @@ ..\packages\Xamarin.GooglePlayServices.Tasks.71.1601.0-preview9\lib\monoandroid90\Xamarin.GooglePlayServices.Tasks.dll - - ..\packages\YoutubeExplode.4.7.4\lib\netstandard2.0\YoutubeExplode.dll + + ..\packages\YoutubeExplode.4.7.5\lib\netstandard2.0\YoutubeExplode.dll @@ -370,7 +373,7 @@ - + diff --git a/Opus/Properties/AndroidManifest.xml b/Opus/Properties/AndroidManifest.xml index 5865bde..37e09f6 100644 --- a/Opus/Properties/AndroidManifest.xml +++ b/Opus/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/Opus/packages.config b/Opus/packages.config index 43e9143..0010967 100644 --- a/Opus/packages.config +++ b/Opus/packages.config @@ -1,11 +1,11 @@  - + @@ -15,6 +15,7 @@ + @@ -28,6 +29,7 @@ + @@ -125,5 +127,5 @@ - + \ No newline at end of file