mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Reformat code.
This commit is contained in:
@@ -117,11 +117,9 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static LeadInCopyright? DecodeLeadInCopyright(byte[] response)
|
||||
{
|
||||
if(response == null)
|
||||
return null;
|
||||
if(response == null) return null;
|
||||
|
||||
if(response.Length != 8)
|
||||
return null;
|
||||
if(response.Length != 8) return null;
|
||||
|
||||
LeadInCopyright cmi = new LeadInCopyright();
|
||||
|
||||
@@ -138,8 +136,7 @@ namespace DiscImageChef.Decoders.DVD
|
||||
|
||||
public static string PrettifyLeadInCopyright(LeadInCopyright? cmi)
|
||||
{
|
||||
if(cmi == null)
|
||||
return null;
|
||||
if(cmi == null) return null;
|
||||
|
||||
LeadInCopyright decoded = cmi.Value;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -163,32 +160,21 @@ namespace DiscImageChef.Decoders.DVD
|
||||
break;
|
||||
}
|
||||
|
||||
if(decoded.CopyrightType == 0)
|
||||
return sb.ToString();
|
||||
if(decoded.CopyrightType == 0) return sb.ToString();
|
||||
|
||||
if(decoded.RegionInformation == 0xFF)
|
||||
sb.AppendLine("Disc cannot be played in any region at all.");
|
||||
else if(decoded.RegionInformation == 0x00)
|
||||
sb.AppendLine("Disc can be played in any region.");
|
||||
if(decoded.RegionInformation == 0xFF) sb.AppendLine("Disc cannot be played in any region at all.");
|
||||
else if(decoded.RegionInformation == 0x00) sb.AppendLine("Disc can be played in any region.");
|
||||
else
|
||||
{
|
||||
sb.Append("Disc can be played in the following regions:");
|
||||
if((decoded.RegionInformation & 0x01) != 0x01)
|
||||
sb.Append(" 0");
|
||||
if((decoded.RegionInformation & 0x02) != 0x02)
|
||||
sb.Append(" 1");
|
||||
if((decoded.RegionInformation & 0x04) != 0x04)
|
||||
sb.Append(" 2");
|
||||
if((decoded.RegionInformation & 0x08) != 0x08)
|
||||
sb.Append(" 3");
|
||||
if((decoded.RegionInformation & 0x10) != 0x10)
|
||||
sb.Append(" 4");
|
||||
if((decoded.RegionInformation & 0x20) != 0x20)
|
||||
sb.Append(" 5");
|
||||
if((decoded.RegionInformation & 0x40) != 0x40)
|
||||
sb.Append(" 6");
|
||||
if((decoded.RegionInformation & 0x80) != 0x80)
|
||||
sb.Append(" 7");
|
||||
if((decoded.RegionInformation & 0x01) != 0x01) sb.Append(" 0");
|
||||
if((decoded.RegionInformation & 0x02) != 0x02) sb.Append(" 1");
|
||||
if((decoded.RegionInformation & 0x04) != 0x04) sb.Append(" 2");
|
||||
if((decoded.RegionInformation & 0x08) != 0x08) sb.Append(" 3");
|
||||
if((decoded.RegionInformation & 0x10) != 0x10) sb.Append(" 4");
|
||||
if((decoded.RegionInformation & 0x20) != 0x20) sb.Append(" 5");
|
||||
if((decoded.RegionInformation & 0x40) != 0x40) sb.Append(" 6");
|
||||
if((decoded.RegionInformation & 0x80) != 0x80) sb.Append(" 7");
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
@@ -199,5 +185,4 @@ namespace DiscImageChef.Decoders.DVD
|
||||
return PrettifyLeadInCopyright(DecodeLeadInCopyright(response));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user