浏览代码

Ignore RepeatOne only when manually skipping tracks, not when playing normally.

master
父节点
当前提交
54bd1db745
共有 1 个文件被更改,包括 22 次插入2 次删除
  1. +22
    -2
      Playlist/PlaylistController.m

+ 22
- 2
Playlist/PlaylistController.m 查看文件

@@ -593,6 +593,16 @@

- (PlaylistEntry *)getNextEntry:(PlaylistEntry *)pe
{
return [self getNextEntry:pe ignoreRepeatOne:NO];
}

- (PlaylistEntry *)getNextEntry:(PlaylistEntry *)pe ignoreRepeatOne:(BOOL)ignoreRepeatOne
{
if (!ignoreRepeatOne && [self repeat] == RepeatOne)
{
return pe;
}
if ([queueList count] > 0)
{
@@ -655,6 +665,16 @@

- (PlaylistEntry *)getPrevEntry:(PlaylistEntry *)pe
{
return [self getPrevEntry:pe ignoreRepeatOne:NO];
}

- (PlaylistEntry *)getPrevEntry:(PlaylistEntry *)pe ignoreRepeatOne:(BOOL)ignoreRepeatOne
{
if (!ignoreRepeatOne && [self repeat] == RepeatOne)
{
return pe;
}
if ([self shuffle] != ShuffleOff)
{
return [self shuffledEntryAtIndex:(pe.shuffleIndex - 1)];
@@ -679,7 +699,7 @@
{
PlaylistEntry *pe;
pe = [self getNextEntry:[self currentEntry]];
pe = [self getNextEntry:[self currentEntry] ignoreRepeatOne:YES];
if (pe == nil)
return NO;
@@ -693,7 +713,7 @@
{
PlaylistEntry *pe;
pe = [self getPrevEntry:[self currentEntry]];
pe = [self getPrevEntry:[self currentEntry] ignoreRepeatOne:YES];
if (pe == nil)
return NO;


正在加载...
取消
保存