mirror of
https://github.com/zoriya/Opus.git
synced 2026-06-08 08:20:30 +00:00
Solving play next bug.
This commit is contained in:
@@ -847,6 +847,7 @@ namespace MusicApp
|
|||||||
|
|
||||||
public void PrepareSmallPlayer()
|
public void PrepareSmallPlayer()
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("&Index = " + MusicPlayer.CurrentID());
|
||||||
Song current = MusicPlayer.queue[MusicPlayer.CurrentID()];
|
Song current = MusicPlayer.queue[MusicPlayer.CurrentID()];
|
||||||
|
|
||||||
CoordinatorLayout smallPlayer = FindViewById<CoordinatorLayout>(Resource.Id.smallPlayer);
|
CoordinatorLayout smallPlayer = FindViewById<CoordinatorLayout>(Resource.Id.smallPlayer);
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ namespace MusicApp.Resources.Portable_Class
|
|||||||
|
|
||||||
private Notification notification;
|
private Notification notification;
|
||||||
private const int notificationID = 1000;
|
private const int notificationID = 1000;
|
||||||
private bool stoped = false;
|
|
||||||
private static long progress;
|
private static long progress;
|
||||||
|
|
||||||
|
|
||||||
@@ -242,6 +241,8 @@ namespace MusicApp.Resources.Portable_Class
|
|||||||
if(song.queueSlot == -1)
|
if(song.queueSlot == -1)
|
||||||
song.queueSlot = CurrentID() + 1;
|
song.queueSlot = CurrentID() + 1;
|
||||||
|
|
||||||
|
Console.WriteLine("&QueueSlot = " + song.queueSlot);
|
||||||
|
|
||||||
currentID = song.queueSlot;
|
currentID = song.queueSlot;
|
||||||
|
|
||||||
CreateNotification(song.GetName(), song.GetArtist(), song.GetAlbumArt(), song.GetAlbum());
|
CreateNotification(song.GetName(), song.GetArtist(), song.GetAlbumArt(), song.GetAlbum());
|
||||||
@@ -515,7 +516,7 @@ namespace MusicApp.Resources.Portable_Class
|
|||||||
|
|
||||||
public static int CurrentID()
|
public static int CurrentID()
|
||||||
{
|
{
|
||||||
if (queue.Count - 1 < currentID)
|
if (queue.Count < currentID)
|
||||||
currentID = -1;
|
currentID = -1;
|
||||||
return currentID;
|
return currentID;
|
||||||
}
|
}
|
||||||
@@ -744,7 +745,7 @@ namespace MusicApp.Resources.Portable_Class
|
|||||||
|
|
||||||
public void Resume()
|
public void Resume()
|
||||||
{
|
{
|
||||||
if(player != null && !isRunning && !stoped)
|
if(player != null && !isRunning)
|
||||||
{
|
{
|
||||||
isRunning = true;
|
isRunning = true;
|
||||||
Intent tmpPauseIntent = new Intent(Application.Context, typeof(MusicPlayer));
|
Intent tmpPauseIntent = new Intent(Application.Context, typeof(MusicPlayer));
|
||||||
@@ -769,7 +770,6 @@ namespace MusicApp.Resources.Portable_Class
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stoped = false;
|
|
||||||
Play(queue[CurrentID()], false, progress);
|
Play(queue[CurrentID()], false, progress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -798,9 +798,6 @@ namespace MusicApp.Resources.Portable_Class
|
|||||||
private void SleepPause()
|
private void SleepPause()
|
||||||
{
|
{
|
||||||
Pause();
|
Pause();
|
||||||
StopForeground(true);
|
|
||||||
stoped = true;
|
|
||||||
progress = player.CurrentPosition;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Swap(int fromPosition, int toPosition)
|
public static void Swap(int fromPosition, int toPosition)
|
||||||
|
|||||||
Reference in New Issue
Block a user