Bug fixing
- isPlayerPrepared() illegalState bug fixed - tag editor bug fixed when track number field is empty - updated the tag editor track field hint
This commit is contained in:
parent
ea5baf949d
commit
6b514c0c0a
4 changed files with 8 additions and 3 deletions
|
|
@ -210,7 +210,7 @@ public class MusicService extends Service implements MediaPlayer.OnPreparedListe
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPlaying() {
|
public boolean isPlaying() {
|
||||||
return player != null && player.isPlaying();
|
return player != null && isPlayerPrepared && player.isPlaying();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyOnMusicRemoteEventListeners(int event) {
|
private void notifyOnMusicRemoteEventListeners(int event) {
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,11 @@ public abstract class AbsTagEditorActivity extends ActionBarActivity {
|
||||||
AudioFile audioFile = AudioFileIO.read(new File(songPath));
|
AudioFile audioFile = AudioFileIO.read(new File(songPath));
|
||||||
Tag tag = audioFile.getTagOrCreateAndSetDefault();
|
Tag tag = audioFile.getTagOrCreateAndSetDefault();
|
||||||
for (Map.Entry<FieldKey, String> entry : fieldKeyValueMap.entrySet()) {
|
for (Map.Entry<FieldKey, String> entry : fieldKeyValueMap.entrySet()) {
|
||||||
tag.setField(entry.getKey(), entry.getValue());
|
try {
|
||||||
|
tag.setField(entry.getKey(), entry.getValue());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
tag.deleteField(entry.getKey());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (deleteArtwork) {
|
if (deleteArtwork) {
|
||||||
tag.deleteArtworkField();
|
tag.deleteArtworkField();
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:fontFamily="sans-serif"
|
android:fontFamily="sans-serif"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/track"
|
android:hint="@string/track_hint"
|
||||||
android:inputType="numberDecimal"
|
android:inputType="numberDecimal"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@
|
||||||
<string name="album_artist">Album artist</string>
|
<string name="album_artist">Album artist</string>
|
||||||
<string name="year">Year</string>
|
<string name="year">Year</string>
|
||||||
<string name="track">Track</string>
|
<string name="track">Track</string>
|
||||||
|
<string name="track_hint">Track (2 for track 2 or 3004 for CD3 track 4)</string>
|
||||||
<string name="album_or_artist_empty">The album title or the album artist text field is empty.</string>
|
<string name="album_or_artist_empty">The album title or the album artist text field is empty.</string>
|
||||||
<string name="writing_file_number">Writing file</string>
|
<string name="writing_file_number">Writing file</string>
|
||||||
<string name="title_activity_album_tag_editor">AlbumTagEditorActivity</string>
|
<string name="title_activity_album_tag_editor">AlbumTagEditorActivity</string>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue