Merge pull request #1275 from 66Omar/1220-add-last-modified
1220 add last modified to song (file) details
This commit is contained in:
commit
535bd8d872
44 changed files with 67 additions and 0 deletions
|
@ -39,6 +39,7 @@ import org.koin.core.component.KoinComponent
|
|||
import org.koin.core.component.get
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import java.util.regex.Pattern
|
||||
|
||||
|
@ -294,6 +295,14 @@ object MusicUtil : KoinComponent {
|
|||
return songs.indexOfFirst { it.id == songId }
|
||||
}
|
||||
|
||||
fun getDateModifiedString(date: Long): String {
|
||||
val calendar: Calendar = Calendar.getInstance()
|
||||
val pattern = "dd/MM/yyyy hh:mm:ss"
|
||||
calendar.timeInMillis = date
|
||||
val formatter = SimpleDateFormat(pattern, Locale.ENGLISH)
|
||||
return formatter.format(calendar.time)
|
||||
}
|
||||
|
||||
fun insertAlbumArt(
|
||||
context: Context,
|
||||
albumId: Long,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue