mirror of
https://github.com/zoriya/Opus.git
synced 2025-12-06 06:26:15 +00:00
Solving bugs and updating packages.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
Version: 3.5.1
|
||||
Version: 3.5.3
|
||||
Beta: False
|
||||
Link: https://github.com/AnonymusRaccoon/Opus/releases/download/3.5.1/Opus.v3.5.1.apk
|
||||
Link: https://github.com/AnonymusRaccoon/Opus/releases/download/3.5.3/Opus.v3.5.3.apk
|
||||
|
||||
@@ -211,11 +211,11 @@ namespace Opus.Api.Services
|
||||
ISharedPreferences prefManager = PreferenceManager.GetDefaultSharedPreferences(Application.Context);
|
||||
|
||||
//This is for the current version of ExoPlayer
|
||||
AdaptiveTrackSelection.Factory trackSelectionFactory = new AdaptiveTrackSelection.Factory(new DefaultBandwidthMeter());
|
||||
TrackSelector trackSelector = new DefaultTrackSelector(trackSelectionFactory);
|
||||
player = ExoPlayerFactory.NewSimpleInstance(Application.Context, trackSelector);
|
||||
//AdaptiveTrackSelection.Factory trackSelectionFactory = new AdaptiveTrackSelection.Factory(new DefaultBandwidthMeter());
|
||||
//TrackSelector trackSelector = new DefaultTrackSelector(trackSelectionFactory);
|
||||
//player = ExoPlayerFactory.NewSimpleInstance(Application.Context, trackSelector);
|
||||
//This is for the newers versions of ExoPlayer
|
||||
//player = ExoPlayerFactory.NewSimpleInstance(Application.Context);
|
||||
player = ExoPlayerFactory.NewSimpleInstance(Application.Context);
|
||||
|
||||
volume = prefManager.GetInt("volumeMultiplier", 100) / 100f;
|
||||
player.Volume = volume;
|
||||
@@ -269,26 +269,26 @@ namespace Opus.Api.Services
|
||||
DefaultDataSourceFactory dataSourceFactory = new DefaultDataSourceFactory(Application.Context, "Opus");
|
||||
|
||||
//This is for the current version of ExoPlayer
|
||||
IExtractorsFactory extractorFactory = new DefaultExtractorsFactory();
|
||||
Handler handler = new Handler();
|
||||
//IExtractorsFactory extractorFactory = new DefaultExtractorsFactory();
|
||||
//Handler handler = new Handler();
|
||||
|
||||
Console.WriteLine("&Preparing exoplay, path: " + song.Path);
|
||||
IMediaSource mediaSource;
|
||||
if (song.IsLiveStream)
|
||||
mediaSource = new HlsMediaSource(Uri.Parse(song.Path), dataSourceFactory, handler, null);
|
||||
else if (!song.IsYt)
|
||||
mediaSource = new ExtractorMediaSource(Uri.FromFile(new Java.IO.File(song.Path)), dataSourceFactory, extractorFactory, handler, null);
|
||||
else
|
||||
mediaSource = new ExtractorMediaSource(Uri.Parse(song.Path), dataSourceFactory, extractorFactory, handler, null);
|
||||
|
||||
//This is for newers versions of ExoPlayer
|
||||
//Console.WriteLine("&Preparing exoplay, path: " + song.Path);
|
||||
//IMediaSource mediaSource;
|
||||
//if (song.IsLiveStream)
|
||||
// mediaSource = new HlsMediaSource.Factory(dataSourceFactory).CreateMediaSource(Uri.Parse(song.Path));
|
||||
// mediaSource = new HlsMediaSource(Uri.Parse(song.Path), dataSourceFactory, handler, null);
|
||||
//else if (!song.IsYt)
|
||||
// mediaSource = new ExtractorMediaSource.Factory(dataSourceFactory).CreateMediaSource(Uri.FromFile(new Java.IO.File(song.Path)));
|
||||
// mediaSource = new ExtractorMediaSource(Uri.FromFile(new Java.IO.File(song.Path)), dataSourceFactory, extractorFactory, handler, null);
|
||||
//else
|
||||
// mediaSource = new ExtractorMediaSource.Factory(dataSourceFactory).CreateMediaSource(Uri.Parse(song.Path));
|
||||
// mediaSource = new ExtractorMediaSource(Uri.Parse(song.Path), dataSourceFactory, extractorFactory, handler, null);
|
||||
|
||||
//This is for newers versions of ExoPlayer
|
||||
IMediaSource mediaSource;
|
||||
if (song.IsLiveStream)
|
||||
mediaSource = new HlsMediaSource.Factory(dataSourceFactory).CreateMediaSource(Uri.Parse(song.Path));
|
||||
else if (!song.IsYt)
|
||||
mediaSource = new ExtractorMediaSource.Factory(dataSourceFactory).CreateMediaSource(Uri.FromFile(new Java.IO.File(song.Path)));
|
||||
else
|
||||
mediaSource = new ExtractorMediaSource.Factory(dataSourceFactory).CreateMediaSource(Uri.Parse(song.Path));
|
||||
|
||||
player.Prepare(mediaSource, true, true);
|
||||
}
|
||||
@@ -1184,7 +1184,7 @@ namespace Opus.Api.Services
|
||||
song.Duration = int.Parse(meta.ExtractMetadata(MetadataKey.Duration));
|
||||
meta.Release();
|
||||
}
|
||||
catch (Java.IO.FileNotFoundException) { }
|
||||
catch (Exception ex) { Console.WriteLine("&LoadDuration error: " + ex.Message); }
|
||||
}
|
||||
|
||||
return song.Duration;
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Graphics;
|
||||
using Android.Net;
|
||||
using Android.Support.Design.Widget;
|
||||
using Android.Support.V7.Widget;
|
||||
using Android.Util;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using Java.Lang;
|
||||
using Opus.Api;
|
||||
using Opus.Api.Services;
|
||||
using Opus.DataStructure;
|
||||
@@ -89,9 +92,21 @@ namespace Opus.Adapter
|
||||
{
|
||||
holder.Title.Text = MainActivity.instance.GetString(Resource.String.shuffle_all);
|
||||
holder.AlbumArt.SetImageResource(Resource.Drawable.Shuffle);
|
||||
|
||||
Color color;
|
||||
TypedValue value = new TypedValue();
|
||||
if (MainActivity.instance.Theme.ResolveAttribute(Android.Resource.Attribute.ColorForeground, value, true))
|
||||
color = Color.ParseColor("#" + Integer.ToHexString(value.Data));
|
||||
else
|
||||
color = Color.Black;
|
||||
|
||||
holder.AlbumArt.SetColorFilter(color);
|
||||
}
|
||||
else
|
||||
{
|
||||
holder.AlbumArt.ClearColorFilter();
|
||||
|
||||
|
||||
Song song = songs.Count <= position ? null : songs[position];
|
||||
|
||||
|
||||
|
||||
@@ -75,23 +75,23 @@
|
||||
<Reference Include="DiscreteSeekBar, Version=1.0.1.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Karamunting.Android.AnderWeb.DiscreteSeekBar.1.0.1.1\lib\monoandroid81\DiscreteSeekBar.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ExoPlayer, Version=2.8.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.2.8.8\lib\monoandroid81\ExoPlayer.dll</HintPath>
|
||||
<Reference Include="ExoPlayer, Version=2.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.2.9.7\lib\monoandroid90\ExoPlayer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ExoPlayer.Core, Version=2.8.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.Core.2.8.8\lib\monoandroid81\ExoPlayer.Core.dll</HintPath>
|
||||
<Reference Include="ExoPlayer.Core, Version=2.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.Core.2.9.7\lib\monoandroid90\ExoPlayer.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ExoPlayer.Dash, Version=2.8.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.Dash.2.8.8\lib\monoandroid81\ExoPlayer.Dash.dll</HintPath>
|
||||
<Reference Include="ExoPlayer.Dash, Version=2.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.Dash.2.9.7\lib\monoandroid90\ExoPlayer.Dash.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ExoPlayer.Hls, Version=2.8.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.Hls.2.8.8\lib\monoandroid81\ExoPlayer.Hls.dll</HintPath>
|
||||
<Reference Include="ExoPlayer.Hls, Version=2.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.Hls.2.9.7\lib\monoandroid90\ExoPlayer.Hls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ExoPlayer.SmoothStreaming, Version=2.8.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.SmoothStreaming.2.8.8\lib\monoandroid81\ExoPlayer.SmoothStreaming.dll</HintPath>
|
||||
<Reference Include="ExoPlayer.SmoothStreaming, Version=2.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.SmoothStreaming.2.9.7\lib\monoandroid90\ExoPlayer.SmoothStreaming.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ExoPlayer.UI, Version=2.8.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.UI.2.8.8\lib\monoandroid81\ExoPlayer.UI.dll</HintPath>
|
||||
<Reference Include="ExoPlayer.UI, Version=2.9.7.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xam.Plugins.Android.ExoPlayer.UI.2.9.7\lib\monoandroid90\ExoPlayer.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Apis, Version=1.40.2.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Apis.1.40.2\lib\netstandard2.0\Google.Apis.dll</HintPath>
|
||||
@@ -109,8 +109,8 @@
|
||||
<HintPath>..\packages\Google.Apis.YouTube.v3.1.40.2.1593\lib\netstandard2.0\Google.Apis.YouTube.v3.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Java.Interop" />
|
||||
<Reference Include="LtGt, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\LtGt.1.0.0\lib\netstandard2.0\LtGt.dll</HintPath>
|
||||
<Reference Include="LtGt, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\LtGt.1.0.1\lib\netstandard2.0\LtGt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
@@ -322,8 +322,8 @@
|
||||
<Reference Include="Xamarin.GooglePlayServices.Tasks, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Xamarin.GooglePlayServices.Tasks.71.1601.0-preview9\lib\monoandroid90\Xamarin.GooglePlayServices.Tasks.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="YoutubeExplode, Version=4.7.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\YoutubeExplode.4.7.5\lib\netstandard2.0\YoutubeExplode.dll</HintPath>
|
||||
<Reference Include="YoutubeExplode, Version=4.7.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\YoutubeExplode.4.7.6\lib\netstandard2.0\YoutubeExplode.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sdg.opus" android:installLocation="preferExternal" android:versionName="3.5.1" android:versionCode="56">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sdg.opus" android:installLocation="preferExternal" android:versionName="3.5.3" android:versionCode="58">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
1983
Opus/Resources/Resource.Designer.cs
generated
1983
Opus/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -5,9 +5,9 @@
|
||||
<package id="Google.Apis.Core" version="1.40.2" targetFramework="monoandroid90" />
|
||||
<package id="Google.Apis.YouTube.v3" version="1.40.2.1593" targetFramework="monoandroid90" />
|
||||
<package id="Karamunting.Android.AnderWeb.DiscreteSeekBar" version="1.0.1.1" targetFramework="monoandroid81" />
|
||||
<package id="LtGt" version="1.0.0" targetFramework="monoandroid90" />
|
||||
<package id="LtGt" version="1.0.1" targetFramework="monoandroid90" />
|
||||
<package id="Microsoft.CSharp" version="4.5.0" targetFramework="monoandroid81" />
|
||||
<package id="Microsoft.NETCore.Platforms" version="2.2.1" targetFramework="monoandroid90" />
|
||||
<package id="Microsoft.NETCore.Platforms" version="2.2.2" targetFramework="monoandroid90" />
|
||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="monoandroid81" />
|
||||
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="monoandroid90" />
|
||||
<package id="PCLCrypto" version="2.0.147" targetFramework="monoandroid81" />
|
||||
@@ -72,12 +72,12 @@
|
||||
<package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="monoandroid81" />
|
||||
<package id="TagLib.Portable" version="1.0.4" targetFramework="monoandroid81" />
|
||||
<package id="Validation" version="2.4.22" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer" version="2.8.8" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.Core" version="2.8.8" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.Dash" version="2.8.8" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.Hls" version="2.8.8" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.SmoothStreaming" version="2.8.8" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.UI" version="2.8.8" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer" version="2.9.7" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.Core" version="2.9.7" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.Dash" version="2.9.7" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.Hls" version="2.9.7" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.SmoothStreaming" version="2.9.7" targetFramework="monoandroid90" />
|
||||
<package id="Xam.Plugins.Android.ExoPlayer.UI" version="2.9.7" targetFramework="monoandroid90" />
|
||||
<package id="Xamarin.Android.Arch.Core.Common" version="1.1.1.1" targetFramework="monoandroid90" />
|
||||
<package id="Xamarin.Android.Arch.Core.Runtime" version="1.1.1.1" targetFramework="monoandroid90" />
|
||||
<package id="Xamarin.Android.Arch.Lifecycle.Common" version="1.1.1.1" targetFramework="monoandroid90" />
|
||||
@@ -127,5 +127,5 @@
|
||||
<package id="Xamarin.GooglePlayServices.Cast.Framework" version="71.1602.0-preview9" targetFramework="monoandroid90" />
|
||||
<package id="Xamarin.GooglePlayServices.Flags" version="71.1601.0-preview9" targetFramework="monoandroid90" />
|
||||
<package id="Xamarin.GooglePlayServices.Tasks" version="71.1601.0-preview9" targetFramework="monoandroid90" />
|
||||
<package id="YoutubeExplode" version="4.7.5" targetFramework="monoandroid90" />
|
||||
<package id="YoutubeExplode" version="4.7.6" targetFramework="monoandroid90" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user