hum-0.2.0.0: A TUI MPD client, inspired by ncmpcpp
Copyright(c) Itai Y. Efrat 2020-2021
LicenseGPLv2-or-later (see LICENSE)
MaintainerItai Y. Efrat <itai3397@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Hum.Rebuild

Description

Functions that rebuild the state after changes that require it, Or that have to be here to avoid dependency loops.

Synopsis

Documentation

songsOfArtist :: Value -> IO (Vector Song) Source #

All songs of a given artist

songsOfAlbum :: Value -> IO (Vector Song) Source #

All songs in a given album

albumsOfArtist :: Value -> IO (Vector Value) Source #

All albums of a given artist

yalbumsOfArtist :: Bool -> Value -> IO (Vector (Value, Value)) Source #

All year-album pairs of a given artist

yearOfAlbum :: Value -> IO Value Source #

Earliest year of any song in the given album

rebuildLib :: MonadIO m => HumState -> m HumState Source #

Rebuild entire library state, keeping the index of the left column if possible.

rebuildLibArtists :: MonadIO m => HumState -> m HumState Source #

Rebuild library state from selected artist.

reloadLibArtists :: MonadIO m => HumState -> m HumState Source #

Rebuild library state from selected artist.

rebuildLibAlbums :: MonadIO m => HumState -> m HumState Source #

Rebuild library state from selected album.

reloadLibAlbums :: MonadIO m => HumState -> m HumState Source #

Rebuild library state from selected album, keeping the selected song index if possible.

rebuildPl :: MonadIO m => HumState -> m HumState Source #

Rebuild entire stored playlists state, keeping the index of the left column if possible.

rebuildPlList :: MonadIO m => HumState -> m HumState Source #

Rebuild stored playlists state from selected playlist.

reloadPlList :: MonadIO m => HumState -> m HumState Source #

Rebuild stored playlists state from selected playlist, keeping the selected song index if possible.

rebuildQueue :: MonadIO m => HumState -> m HumState Source #

Rebuild queue state, keeping the index of the left column if possible.

rebuildStatus :: MonadIO m => HumState -> m HumState Source #

Rebuild status and current song state.