-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement new lyrics API in download back-end
- Loading branch information
Showing
6 changed files
with
352 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
android/app/src/main/java/r/r/refreezer/models/Lyrics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
package r.r.refreezer.models; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public abstract class Lyrics { | ||
protected String id; | ||
protected String writers; | ||
protected List<SynchronizedLyric> syncedLyrics; | ||
protected String errorMessage; | ||
protected String unsyncedLyrics; | ||
protected Boolean isExplicit; | ||
protected String copyright; | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getWriters() { | ||
return writers; | ||
} | ||
|
||
public void setWriters(String writers) { | ||
this.writers = writers; | ||
} | ||
|
||
public List<SynchronizedLyric> getSyncedLyrics() { | ||
return syncedLyrics; | ||
} | ||
|
||
public void setSyncedLyrics(List<SynchronizedLyric> syncedLyrics) { | ||
this.syncedLyrics = syncedLyrics; | ||
} | ||
|
||
public String getErrorMessage() { | ||
return errorMessage; | ||
} | ||
|
||
public void setErrorMessage(String errorMessage) { | ||
this.errorMessage = errorMessage; | ||
} | ||
|
||
public String getUnsyncedLyrics() { | ||
return unsyncedLyrics; | ||
} | ||
|
||
public void setUnsyncedLyrics(String unsyncedLyrics) { | ||
this.unsyncedLyrics = unsyncedLyrics; | ||
} | ||
|
||
public Boolean getExplicit() { | ||
return isExplicit; | ||
} | ||
|
||
public void setExplicit(Boolean explicit) { | ||
isExplicit = explicit; | ||
} | ||
|
||
public String getCopyright() { | ||
return copyright; | ||
} | ||
|
||
public void setCopyright(String copyright) { | ||
this.copyright = copyright; | ||
} | ||
|
||
public Lyrics() { | ||
this.syncedLyrics = new ArrayList<>(); | ||
} | ||
|
||
public boolean isLoaded() { | ||
return (syncedLyrics != null && !syncedLyrics.isEmpty()) || (unsyncedLyrics != null && !unsyncedLyrics.isEmpty()); | ||
} | ||
|
||
public boolean isSynced() { | ||
return syncedLyrics != null && syncedLyrics.size() > 1; | ||
} | ||
|
||
public boolean isUnsynced() { | ||
return !isSynced() && (unsyncedLyrics != null && !unsyncedLyrics.isEmpty()); | ||
} | ||
} |
Oops, something went wrong.