63 lines
2.1 KiB
Java
63 lines
2.1 KiB
Java
|
package c.i.a.c.a2;
|
||
|
|
||
|
import c.i.a.c.i2.f0;
|
||
|
import com.google.android.exoplayer2.metadata.Metadata;
|
||
|
import com.google.android.exoplayer2.metadata.id3.CommentFrame;
|
||
|
import com.google.android.exoplayer2.metadata.id3.InternalFrame;
|
||
|
import java.util.regex.Matcher;
|
||
|
import java.util.regex.Pattern;
|
||
|
/* compiled from: GaplessInfoHolder */
|
||
|
public final class p {
|
||
|
public static final Pattern a = Pattern.compile("^ [0-9a-fA-F]{8} ([0-9a-fA-F]{8}) ([0-9a-fA-F]{8})");
|
||
|
public int b = -1;
|
||
|
|
||
|
/* renamed from: c reason: collision with root package name */
|
||
|
public int f755c = -1;
|
||
|
|
||
|
public final boolean a(String str) {
|
||
|
Matcher matcher = a.matcher(str);
|
||
|
if (!matcher.find()) {
|
||
|
return false;
|
||
|
}
|
||
|
try {
|
||
|
String group = matcher.group(1);
|
||
|
int i = f0.a;
|
||
|
int parseInt = Integer.parseInt(group, 16);
|
||
|
int parseInt2 = Integer.parseInt(matcher.group(2), 16);
|
||
|
if (parseInt <= 0 && parseInt2 <= 0) {
|
||
|
return false;
|
||
|
}
|
||
|
this.b = parseInt;
|
||
|
this.f755c = parseInt2;
|
||
|
return true;
|
||
|
} catch (NumberFormatException unused) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public boolean b(Metadata metadata) {
|
||
|
int i = 0;
|
||
|
while (true) {
|
||
|
Metadata.Entry[] entryArr = metadata.i;
|
||
|
if (i >= entryArr.length) {
|
||
|
return false;
|
||
|
}
|
||
|
Metadata.Entry entry = entryArr[i];
|
||
|
if (entry instanceof CommentFrame) {
|
||
|
CommentFrame commentFrame = (CommentFrame) entry;
|
||
|
if ("iTunSMPB".equals(commentFrame.k) && a(commentFrame.l)) {
|
||
|
return true;
|
||
|
}
|
||
|
} else if (entry instanceof InternalFrame) {
|
||
|
InternalFrame internalFrame = (InternalFrame) entry;
|
||
|
if ("com.apple.iTunes".equals(internalFrame.j) && "iTunSMPB".equals(internalFrame.k) && a(internalFrame.l)) {
|
||
|
return true;
|
||
|
}
|
||
|
} else {
|
||
|
continue;
|
||
|
}
|
||
|
i++;
|
||
|
}
|
||
|
}
|
||
|
}
|