Get rid of mmd->afi.
[paraslash.git] / command.c
index 92fe18f..22e3aa9 100644 (file)
--- a/command.c
+++ b/command.c
@@ -120,7 +120,7 @@ static char *get_status(struct misc_meta_data *nmmd)
                "%s:%s\n"       "%s:%lu.%lu\n"  "%s:%lu.%lu\n",
                status_item_list[SI_FILE_SIZE], nmmd->size / 1024,
                status_item_list[SI_MTIME], mtime,
-               status_item_list[SI_LENGTH], nmmd->afi.seconds_total,
+               status_item_list[SI_LENGTH], nmmd->afd.afhi.seconds_total,
                status_item_list[SI_NUM_PLAYED], nmmd->num_played,
 
                status_item_list[SI_STATUS_BAR], bar ? bar : "(none)",
@@ -131,7 +131,7 @@ static char *get_status(struct misc_meta_data *nmmd)
                status_item_list[SI_OFFSET], offset,
                status_item_list[SI_FORMAT], audio_format_name(nmmd->audio_format),
                status_item_list[SI_AFS_MODE], mmd->afs_mode_string,
-               nmmd->afi.info_string,
+               nmmd->afd.afhi.info_string,
 
                status_item_list[SI_UPTIME], ut,
                status_item_list[SI_STREAM_START],
@@ -512,20 +512,20 @@ int com_ff(__a_unused int fd, int argc, char * const * argv)
                backwards = 1; /* jmp backwards */
        mmd_lock();
        ret = -E_NO_AUDIO_FILE;
-       if (!mmd->afi.chunks_total || !mmd->afi.seconds_total)
+       if (!mmd->afd.afhi.chunks_total || !mmd->afd.afhi.seconds_total)
                goto out;
-       promille = (1000 * mmd->current_chunk) / mmd->afi.chunks_total;
+       promille = (1000 * mmd->current_chunk) / mmd->afd.afhi.chunks_total;
        if (backwards)
-               promille -= 1000 * i / mmd->afi.seconds_total;
+               promille -= 1000 * i / mmd->afd.afhi.seconds_total;
        else
-               promille += 1000 * i / mmd->afi.seconds_total;
+               promille += 1000 * i / mmd->afd.afhi.seconds_total;
        if (promille < 0)
                promille = 0;
        if (promille >  1000) {
                mmd->new_vss_status_flags |= VSS_NEXT;
                goto out;
        }
-       mmd->repos_request = (mmd->afi.chunks_total * promille) / 1000;
+       mmd->repos_request = (mmd->afd.afhi.chunks_total * promille) / 1000;
        mmd->new_vss_status_flags |= VSS_REPOS;
        mmd->new_vss_status_flags &= ~VSS_NEXT;
        mmd->events++;
@@ -547,12 +547,12 @@ int com_jmp(__a_unused int fd, int argc, char * const * argv)
                return -E_COMMAND_SYNTAX;
        mmd_lock();
        ret = -E_NO_AUDIO_FILE;
-       if (!mmd->afi.chunks_total)
+       if (!mmd->afd.afhi.chunks_total)
                goto out;
        if (i > 100)
                i = 100;
        PARA_INFO_LOG("jumping to %lu%%\n", i);
-       mmd->repos_request = (mmd->afi.chunks_total * i + 50)/ 100;
+       mmd->repos_request = (mmd->afd.afhi.chunks_total * i + 50)/ 100;
        PARA_INFO_LOG("sent: %lu,  offset before jmp: %lu\n",
                mmd->chunks_sent, mmd->offset);
        mmd->new_vss_status_flags |= VSS_REPOS;