Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37812104
en ru br
ALT Linux repositórios
S:0.9.2-alt1
5.0: 0.4-alt1.rc1
4.1: 0.4-alt1.rc1

Group :: Sistema/Bibliotecas
RPM: libmp3splt

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: libmp3splt-0.5-alt-cue-get-year.patch
Download


--- libmp3splt-0.5/include/libmp3splt/cddb.h~	2008-09-04 10:57:59 +0400
+++ libmp3splt-0.5/include/libmp3splt/cddb.h	2008-09-26 11:39:22 +0400
@@ -95,6 +95,7 @@ char *splt_freedb_get_file(splt_state *s
 #define SPLT_CUE_TITLE 2
 #define SPLT_CUE_PERFORMER 3
 #define SPLT_CUE_INDEX 4
+#define SPLT_CUE_YEAR 5
 
 //proxy stuff
 //#define PROXYCONFIG ".mp3splt"
--- libmp3splt-0.5/src/cddb.c~	2008-09-04 10:56:40 +0400
+++ libmp3splt-0.5/src/cddb.c	2008-09-26 11:52:27 +0400
@@ -287,6 +287,11 @@ static int splt_cue_set_value(splt_state *state, char *in,
 					snprintf(client_infos,strlen(out)+30,"  Album: %s\n", out);
 					splt_t_put_message_to_client(state, client_infos);
 				}
+				else if (tag_field == SPLT_TAGS_YEAR)
+				{
+					snprintf(client_infos,strlen(out)+30,"  Year: %s\n", out);
+					splt_t_put_message_to_client(state, client_infos);
+				}
 				free(client_infos);
 				client_infos = NULL;
 
@@ -399,6 +404,11 @@ int splt_cue_put_splitpoints(const char 
           line_content += 5;
           type = SPLT_CUE_TITLE;
         }
+        else if ((line_content = strstr(line, "DATE")) != NULL)
+        {
+          line_content += 4;
+          type = SPLT_CUE_YEAR;
+        }
         else if ((line_content = strstr(line, "PERFORMER")) != NULL)
         {
           type = SPLT_CUE_PERFORMER;
@@ -463,6 +473,31 @@ int splt_cue_put_splitpoints(const char 
               title = SPLT_TRUE;
             }
             break;
+          //YEAR found
+          case SPLT_CUE_YEAR:
+            if (tracks == -1)
+            {
+              if ((temp_error = splt_cue_set_value(state, line_content, 
+                      0, SPLT_TAGS_YEAR)) != SPLT_OK)
+              {
+                *error = temp_error;
+                goto function_end;
+              }
+            }
+            else
+            {
+              if (tracks > 0)
+              {
+                if ((temp_error = splt_cue_set_value(state, line_content,
+                        tracks-1, SPLT_TAGS_YEAR)) != SPLT_OK)
+                {
+                  *error = temp_error;
+                  goto function_end;
+                }
+              }
+              title = SPLT_TRUE;
+            }
+            break;
           //PERFORMER found
           case SPLT_CUE_PERFORMER:        
             if (tracks == -1)
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009