diff --git a/app/src/main/java/code/name/monkey/retromusic/db/PlaylistDao.kt b/app/src/main/java/code/name/monkey/retromusic/db/PlaylistDao.kt index dcd90602..fd3d6b43 100644 --- a/app/src/main/java/code/name/monkey/retromusic/db/PlaylistDao.kt +++ b/app/src/main/java/code/name/monkey/retromusic/db/PlaylistDao.kt @@ -32,6 +32,9 @@ interface PlaylistDao { @Query("SELECT * FROM SongEntity WHERE playlist_creator_id = :playlistId") suspend fun getSongs(playlistId: Int): List + @Query("DELETE FROM SongEntity WHERE playlist_creator_id = :playlistId AND id = :songId") + fun removeSong(playlistId: Int, songId: Int) + @Delete suspend fun deletePlaylistEntity(playlistEntity: PlaylistEntity) @@ -40,7 +43,5 @@ interface PlaylistDao { @Delete suspend fun removeSongsFromPlaylist(songs: List) - - @Query("DELETE FROM SongEntity WHERE playlist_creator_id = :playlistId AND id = :songId") - fun removeSong(playlistId: Int, songId: Int) + } \ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt index 24a63690..6cffd1f1 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt @@ -270,7 +270,7 @@ abstract class AbsPlayerFragment(@LayoutRes layout: Int) : AbsMainActivityFragme protected fun getUpNextAndQueueTime(): String { val duration = MusicPlayerRemote.getQueueDurationMillis(MusicPlayerRemote.position) - + return MusicUtil.buildInfoString( resources.getString(R.string.up_next), MusicUtil.getReadableDurationString(duration)