path: root/src/idop.c
AgeCommit message (Collapse)AuthorFiles
2017-03-11Version 2.1HEADmasterSergey Poznyakoff1
2017-01-30Apply --broken-8bit-charset only to frames in 8-bit encoding.Sergey Poznyakoff1
* src/frametab.gperf (decode_qv): Passe frame as the 2nd argument to field_to_string. (text_decode): Likewise. * src/idest.h (idest_ucs4_cvt): Remove. (field_to_string): Change the type of the 2nd argument. * src/idop.c (frame_encoding_is_8bit) (frame_is_genre): New auxiliary functions. (idest_ucs4_cvt): Take frame as the 2nd argument. Do recoding only if the frame's encoding in 8-bit. (add_stringlist): Take frame instead of the isgenre boolean; pass it to idest_ucs4_cvt. All uses changed. (field_to_string): Take frame as the 2nd argument. All uses changed. (fixup_charset): Merge with collect_text_frames.
2016-11-17Keep textual data in UTF-8 internally; provide new options for recodingSergey Poznyakoff1
* libid3tag/tag.c (id3_tag_new): Use conservative default options. * Check for iconv * src/utf8conv.c: New file. * src/ (idest_SOURCES): Add new source file. (LDADD): Link with iconv libraries. * src/backup.c (copy_file): Initialize fsize properly. * src/cmdline.opt: New options: --fixup, --broken-8bit-charset, --encoding * src/guile.c: Remove unused functions. * src/frametab.gperf: Use textual_frame_encoding. * src/idest.h: Include locale.h (latin1_option): Remove. (charset,broken_8bit_charset) (textual_frame_encoding,fixup_option): New globals. (idest_conv_mode): New enum (utf8_convert): New proto. * src/idop.c (idest_ucs4_cvt): Hanlde broken_8bit_charset option. (set_tags): Fix-up frames if so requested. * src/main.c (latin1_option): Remove. (textual_frame_encoding,fixup_option): New globals (main): Set locale. * bootstrap: Update. * gnulib: Update. * gnulib.modules: Add localcharset * doc/html.init: Minor change. * doc/idest.texi: Update docs.
2015-11-05Bugfixes.Sergey Poznyakoff1
1. Fix --convert option so it can be used to remove unnecessary ID3 formats (e.g. --convert=2). 2. Fix processing of unknown frames in Guile code. 3. Fix setpic and pic modules. * scheme/idest/batch/setpic.scm (read-picture): Use binary i/o. * scheme/idest/format/pic.scm (save-picture): Likewise. * scheme/idest/list-modules.scm: Minor changes. * src/frametab.gperf (frame_field_from_rawdata): New function. * src/getopt.m4: Update copyright years. * src/guile.c (set_frame_from_rawdata): Use frame_field_from_rawdata. * src/idest.h (frame_field_from_rawdata): New proto. * src/idop.c (set_tag_options): Always call id3_tag_options.
2011-07-29Add more tests.Sergey Poznyakoff1
* src/idest.h (source_vopt): New extern. (guess_file_tag_options): New proto. * src/idop.c (parse_ed_items): Use only commas as separators. (set_tag_options,guess_file_tag_options): New function. (find_matching_frame): Use the above functions. (del_tags): make sure tag version remains unchanged, unless requested so on the command line. * src/main.c (source_vopt): New variable. (main): Set source_vopt. * tests/ Add new testcases. * tests/ Add new testcases. * tests/ New testcase. * tests/ New testcase. * tests/ New testcase. * tests/ New testcase. * tests/ New testcase. * tests/ New testcase. * tests/ New testcase. * tests/ New testcase. * tests/ New testcase. * tests/ New testcase.
2011-07-27Add full support for APIC frames.Sergey Poznyakoff1
* src/frametab.gperf: Support APIC. * src/idop.c (field_binary_from_string): Accept lowercase hex digits. * scheme/idest/batch/setpic.scm: New batch. * scheme/idest/format/pic.scm: Use named elements.
2011-07-23Implement new formats: framelist & lyrics.Sergey Poznyakoff1
* scheme/format.scm: Set actual format script name as argv[0] * src/cmdline.opt <format>: Use `stop' to stop argument processing. * src/getopt.m4 (GETOPT): New local variable `stop'. * scheme/idest/format/framelist.scm: New file. * scheme/idest/format/lyrics.scm: New file.
2011-07-17Update docs. Accept --filter option with --list-frames.Sergey Poznyakoff1
2011-07-17Minor changes.Sergey Poznyakoff1
2011-07-17Fix some warnings.Sergey Poznyakoff1
2011-07-17New feature: copy tags between files.Sergey Poznyakoff1
* NEWS: Update. * src/cmdline.opt: New option --copy. Call parse_filter_items instead of parse_ed_items. * src/editem.c (ed_list_locate): New function. * src/idest.h (source_file, source_tag): New externs. (input_list_locate,parse_ed_items): Remove. (parse_filter_items): New proto. (ed_list_locate): New proto. * src/idop.c (filter_list): New list. (input_list_locate): Remove. Use ed_list_locate with a proper first argument. All uses updated. (parse_ed_items): Take 2 args. (parse_filter_items): New function. (input_list_init): Rename to filter_list_init. Operate on filter list. (output_list_print): Operate on filter_list. (copy_source_tags): New static function. (set_tags): Call copy_source_tags. (del_tags): Operate on filter_list. * src/main.c (source_file,source_tag): New variables. (main): Read source tags if --copy is requested.
2011-07-17Handle unsupported frames in Scheme code graciously.Sergey Poznyakoff1
* src/frametab.gperf (encode_field): Rename to frame_field_from_string. Handle ID3_FIELD_TYPE_INT32PLUS and ID3_FIELD_TYPE_BINARYDATA. * src/guile.c (idest_rawdata): New global symbol. (frame_to_scm): Handle frames for which no frametab is defined. (scm_to_tag): Handle frames in raw format. * src/idest.h (field_binary_from_string) (field_binary_to_string) (frame_field_from_string): New protos. * src/idop.c (field_binary_to_string): New function. (field_binary_from_string): New function. (field_to_string): Handle ID3_FIELD_TYPE_INT32PLUS and ID3_FIELD_TYPE_BINARYDATA.
2011-07-17BugfixSergey Poznyakoff1
* src/idop.c (output_list_print): Fix coredump on empty output list.
2011-07-16Major rewrite.Sergey Poznyakoff1
* src/idest.h (ed_item): Remove union, leave only value instead. <ref>: New member. (describe_option,verbose_option,all_frames): New externs. (set_frame_value): Return int. (IDEST_OK,IDEST_ERR_*): New constants. (_idest_errstr, _idest_nerrs): New externs. (idest_frame_cmp_t,idest_frame_encoder_t) (idest_frame_decoder_t): New typedefs. (idest_frametab): New struct. (idest_frame_lookup) (find_matching_frame): New protos. (ed_list_add_item) (ed_list_print,ed_list_add_assignment) (ed_list_clear,ed_item_matches_frame) (ed_item_set_comment_fields): Remove. (qv_free,input_list_locate) (parse_ed_items): New protos. * src/idop.c: Rewrite. * src/.gitignore: Add src/frametab.c * src/ (idest_SOURCES): Add editem.c and frametab.c (BUILT_SOURCES): Add frametab.c (.gperf.c): New rule (GPERF_FLAGS): New variable. * src/editem.c: New source. * src/frametab.gperf: New source. * src/cmdline.opt: Use input_list_add_assignment in --set handler. * src/guile.c (frame_to_scm,scm_to_tag): Rewrite using the new logic.
2011-07-12Get rid of argmatch.Sergey Poznyakoff1
* gnulib.modules: Remove argmatch. * src/backup.c: Remove unused include. * src/idest.h: Remove unused include. (frame_id): Rename to frame_to_item_id. (ed_item_set_comment_fields): New proto. * src/main.c (item_ids, item_names) (item_frames) (item_id,frame_id) (ed_item_find): Remove. (item_table, item_count): New variables. (name_to_item_info) (frame_id_to_item_info) (frame_to_item_id): New functions.
2011-07-12Change ID3 version handling.Sergey Poznyakoff1
* src/cmdline.opt: New option --default-id-version. The --convert and --id-version take version list as their argument. * src/idest.h (IDEST_ID3V_1) (IDEST_ID3V_2): New constants. (default_version_option): New extern. * src/idop.c (set_tags): Don't alter version_option. Unless none of version_option, default_version_option or convert_version is set, preserve existing file structure. Create new tags according to the settings of default_version_option. * src/main.c (main): Set default value for default_version_option. * NEWS: Document changes. * doc/idest.texi: Update.
2011-07-12Fix terminology. Use "content descriptor" (or condesc) throughout the code ↵Sergey Poznyakoff1
and docs.
2011-07-11Accept comment content descriptors in --delete.Sergey Poznyakoff1
* src/idest.h (ed_item_matches_frame): New proto. * src/idop.c (del_tags): Use ed_item_matches_frame to find matching frames. * src/main.c (ed_item_matches_frame): Remove static qualifier. * NEWS, doc/idest.texi: Update.
2011-07-11New option --describe. Accept content descriptors in -q args.Sergey Poznyakoff1
* src/cmdline.opt: New option --describe * src/main.c (describe_option): New variable. (str_split_col): New function, (ed_list_new_item): Rewrite. (ed_item_matches_frame): New function, (ed_list_add_item): Honor describe_option. (ed_list_add_assignment): Use ed_list_new_item. (ed_list_print): Minor change. * NEWS: Updated * doc/idest.texi: Updated.
2011-07-11Change Scheme representation of frame lists.Sergey Poznyakoff1
* doc/idest.texi: Update * src/guile.c (field_to_scm): Support all conversions, except ID3_FIELD_TYPE_BINARYDATA. (frame_to_scm): Rewrite taking into account new frame list format. (scm_to_tag): Likewise. (setval): Remove. * src/idop.c (set_frame_value): Accept any frame type.
2011-07-11Accept language and class specs when setting comment fields.Sergey Poznyakoff1
* src/idest.h (set_frame_value): Change signature. * src/idop.c (set_frame_value): Change signature. Set lang and class for comment fields, if supplied. (update_frame): New function. Introduces special handling for comment fields. (set_tags): Call update_frame. * src/main.c (ed_list_add_assignment): Accept language and class specs for comment fields (--set comment:lang:class=value). * NEWS: Update.
2011-07-11Include comment classes (short descriptions) to the output.Sergey Poznyakoff1
* src/idest.h (ed_item): New members lang & class. (field_to_string): New proto. (ed_list_add_item): Change signature. * src/idop.c (add_stringlist): Change signature. Optionally return the total length of strings added to the list. All uses changed. (field_to_string): New function. (ed_item_set_comment_fields): New function. * src/main.c (ed_list_add_item): Add comment classes.
2011-07-08Make sure no old tag instances remain after modifications.Sergey Poznyakoff1
* src/guile.c (guile_transform): Remove existing tags prior to installing new ones. * src/idop.c (set_tags): Remove all existing instances of the tag except the first one prior to altering it. * libid3tag/frame.c: Add type casts. * libid3tag/render.c: Likewise. * libid3tag/tag.c: Likewise.
2011-07-08Add a possibility to delete a subset of ID3 frames.Sergey Poznyakoff1
* NEWS: Document changes to --delete. * doc/idest.texi: Likewise. * src/cmdline.opt: --delete takes optional argument. -d is a shorthand for it. * src/idop.c (del_tags): Delete only certain frames, if a frame list is given.
2011-07-08Minor change.Sergey Poznyakoff1
* src/idop.c (del_tags): Use id3_tag_clearframes.
2011-07-08Implement the --info option.Sergey Poznyakoff1
* NEWS: Update. * Version 1.2.90 * doc/idest.texi: Document the --info option. * libid3tag/file.c (id3_file_struct_ntags) (id3_file_struct_iterate): New functions. * libid3tag/file.h (id3_file_struct_ntags) (id3_file_struct_iterate): New protos. (id3_file_struct_iterator_t): New data type. * src/cmdline.opt: New option --info. * src/idest.h (info_id3): New proto. (del_id3v2): Remove. * src/idop.c (info_id3): New function. * src/main.c (id3_mode): Add info_id3.
2011-03-20Improve signal handling; new option --verboseSergey Poznyakoff1
* NEWS: Update. * src/cmdline.opt: New option --version * src/idop.c (safe_id3_file_update_and_close): New function. (set_tags, del_tags): Use safe_id3_file_update_and_close. * src/main.c (verbose_option): New variable. (main): Print name of the file being processed, if verbose_option is set.
2011-03-19Update copyright years.Sergey Poznyakoff1
2010-04-01Update for recent Gnulib.Sergey Poznyakoff1
* src/idest.h: Include gl_xlist.h. (set_frame_value): New proto. * src/idop.c (add_stringlist, add_field, frame_to_list): Static. * src/slist.c: Shut up gcc warnings. * gnulib.modules: Add xlist. * src/backup.c: Include unistd.h
2010-01-02Update copyright years.Sergey Poznyakoff1
Happy GNU Year!
2009-03-17Improve scripting, implement v1->v2 conversion, implement --delete command.Sergey Poznyakoff1
* libid3tag/file.c (v2_write): Change for make it possible to convert v1 to v2. * src/.gitignore: Add guile.x. * src/ (idest_SOURCES): Add guile.x (BUILT_SOURCES): Add guile.x (SUFFIXES): Add .x (.c.x): New rule * src/cmdline.opt: New option: --trace. * src/guile.c: Rewrite. * src/idest.h (MODE_QUERY, MODE_MOD, MODE_DELETE): New defines (from main.c). (guile_transform, guile_list): New protos. (guile_apply): Remove. * src/idop.c (set_tags): Handle convert_version == 2. (del_tags): New function. * src/main.c (del_id3): Call del_tags
2009-03-16Finish guile supportSergey Poznyakoff1
2009-03-16Minor fixesSergey Poznyakoff1
2009-03-15Remove old v1 code. Add an option for converting tags to v1.Sergey Poznyakoff1
* libid3tag/file.c (SIZE_T_MAX): Rename to MALLOC_MAX. Use (size_t_max-1), due to a bug in glibc's malloc. (make_temp_file): Fix size calculation (memory overrun). (v2_write): data and/or length can be 0. (id3_file_update): Drop v2 header, if ID3_TAG_OPTION_NO_ID3V2 is set. * libid3tag/id3tag.h (ID3_TAG_OPTION_NO_ID3V2): New constant. * src/id3v1.c, src/id3v1.h: Remove. * src/id3v2.c: Rename to... * src/idop.c: ... this. (set_tags): Handle convert_version and version_option. * src/ Reflect the above. * src/cmdline.opt (--convert, -C): New option. * src/idest.h: Kick off id3v1.h. (convert_version, version_option): new externs. (set_id3v1, query_id3v1, del_id3v1) (set_id3v2, query_id3v2, del_id3v2): Remove. (set_tags, query_tags, del_tags): New prototypes. * src/main.c (convert_version): New variable. (query_id3): use all_frames to determine ed_list. (set_id3): Remove old v1 code. (main): Remove old v1 code.

Return to:

Send suggestions and report system problems to the System administrator.