00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00032 #include <string.h>
00033
00034 #include "splt.h"
00035
00041 void splt_cc_put_filenames_from_tags(splt_state *state, int tracks, int *error)
00042 {
00043 int err = splt_tu_copy_first_common_tags_on_all_tracks(state, tracks);
00044 if (err < 0) { *error = err; return; }
00045
00046 if (splt_o_get_int_option(state, SPLT_OPT_OUTPUT_FILENAMES) == SPLT_OUTPUT_DEFAULT)
00047 {
00048 splt_of_set_oformat(state, SPLT_DEFAULT_CDDB_CUE_OUTPUT, error, SPLT_TRUE);
00049 if (*error < 0) { return; }
00050 }
00051
00052 err = splt_of_reparse_oformat(state);
00053 if (err < 0) { *error = err; return; }
00054
00055 splt_of_set_oformat_digits_tracks(state, tracks);
00056
00057 if (err < 0) { *error = err; return; }
00058
00059 splt_t_set_current_split(state, 0);
00060 int current_split = 0;
00061
00062 do {
00063 err = splt_u_finish_tags_and_put_output_format_filename(state, current_split);
00064 if (err != SPLT_OK) { *error = err; return; }
00065
00066 splt_t_current_split_next(state);
00067 current_split = splt_t_get_current_split(state);
00068 } while (current_split < tracks);
00069 }
00070
00071