Updafe formatting
This commit is contained in:
parent
94bf3cbb57
commit
b86cc33bbf
|
@ -169,7 +169,8 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
|
||||||
slideUpPanel = findViewById(R.id.slide_up_panel);
|
slideUpPanel = findViewById(R.id.slide_up_panel);
|
||||||
panelSlideListener = new SlidingUpPanelLayout.PanelSlideListener() {
|
panelSlideListener = new SlidingUpPanelLayout.PanelSlideListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPanelSlide(View panel, float slideOffset) {}
|
public void onPanelSlide(View panel, float slideOffset) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPanelStateChanged(View panel, PanelState previousState, PanelState newState) {
|
public void onPanelStateChanged(View panel, PanelState previousState, PanelState newState) {
|
||||||
|
|
|
@ -1331,7 +1331,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
|
||||||
return getCurrentAdapter().getSelected();
|
return getCurrentAdapter().getSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
void playNow(final boolean shuffle, final boolean append, final boolean playNext) {
|
void playNow(final boolean shuffle, final boolean append, final boolean playNext) {
|
||||||
List<Entry> songs = getSelectedEntries();
|
List<Entry> songs = getSelectedEntries();
|
||||||
if (!songs.isEmpty()) {
|
if (!songs.isEmpty()) {
|
||||||
download(songs, append, !append, playNext, shuffle);
|
download(songs, append, !append, playNext, shuffle);
|
||||||
|
|
|
@ -31,8 +31,8 @@ class Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Returns a 32bit int from given byte offset in LE
|
** Returns a 32bit int from given byte offset in LE
|
||||||
*/
|
*/
|
||||||
private int b2le32(byte[] b, int off) {
|
private int b2le32(byte[] b, int off) {
|
||||||
int r = 0;
|
int r = 0;
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
|
@ -50,8 +50,8 @@ class Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** convert 'byte' value into unsigned int
|
** convert 'byte' value into unsigned int
|
||||||
*/
|
*/
|
||||||
int b2u(byte x) {
|
int b2u(byte x) {
|
||||||
return (x & 0xFF);
|
return (x & 0xFF);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,8 @@ class FlacFile extends Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parses the metadata block at 'offset' and returns
|
/* Parses the metadata block at 'offset' and returns
|
||||||
** [header_size, payload_size, type, stop_after]
|
** [header_size, payload_size, type, stop_after]
|
||||||
*/
|
*/
|
||||||
private int[] parse_metadata_block(RandomAccessFile s, long offset) throws IOException {
|
private int[] parse_metadata_block(RandomAccessFile s, long offset) throws IOException {
|
||||||
int[] result = new int[4];
|
int[] result = new int[4];
|
||||||
byte[] mb_head = new byte[4];
|
byte[] mb_head = new byte[4];
|
||||||
|
|
|
@ -56,8 +56,8 @@ class ID3v2File extends Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parses all ID3v2 frames at the current position up until payload_len
|
/* Parses all ID3v2 frames at the current position up until payload_len
|
||||||
** bytes were read
|
** bytes were read
|
||||||
*/
|
*/
|
||||||
private HashMap parse_v3_frames(RandomAccessFile s, long payload_len) throws IOException {
|
private HashMap parse_v3_frames(RandomAccessFile s, long payload_len) throws IOException {
|
||||||
HashMap tags = new HashMap();
|
HashMap tags = new HashMap();
|
||||||
byte[] frame = new byte[10]; // a frame header is always 10 bytes
|
byte[] frame = new byte[10]; // a frame header is always 10 bytes
|
||||||
|
|
|
@ -49,8 +49,8 @@ class OggFile extends Common {
|
||||||
|
|
||||||
|
|
||||||
/* Parses the ogg page at offset 'offset' and returns
|
/* Parses the ogg page at offset 'offset' and returns
|
||||||
** [header_size, payload_size, type]
|
** [header_size, payload_size, type]
|
||||||
*/
|
*/
|
||||||
private long[] parse_ogg_page(RandomAccessFile s, long offset) throws IOException {
|
private long[] parse_ogg_page(RandomAccessFile s, long offset) throws IOException {
|
||||||
long[] result = new long[3]; // [header_size, payload_size]
|
long[] result = new long[3]; // [header_size, payload_size]
|
||||||
byte[] p_header = new byte[OGG_PAGE_SIZE]; // buffer for the page header
|
byte[] p_header = new byte[OGG_PAGE_SIZE]; // buffer for the page header
|
||||||
|
@ -93,8 +93,8 @@ class OggFile extends Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In 'vorbiscomment' field is prefixed with \3vorbis in OGG files
|
/* In 'vorbiscomment' field is prefixed with \3vorbis in OGG files
|
||||||
** we check that this marker is present and call the generic comment
|
** we check that this marker is present and call the generic comment
|
||||||
** parset with the correct offset (+7) */
|
** parset with the correct offset (+7) */
|
||||||
private HashMap parse_ogg_vorbis_comment(RandomAccessFile s, long offset, long pl_len) throws IOException {
|
private HashMap parse_ogg_vorbis_comment(RandomAccessFile s, long offset, long pl_len) throws IOException {
|
||||||
final int pfx_len = 7;
|
final int pfx_len = 7;
|
||||||
byte[] pfx = new byte[pfx_len];
|
byte[] pfx = new byte[pfx_len];
|
||||||
|
|
Loading…
Reference in New Issue