Skip to content

Commit

Permalink
vscode trashed encoding of file
Browse files Browse the repository at this point in the history
  • Loading branch information
ocococococ committed Jan 13, 2023
1 parent 3e5d591 commit 11254c2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/parsley.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,7 @@ APar_MetaData_atomGenre_Set
genre is special in that it gets carried on 2 atoms. A standard genre (as
listed in ID3v1GenreList) is represented as a number on a 'gnre' atom any value
other than those, and the genre is placed as a string onto a 'gen' atom. Only
other than those, and the genre is placed as a string onto a '©gen' atom. Only
one or the other can be present. So if atomPayload is a non-NULL value, first
try and match the genre into the ID3v1GenreList standard genres. Try to remove
the other type of genre atom, then find or create the new genre atom and put the
Expand All @@ -2751,8 +2751,8 @@ void APar_MetaData_atomGenre_Set(const char *atomPayload) {
if (metadata_style == ITUNES_STYLE) {
const char *standard_genre_atom = "moov.udta.meta.ilst.gnre";
const char *std_genre_data_atom = "moov.udta.meta.ilst.gnre.data";
const char *custom_genre_atom = "moov.udta.meta.ilst.gen";
const char *cstm_genre_data_atom = "moov.udta.meta.ilst.gen.data";
const char *custom_genre_atom = "moov.udta.meta.ilst.©gen";
const char *cstm_genre_data_atom = "moov.udta.meta.ilst.©gen.data";

if (strlen(atomPayload) == 0) {
APar_RemoveAtom(std_genre_data_atom,
Expand All @@ -2770,15 +2770,15 @@ void APar_MetaData_atomGenre_Set(const char *atomPayload) {
modified_atoms = true;

if (genre_number != 0) {
// first find if a custom genre atom ("gen") exists; erase the
// first find if a custom genre atom ("©gen") exists; erase the
// custom-string genre atom in favor of the standard genre atom

AtomicInfo *verboten_genre_atom =
APar_FindAtom(custom_genre_atom, false, SIMPLE_ATOM, 0);

if (verboten_genre_atom != NULL) {
if (strlen(verboten_genre_atom->AtomicName) > 0) {
if (strncmp(verboten_genre_atom->AtomicName, "gen", 4) == 0) {
if (strncmp(verboten_genre_atom->AtomicName, "©gen", 4) == 0) {
APar_RemoveAtom(cstm_genre_data_atom, VERSIONED_ATOM, 0);
}
}
Expand Down Expand Up @@ -2835,7 +2835,7 @@ void APar_MetaData_atomLyrics_Set(const char *lyricsPath) {
modified_atoms = true;

AtomicInfo *lyricsData_atom =
APar_FindAtom("moov.udta.meta.ilst.lyr.data", true, VERSIONED_ATOM, 0);
APar_FindAtom("moov.udta.meta.ilst.©lyr.data", true, VERSIONED_ATOM, 0);
APar_MetaData_atom_QuickInit(
lyricsData_atom->AtomicNumber, AtomFlags_Data_Text, 0, file_len + 1);

Expand Down

0 comments on commit 11254c2

Please sign in to comment.