From 6606e39f6da9422e2f74d953ad6f77afa68fc3d2 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Thu, 1 Sep 2022 10:33:39 -0400 Subject: [PATCH] 2022-09-01 Fred Gleason * Added CD-Text support to rdlibrary(1). Signed-off-by: Fred Gleason --- ChangeLog | 2 + docs/opsguide/rdadmin.xml | 28 ++-- icons/Makefile.am | 4 + icons/cd-text-55x47.xpm | 290 +++++++++++++++++++++++++++++++++++++ icons/cd-text.svg | 47 ++++++ icons/cddb-60x25.xcf | Bin 0 -> 1970 bytes icons/cddb-60x25.xpm | 144 ++++++++++++++++++ lib/rdcddblookup.cpp | 21 +-- lib/rdcddblookup.h | 22 +-- lib/rddisclookup.cpp | 205 ++++++++++++++++++++++---- lib/rddisclookup.h | 44 ++++-- lib/rddiscmodel.cpp | 14 +- lib/rddiscmodel.h | 4 +- lib/rddiscrecord.cpp | 142 ++++++++++++------ lib/rddiscrecord.h | 51 +++---- lib/rddummylookup.cpp | 4 +- lib/rddummylookup.h | 2 +- lib/rdfontengine.cpp | 2 +- lib/rdlibrary_conf.cpp | 36 ++++- lib/rdlibrary_conf.h | 5 +- lib/rdmblookup.cpp | 15 +- rdadmin/edit_rdlibrary.cpp | 6 +- rdlibrary/cdripper.cpp | 38 ++++- rdlibrary/disk_ripper.cpp | 55 +++++-- rdlibrary/disk_ripper.h | 2 +- rdlibrary/rdlibrary.cpp | 28 ---- 26 files changed, 984 insertions(+), 227 deletions(-) create mode 100644 icons/cd-text-55x47.xpm create mode 100644 icons/cd-text.svg create mode 100644 icons/cddb-60x25.xcf create mode 100644 icons/cddb-60x25.xpm diff --git a/ChangeLog b/ChangeLog index bb9ffa67..410fef20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23239,3 +23239,5 @@ 2022-08-18 Fred Gleason * Fixed a bug in PyPAD where resolution of datetimes could be incorrect. +2022-09-01 Fred Gleason + * Added CD-Text support to rdlibrary(1). diff --git a/docs/opsguide/rdadmin.xml b/docs/opsguide/rdadmin.xml index 316ad74d..968717e2 100644 --- a/docs/opsguide/rdadmin.xml +++ b/docs/opsguide/rdadmin.xml @@ -1004,7 +1004,7 @@ The CD Metadata Source: dropdown determines the type of data source that will be used to lookup - CDs for metadata records. Three options are available: + CDs for external metadata records. Three options are available: @@ -1029,33 +1029,35 @@ - FreeDB + CDDB Use a - FreeDB database. + CDDB database. - If selected, the FreeDB Server: - field is used to provide the hostname of the server. - - - Since the original public FreeDB gateway at - freedb.freedb.org was - shutdown in March 2019, use of a FreeDB database will - generally require that a site maintain their own database server. - + If selected, a CDDB Server: + field will also appear, which takes the hostname of the CDDB + server to use (default value + freedb.freedb.org). + None - Do not perform any metadata lookup. + If selected, no external metadata lookup will be performed. + + Rivendell's CD rippers will also attempt to detect + CD-Text + data on all discs and will use any information so detected in + preference to that supplied by an external lookup. + The Format: dropdown indicates the audio encoding format to be used in Rivendell's audio store for diff --git a/icons/Makefile.am b/icons/Makefile.am index 7c50fb8d..91c236cc 100644 --- a/icons/Makefile.am +++ b/icons/Makefile.am @@ -280,6 +280,10 @@ EXTRA_DIST = admin.xpm\ blueball.xpm\ bug-138x60.png\ bug-138x60.xpm\ + cd-text-55x47.xpm\ + cd-text.svg\ + cddb-60x25.xcf\ + cddb-60x25.xpm\ chain.png\ chain.xpm\ checkmark.xpm\ diff --git a/icons/cd-text-55x47.xpm b/icons/cd-text-55x47.xpm new file mode 100644 index 00000000..3e9327ab --- /dev/null +++ b/icons/cd-text-55x47.xpm @@ -0,0 +1,290 @@ +/* XPM */ +static const char * cd_text_55x47_xpm[] = { +"55 47 240 2", +" c None", +". c #FFFFFF", +"+ c #C5C5C5", +"@ c #666666", +"# c #A4A4A4", +"$ c #DEDEDE", +"% c #616161", +"& c #484848", +"* c #575757", +"= c #B8B8B8", +"- c #DADADA", +"; c #5F5F5F", +"> c #585858", +", c #BEBEBE", +"' c #B2B2B2", +") c #C3C3C3", +"! c #C0C0C0", +"~ c #B5B5B5", +"{ c #AFAFAF", +"] c #7F7F7F", +"^ c #E6E6E6", +"/ c #E1E1E1", +"( c #888888", +"_ c #B7B7B7", +": c #626262", +"< c #4C4C4C", +"[ c #5C5C5C", +"} c #999999", +"| c #7D7D7D", +"1 c #131313", +"2 c #8B8B8B", +"3 c #1D1D1D", +"4 c #979797", +"5 c #464646", +"6 c #414141", +"7 c #818181", +"8 c #222222", +"9 c #989898", +"0 c #404040", +"a c #070707", +"b c #565656", +"c c #505050", +"d c #838383", +"e c #7A7A7A", +"f c #2C2C2C", +"g c #1B1B1B", +"h c #919191", +"i c #171717", +"j c #080808", +"k c #F5F5F5", +"l c #424242", +"m c #474747", +"n c #777777", +"o c #000000", +"p c #5E5E5E", +"q c #DFDFDF", +"r c #B4B4B4", +"s c #E9E9E9", +"t c #0F0F0F", +"u c #828282", +"v c #454545", +"w c #F0F0F0", +"x c #E4E4E4", +"y c #787878", +"z c #4E4E4E", +"A c #848484", +"B c #444444", +"C c #161616", +"D c #151515", +"E c #4D4D4D", +"F c #EAEAEA", +"G c #3F3F3F", +"H c #B3B3B3", +"I c #393939", +"J c #8E8E8E", +"K c #EEEEEE", +"L c #E3E3E3", +"M c #E8E8E8", +"N c #868686", +"O c #3D3D3D", +"P c #8A8A8A", +"Q c #7C7C7C", +"R c #4A4A4A", +"S c #5B5B5B", +"T c #494949", +"U c #010101", +"V c #121212", +"W c #ABABAB", +"X c #1F1F1F", +"Y c #696969", +"Z c #3C3C3C", +"` c #878787", +" . c #B6B6B6", +".. c #A8A8A8", +"+. c #181818", +"@. c #050505", +"#. c #606060", +"$. c #9F9F9F", +"%. c #040404", +"&. c #6A6A6A", +"*. c #AEAEAE", +"=. c #F6F6F6", +"-. c #1A1A1A", +";. c #DDDDDD", +">. c #9B9B9B", +",. c #CCCCCC", +"'. c #D9D9D9", +"). c #FDFDFD", +"!. c #FEFEFE", +"~. c #E7E7E7", +"{. c #FBFBFB", +"]. c #EFEFEF", +"^. c #EDEDED", +"/. c #FAFAFA", +"(. c #FCFCFC", +"_. c #B1B1B1", +":. c #757575", +"<. c #141414", +"[. c #EBEBEB", +"}. c #DCDCDC", +"|. c #D3D3D3", +"1. c #BFBFBF", +"2. c #CACACA", +"3. c #2E2E2E", +"4. c #7E7E7E", +"5. c #9C9C9C", +"6. c #030303", +"7. c #292929", +"8. c #555555", +"9. c #808080", +"0. c #202020", +"a. c #797979", +"b. c #C6C6C6", +"c. c #020202", +"d. c #D2D2D2", +"e. c #F2F2F2", +"f. c #4F4F4F", +"g. c #E5E5E5", +"h. c #111111", +"i. c #D8D8D8", +"j. c #0E0E0E", +"k. c #F8F8F8", +"l. c #969696", +"m. c #313131", +"n. c #A9A9A9", +"o. c #ECECEC", +"p. c #A3A3A3", +"q. c #545454", +"r. c #ACACAC", +"s. c #C9C9C9", +"t. c #383838", +"u. c #252525", +"v. c #909090", +"w. c #676767", +"x. c #363636", +"y. c #898989", +"z. c #BDBDBD", +"A. c #9D9D9D", +"B. c #5A5A5A", +"C. c #8D8D8D", +"D. c #595959", +"E. c #333333", +"F. c #2F2F2F", +"G. c #060606", +"H. c #F3F3F3", +"I. c #9E9E9E", +"J. c #F1F1F1", +"K. c #212121", +"L. c #959595", +"M. c #BABABA", +"N. c #BBBBBB", +"O. c #C7C7C7", +"P. c #F4F4F4", +"Q. c #2A2A2A", +"R. c #CBCBCB", +"S. c #F7F7F7", +"T. c #707070", +"U. c #303030", +"V. c #E0E0E0", +"W. c #A0A0A0", +"X. c #BCBCBC", +"Y. c #D7D7D7", +"Z. c #515151", +"`. c #3E3E3E", +" + c #AAAAAA", +".+ c #B0B0B0", +"++ c #737373", +"@+ c #5D5D5D", +"#+ c #DBDBDB", +"$+ c #0D0D0D", +"%+ c #CFCFCF", +"&+ c #3A3A3A", +"*+ c #CECECE", +"=+ c #191919", +"-+ c #0C0C0C", +";+ c #6C6C6C", +">+ c #323232", +",+ c #262626", +"'+ c #9A9A9A", +")+ c #343434", +"!+ c #2B2B2B", +"~+ c #232323", +"{+ c #D0D0D0", +"]+ c #CDCDCD", +"^+ c #272727", +"/+ c #F9F9F9", +"(+ c #101010", +"_+ c #1C1C1C", +":+ c #D5D5D5", +"<+ c #353535", +"[+ c #0A0A0A", +"}+ c #3B3B3B", +"|+ c #525252", +"1+ c #717171", +"2+ c #A5A5A5", +"3+ c #6F6F6F", +"4+ c #D1D1D1", +"5+ c #6E6E6E", +"6+ c #4B4B4B", +"7+ c #E2E2E2", +"8+ c #636363", +"9+ c #646464", +"0+ c #686868", +"a+ c #C1C1C1", +"b+ c #C8C8C8", +"c+ c #D4D4D4", +"d+ c #858585", +"e+ c #434343", +"f+ c #0B0B0B", +"g+ c #090909", +"h+ c #939393", +"i+ c #C4C4C4", +"j+ c #535353", +"k+ c #A2A2A2", +"l+ c #ADADAD", +"m+ c #7B7B7B", +"n+ c #D6D6D6", +"o+ c #6D6D6D", +"p+ c #A6A6A6", +"q+ c #767676", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . + @ @ @ @ # . $ % & * = - ; & > , ' @ ) . ! @ ~ { @ @ ] ^ / @ ( . _ * & % ! : : : $ . . . ", +". . . . . . . . . . < [ } } | 1 . 2 3 4 5 6 7 8 9 0 < ] a b . c a d e f 7 g 7 h i j k l m 4 3 n [ o p q . . . ", +". . . . . . . . . . & r . . s t . u v . w x y z . A 6 ] B C ^ D 0 d e E F G e m d g H I J . ^ K L o M . . . . ", +". . . . . . . . . . & r . . s t . N O . r P Q m . | v ] z * R S T d e U o V W j T X Y Z ` . ( .L o M . . . . ", +". . . . . . . . . . & ~ . . F t . ..U +.@.#.$.U +.%.&.] z *.o ' T d e < =.. H -.;.>.X ; @.+.U ..L o M . . . . ", +". . . . . . . . . . & .. . F t . . ^ ,.'.).. x ,.- !.K ~.{.;.{.~.].^.M . . ].^ . /.;.{.'.,.^ . (.q ).. . . . ", +". . . . _.Q n n n :.<.! . . [.t . }.e n n n ... . . .Q n n n n n n n n |.. . . 1.] n n n n n n d 2.. . . . . ", +". . . p 3.4.( ( ( ( 5.).. . [.t . @ l ( ( y 6./.. &.7.Q ( ( ( ( ( ( ( c 8.. . 9.0.a.( ( ( ( ( ( :.+.9 . . . . ", +". . b.8 =.. . . . . . . . . [.t . #.>.. . . c.=.d.-.e.. . . . . . . . W f.. g.h.M . . . . . . . . i.j.k.. . . ", +". . l.% . . . i.m m.n.. . . o.t . #.>.. . . c.=.p.q.. . . . . . . . . r.c . = G . . . s.t.6 i.. . . u.d.. . . ", +". . v.w.. . . x.y.z.<./ . . o.t . #.>.. . . c.=.A.B.. . (.C.> 8.D.@ @ E.; . ' v . . . F.4 9.T . . . f ,.. . . ", +". . v.w.. . . G.H.. 5 r . . o.t . #.5.. . . 6.=.A.B.. . $.m.9 } } } } I.[.. ' v . . . j J.i.K.. . . f ,.. . . ", +". . v.w.. . . %.k . & ' . . o.t . #.5.. . . 6.=.A.B.. . L.0 M.N.N.N.O.P.. . ' v . . . G.P.'.0.. . . Q.R.. . . ", +". . v.w.. . . %.k . & ' . . ^.t . #.5.. . . %.=.A.B.. . S.T.B B B t.f C _ . ' v . . . G.P.s a U.E.m.@.V.. . . ", +". . v.w.. . . %.k . & ' . . ^.t . #.5.. . . %.=.W.* . . . . . . . . . X.D J.' v . . . G.P.. - N.N.N.Y.. . . . ", +". . v.w.. . . %.k . & ' . . ^.t . #.A.. . . @.=.2.8 k.. . . . . . . . . t., ' v . . . G.P.. . . . . . . . . . ", +". . v.w.. . . %.k . & ' . . K t . #.A.. . . @.=.. Z.`.>. + + +W / . . . 5 .+' v . . . G.P.).y 8.8.8.++{.. . . ", +". . v.w.. . . %.k . & ' . . K t . #.A.. . . G.=.. (.} @+8.8.8.f.<./ . . 5 _.' v . . . G.P.#+$+l.} 4 V %+. . . ", +". . v.w.. . . %.k . & ' . . K t . #.I.. . . G.=.. . . . . . . (.&+_.. . v _.' v . . . G.P.'.K.. . . f ,.. . . ", +". . v.w.. . . t ^ . t., . . ].t . #.I.. . . a =.*+=+h.h.h.h.h.-+Z k . . v ' ' v . . . t x 2.7.. . . f ,.. . . ", +". . v.w.. . . ;+>+q.,+=.. . ].t . #.I.. . . a =.'+T K K K K K e.. . . . B H ' v . . . [ 6 )+n . . . !+,.. . . ", +". . W & . . . !.*.9 ].. . . w t . #.I.. . . j =.'+@+. . . . . . . . . !.~+{+]+^+!.. . /+$...).. . /.(+M . . . ", +". . w _+h s K K K K K K K K :+t . #.y.K K ^ @.=.'+R K K K K K K K K V.T.<+(.{.m.n x K K K K K K / % & . . . . ", +". . . :+B [+o o o o o o o o o Z.. A.@.o o o }+. %+V o o o o o o o o 1 D.~.. . L |+j.o o o o o o V ; ^.. . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . o.n n 4.' ^.1+k y.@+p v.].1+%+1+1+1+~.2+@ + . W.~ . . . . 2+@ b.!.n / . ] i.7 n e A.{.y ;.A.#.[ 9./.. . . ", +". . }.o 3+c c.:+o 4+o :.5+o 4+o 1.6+o q.7+3.C 8+. |+a.. . . . 3.C 9+).o O.. t .1 b 0+U a+[+a+%.% 7 o R.. . . ", +". . }.o K ;.o 2.o b+o ^. +W.i.o M '.o e.L U 9 =+!.|+a.. . . L U 9 =+(.o O.. t .1 = . 1 ' [+X.o ,.. G.! . . . ", +". . }.o K c+o ]+o R.o ^ d+e+,.o M '.o e.} f+[ o *+|+y {.!.. 9 f+[ o %+%.! !.g+X.1 = ).$+ .[+1.o O.(.6.) . . . ", +". . }.o V G.g #+o ;.j g +.$+- o M '.o e.f.T.;.e+A |+o o h+. z 1+;.e+d+0.1 K.c.Y.1 j.g+g+i.[+a+=+<.X 6.$ . . . ", +". . k.,.,.}././+{+(.M ) i+F /.{+{./+{+).7+H.. o.s q %+%+[.. 7+H.. o.s w b.a+7+. {+,.Y.P.. |.P.].+ a+x . . . . ", +". . . b+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +,.. . . . ", +". . } D q.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.j+1 k+. . . ", +". . R p.. . . . . . . . . . . . o.i+i+i+i+x R.i+i+i+s q . . . #+d.i+i+i+i+. . . . . . . . . . . . . '+j+. . . ", +". . v l+. . . . . . . . . . . . $ 4 n 9+4 %+q.4 4 4 V.&.Y.. J .+{ 4 e+4 4 !.. . . . . . . . . . . . # z . . . ", +". . v l+. . . . . . . . . . . . . . b+... . m+. . . . P.* X.9.. . . 1+. . . . . . . . . . . . . . . # z . . . ", +". . v l+. . . . . . . . . . . . . . b+... . `.[ [ [ ~.. # =+e.. . . 1+. . . . . . . . . . . . . . . # z . . . ", +". . v l+. . . . . . . . . . . . . . b+... . m+. . . . ^.[ n+T.. . . 1+. . . . . . . . . . . . . . . # z . . . ", +". . v l+. . . . . . . . . . . . . . b+... . o+'.'.'.e.B.V.. p+W.. . 1+. . . . . . . . . . . . . . . # z . . . ", +". . v l+. . . . . . . . . . . . . . g.:+. . v.u u u z.+ . . . ..).. M.. . . . . . . . . . . . . . . # z . . . ", +". . o+& + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +n.6 q+. . . ", +". . ].T.B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B v ++e.. . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "}; diff --git a/icons/cd-text.svg b/icons/cd-text.svg new file mode 100644 index 00000000..11dcc622 --- /dev/null +++ b/icons/cd-text.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/icons/cddb-60x25.xcf b/icons/cddb-60x25.xcf new file mode 100644 index 0000000000000000000000000000000000000000..4925471e5bab1336e3f516e356e6f4d49391e820 GIT binary patch literal 1970 zcmcgtO>7%Q6rSzIb{fZO(lkZL4rzENkqi~Dm5TDP^nF;sMLvV9`Eg6)`_|Dr04nG zoA1rczWH`-$kH6I<_f$ZO~KG!K!2D3+90~3;Li|x@6=hw$kFzp_n<$7zCXak8%F*N zju``&)pB;JBrF$WMw5G|%R+ZWp3h6S$Y)+V_6E%icvM-^4WSujnWr4G6*lg;HB)fM zHf8=`-*~~u*`{6QL8ZRb}0?#`F{f{tvYjhPFe;(9PWk5 zTDN47(<+v9xwLXc;ZVI@C^*864oKBIQ+}qil=={ua*46zk70yk7JU?*x|*2IW~Xpu zyXXfkiB5L|=)D0Z;_d+Bz#fa?z8Fr&aDNPEVt5Z?T9?)&PodL(WT7rp#H59zIQkdt zimI!bdQFsxhjq%xIOX^loqr7bQm`$I-qbB8j5J5SEBMo~&J)MW`n{TyRbf(_b<35y zDRqa}ytbRVWmHg6d`wtc#anPzcZ8OgWs!5GZE@2rW8HR1MfbE5kQz=^99I@<+!O^D z!&$qkmF&F0cc&^yqm-DJc~ti^lcE0nY*9#~=<kUXibCoJm(7rT;w}$i>OhWs&VbsFPTL7PD2U8i=P+^;cum1rHD4k~J4xGj%T14w%e;-+gQ+`cHpt4pDJ|Vt@6(!^+*nGVMIiRVv8S3304hYk2Hy3&qN zVH@d*FJWyrZqgPTap8QnHxf<=Q8?|BD6#dC4_59qZhjNVa^u#O#b+Z~#v+tu^UtN{ zSY3UO)!CU2N4<}s51^C9|G?5ydhTtbY*(y2P5ob=M%s(4+ov)7Ow;s&$J#nFel}C* PI&-Ou6xS0sAoPC$gn1WR literal 0 HcmV?d00001 diff --git a/icons/cddb-60x25.xpm b/icons/cddb-60x25.xpm new file mode 100644 index 00000000..bfe90fdd --- /dev/null +++ b/icons/cddb-60x25.xpm @@ -0,0 +1,144 @@ +/* XPM */ +static const char * cddb_60x25_xpm[] = { +"60 25 116 2", +" c None", +". c #FFFFFF", +"+ c #E2E2E2", +"@ c #757575", +"# c #2F2F2F", +"$ c #0F0F0F", +"% c #080808", +"& c #202020", +"* c #3D3D3D", +"= c #868686", +"- c #DEDEDE", +"; c #F7F7F7", +"> c #000000", +", c #070707", +"' c #161616", +") c #373737", +"! c #6D6D6D", +"~ c #C7C7C7", +"{ c #252525", +"] c #6F6F6F", +"^ c #E9E9E9", +"/ c #9E9E9E", +"( c #1F1F1F", +"_ c #4D4D4D", +": c #ECECEC", +"< c #1E1E1E", +"[ c #EAEAEA", +"} c #A8A8A8", +"| c #4E4E4E", +"1 c #BBBBBB", +"2 c #EEEEEE", +"3 c #F8F8F8", +"4 c #E0E0E0", +"5 c #C4C4C4", +"6 c #7B7B7B", +"7 c #424242", +"8 c #FCFCFC", +"9 c #EBEBEB", +"0 c #C0C0C0", +"a c #383838", +"b c #F9F9F9", +"c c #B5B5B5", +"d c #1B1B1B", +"e c #7D7D7D", +"f c #F2F2F2", +"g c #111111", +"h c #7C7C7C", +"i c #CBCBCB", +"j c #0C0C0C", +"k c #959595", +"l c #9C9C9C", +"m c #535353", +"n c #969696", +"o c #2E2E2E", +"p c #FEFEFE", +"q c #8A8A8A", +"r c #313131", +"s c #676767", +"t c #545454", +"u c #8B8B8B", +"v c #E5E5E5", +"w c #020202", +"x c #F0F0F0", +"y c #B8B8B8", +"z c #1D1D1D", +"A c #BDBDBD", +"B c #BABABA", +"C c #121212", +"D c #D9D9D9", +"E c #2B2B2B", +"F c #A9A9A9", +"G c #242424", +"H c #CCCCCC", +"I c #0A0A0A", +"J c #6C6C6C", +"K c #FAFAFA", +"L c #DADADA", +"M c #F4F4F4", +"N c #474747", +"O c #606060", +"P c #030303", +"Q c #F3F3F3", +"R c #E4E4E4", +"S c #898989", +"T c #333333", +"U c #2C2C2C", +"V c #101010", +"W c #808080", +"X c #989898", +"Y c #C2C2C2", +"Z c #A6A6A6", +"` c #505050", +" . c #BCBCBC", +".. c #EFEFEF", +"+. c #E1E1E1", +"@. c #C5C5C5", +"#. c #C1C1C1", +"$. c #6E6E6E", +"%. c #3B3B3B", +"&. c #484848", +"*. c #F6F6F6", +"=. c #9A9A9A", +"-. c #060606", +";. c #4F4F4F", +">. c #EDEDED", +",. c #A4A4A4", +"'. c #737373", +"). c #0E0E0E", +"!. c #3E3E3E", +"~. c #151515", +"{. c #363636", +"]. c #C8C8C8", +"^. c #040404", +"/. c #1A1A1A", +"(. c #555555", +"_. c #C6C6C6", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . + @ # $ % & * = - . . ; > > > > , ' ) ! ~ . . . . . ; > > > > , ' ) ! ~ . . . . . ; > > > > > , { ] ^ . . . . ", +". . . . / , > > > > > > > ( . . ; > > > > > > > > > _ : . . . ; > > > > > > > > > _ : . . . ; > > > > > > > > < [ . . . ", +". . . } > > | 1 2 3 4 5 6 7 . . ; > $ . . 8 9 0 ! , > a b . . ; > $ . . 8 9 0 ! , > a b . . ; > $ . . . 2 c d > e . . . ", +". . f g > h . . . . . . . . . . ; > $ . . . . . . i j > k . . ; > $ . . . . . . i j > k . . ; > $ . . . . . l > m . . . ", +". . n > o p . . . . . . . . . . ; > $ . . . . . . . q > r . . ; > $ . . . . . . . q > r . . ; > $ . . . . . l > s . . . ", +". . t > u . . . . . . . . . . . ; > $ . . . . . . . v > w f . ; > $ . . . . . . . v > w f . ; > $ . . . x y z > A . . . ", +". . r > B . . . . . . . . . . . ; > $ . . . . . . . . C > D . ; > $ . . . . . . . . C > D . ; > > > > > > > E F . . . . ", +". . G > ~ . . . . . . . . . . . ; > $ . . . . . . . . ( > H . ; > $ . . . . . . . . ( > H . ; > > > > > > > I J K . . . ", +". . r > B . . . . . . . . . . . ; > $ . . . . . . . . g > L . ; > $ . . . . . . . . g > L . ; > $ . . . M i N > O . . . ", +". . t > u . . . . . . . . . . . ; > $ . . . . . . . v > P Q . ; > $ . . . . . . . v > P Q . ; > $ . . . . . M j w R . . ", +". . n > # p . . . . . . . . . . ; > $ . . . . . . . S > T . . ; > $ . . . . . . . S > T . . ; > $ . . . . . . U > 1 . . ", +". . f V > W . . . . . . . . . . ; > $ . . . . . . i j > X . . ; > $ . . . . . . i j > X . . ; > $ . . . . . M j > Y . . ", +". . . Z > > ` ...b +.@.h 7 . . ; > $ . . 8 : #.$., > %.b . . ; > $ . . 8 : #.$., > %.b . . ; > $ . . . M H &.> V *.. . ", +". . . . =.-.> > > > > > > ( . . ; > > > > > > > > > ;.>.. . . ; > > > > > > > > > ;.>.. . . ; > > > > > > > > w ,.. . . ", +". . . . . 4 '.o )., & !.= - . . ; > > > > -.~.{.! ].. . . . . ; > > > > -.~.{.! ].. . . . . ; > > > > > ^./.(._.. . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "}; diff --git a/lib/rdcddblookup.cpp b/lib/rdcddblookup.cpp index 93441d5d..6ebfa244 100644 --- a/lib/rdcddblookup.cpp +++ b/lib/rdcddblookup.cpp @@ -2,7 +2,7 @@ // // RDDiscLookup instance class for accessing the FreeDB CD Database. // -// (C) Copyright 2003-2021 Fred Gleason +// (C) Copyright 2003-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -56,7 +56,7 @@ RDCddbLookup::~RDCddbLookup() QString RDCddbLookup::sourceName() const { - return QString("FreeDB"); + return QString("CDDB"); } @@ -153,7 +153,7 @@ void RDCddbLookup::readyReadData() f0.erase(f0.begin()); f0.erase(f0.begin()); f0.erase(f0.begin()); - discRecord()->setDiscTitle(f0.join(" ")); + discRecord()->setDiscTitle(RDDiscRecord::RemoteSource,f0.join(" ")); snprintf(buffer,2048,"cddb read %s %08x\n", (const char *)discRecord()->discGenre().toUtf8(), discRecord()->discId()); @@ -245,10 +245,12 @@ void RDCddbLookup::readyReadData() discRecord()->setDiscGenre(f0.at(0)); f0=titlesBox()->currentText().split("/"); if(f0.size()==2) { - discRecord()->setDiscTitle(f0.at(1).trimmed()); + discRecord()->setDiscTitle(RDDiscRecord::RemoteSource, + f0.at(1).trimmed()); } else { - discRecord()->setDiscTitle(titlesBox()->currentText().trimmed()); + discRecord()->setDiscTitle(RDDiscRecord::RemoteSource, + titlesBox()->currentText().trimmed()); } snprintf(buffer,2048,"cddb read %s %08x\n", (const char *)discRecord()->discGenre().toUtf8(), @@ -288,7 +290,8 @@ void RDCddbLookup::readyReadData() } ParsePair(&line,&tag,&value,&index); if(tag=="DTITLE") { - discRecord()->setDiscTitle(value.left(value.length()-1)); + discRecord()->setDiscTitle(RDDiscRecord::RemoteSource, + value.left(value.length()-1)); } if(tag=="DYEAR") { discRecord()->setDiscYear(value.toUInt()); @@ -302,7 +305,8 @@ void RDCddbLookup::readyReadData() discRecord()->setDiscPlayOrder(value); } if((tag=="TTITLE")&&(index!=-1)) { - discRecord()->setTrackTitle(index,value.left(value.length()-1)); + discRecord()->setTrackTitle(RDDiscRecord::RemoteSource,index, + value.left(value.length()-1)); } if((tag=="EXTT")&&(index!=-1)) { discRecord()-> @@ -333,7 +337,6 @@ void RDCddbLookup::errorData(QAbstractSocket::SocketError err) } lookup_state=0; QApplication::restoreOverrideCursor(); - emit lookupDone(RDCddbLookup::LookupError,err_msg); } @@ -344,8 +347,8 @@ void RDCddbLookup::FinishCddbLookup(RDCddbLookup::Result res, lookup_socket->close(); lookup_state=0; QApplication::restoreOverrideCursor(); - emit lookupDone(res,err_msg); profile("CDDB lookup finished"); + processLookup(res,err_msg); } diff --git a/lib/rdcddblookup.h b/lib/rdcddblookup.h index 41ef7812..e56f0b43 100644 --- a/lib/rdcddblookup.h +++ b/lib/rdcddblookup.h @@ -2,7 +2,7 @@ // // RDDiscLookup instance class for accessing the FreeDB CD Database. // -// (C) Copyright 2003-2020 Fred Gleason +// (C) Copyright 2003-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -56,16 +56,16 @@ class RDCddbLookup : public RDDiscLookup private: void FinishCddbLookup(RDCddbLookup::Result res,const QString &err_msg); - QString DecodeString(QString &str); - void ParsePair(QString *line,QString *tag,QString *value,int *index); - int GetIndex(QString *tag); - void SendToServer(const QString &msg); - QTcpSocket *lookup_socket; - int lookup_state; - QString lookup_username; - QString lookup_appname; - QString lookup_appver; - QString lookup_hostname; + QString DecodeString(QString &str); + void ParsePair(QString *line,QString *tag,QString *value,int *index); + int GetIndex(QString *tag); + void SendToServer(const QString &msg); + QTcpSocket *lookup_socket; + int lookup_state; + QString lookup_username; + QString lookup_appname; + QString lookup_appver; + QString lookup_hostname; }; #endif // RDCDDBLOOKUP_H diff --git a/lib/rddisclookup.cpp b/lib/rddisclookup.cpp index 5d795190..e4a4ae83 100644 --- a/lib/rddisclookup.cpp +++ b/lib/rddisclookup.cpp @@ -2,7 +2,7 @@ // // Base class for CD metadata lookup methods // -// (C) Copyright 2003-2020 Fred Gleason +// (C) Copyright 2003-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -22,13 +22,12 @@ #include #include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include #include "rdtempdirectory.h" #include "rddisclookup.h" @@ -38,8 +37,20 @@ RDDiscLookup::RDDiscLookup(const QString &caption,FILE *profile_msgs, QWidget *parent) : RDDialog(parent) { + QString err_msg; + lookup_caption=caption; lookup_profile_msgs=profile_msgs; + lookup_has_cd_text=false; + lookup_disc=NULL; + + lookup_temp_directory=new RDTempDirectory("rddisclookup"); + if(!lookup_temp_directory->create(&err_msg)) { + QMessageBox::warning(this,caption+" - "+tr("Error"), + tr("Unable to create temporary directory")+ + " \""+lookup_temp_directory->path()+"\".\n"+ + "["+err_msg+"]"); + } lookup_titles_label=new QLabel(tr("Multiple Matches Found!"),this); lookup_titles_label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter); @@ -57,6 +68,12 @@ RDDiscLookup::RDDiscLookup(const QString &caption,FILE *profile_msgs, } +RDDiscLookup::~RDDiscLookup() +{ + delete lookup_temp_directory; +} + + QSize RDDiscLookup::sizeHint() const { return QSize(400,140); @@ -65,7 +82,7 @@ QSize RDDiscLookup::sizeHint() const QString RDDiscLookup::sourceName() const { - return QString(); + return QString("CD-Text"); } @@ -75,6 +92,23 @@ QPixmap RDDiscLookup::sourceLogo() const } +QPixmap RDDiscLookup::sourceLogo(RDDiscRecord::DataSource src) const +{ + QPixmap ret=RDLibraryConf::cdServerLogo(RDLibraryConf::DummyType); + + switch(src) { + case RDDiscRecord::LocalSource: + case RDDiscRecord::LastSource: + break; + + case RDDiscRecord::RemoteSource: + ret=sourceLogo(); + } + + return ret; +} + + QString RDDiscLookup::sourceUrl() const { return QString(); @@ -89,61 +123,99 @@ void RDDiscLookup::setCddbRecord(RDDiscRecord *rec) void RDDiscLookup::lookup() { + QString rip_dev=rda->libraryConf()->ripperDevice(); + if(discRecord()->tracks()==0) { return; } + if((lookup_has_cd_text=ReadCdText(rip_dev))) { + profile("CD-TEXT lookup success"); + } + else { + profile("CD-TEXT lookup failure"); + } + // // Get some basic disc parameters, // QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); - DiscId *disc=discid_new(); - if(discid_read_sparse(disc,rda->libraryConf()->ripperDevice().toUtf8(),0)==0) { + if(lookup_disc!=NULL) { + discid_free(lookup_disc); + lookup_disc=NULL; + } + lookup_disc=discid_new(); + if(discid_read_sparse(lookup_disc,rip_dev.toUtf8(),0)==0) { QMessageBox::warning(this,caption()+" - "+tr("Error"), - tr("Unable to read CD.")+ - "\n["+QString::fromUtf8(discid_get_error_msg(disc))+"]"); - discid_free(disc); + tr("Unable to read CD.")+ + "\n["+QString::fromUtf8(discid_get_error_msg(lookup_disc))+"]"); + discid_free(lookup_disc); + lookup_disc=NULL; + discid_free(lookup_disc); return; } - discRecord()->setDiscId(QString(discid_get_freedb_id(disc)).toUInt(NULL,16)); - discRecord()->setDiscMbId(discid_get_id(disc)); - discRecord()->setMbSubmissionUrl(discid_get_submission_url(disc)); + discRecord()->setDiscId(QString(discid_get_freedb_id(lookup_disc)).toUInt(NULL,16)); + discRecord()->setDiscMbId(discid_get_id(lookup_disc)); + discRecord()->setMbSubmissionUrl(discid_get_submission_url(lookup_disc)); QApplication::restoreOverrideCursor(); // // Call the low-level driver to do its lookup. // lookupRecord(); +} + + +void RDDiscLookup::lookupRecord() +{ + processLookup(RDDiscLookup::ExactMatch,"OK"); +} + + +void RDDiscLookup::processLookup(RDDiscLookup::Result result, + const QString &err_msg) +{ + QString rip_dev=rda->libraryConf()->ripperDevice(); // // If the low-level driver didn't find ISRCs, and the user has requested // them, try to find them on the disc. // - // WARNING: This operation can be VERY expensive if the disc does not in + // WARNING: This operation can take a long time if the disc does not in // fact contain ISRCs! // QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); if((!discRecord()->hasIsrcs())&&rda->libraryConf()->readIsrc()) { - if(discid_read(disc,rda->libraryConf()->ripperDevice().toUtf8())==0) { + if(discid_read(lookup_disc,rip_dev.toUtf8())==0) { QMessageBox::warning(this,caption()+" - "+tr("Error"), tr("Unable to read CD.")+ - "\n["+QString::fromUtf8(discid_get_error_msg(disc))+"]"); - discid_free(disc); + "\n["+QString::fromUtf8(discid_get_error_msg(lookup_disc))+"]"); + discid_free(lookup_disc); + lookup_disc=NULL; return; } - discRecord()->setMcn(discid_get_mcn(disc)); - int first=discid_get_first_track_num(disc); - int last=discid_get_last_track_num(disc); + discRecord()->setMcn(discid_get_mcn(lookup_disc)); + int first=discid_get_first_track_num(lookup_disc); + int last=discid_get_last_track_num(lookup_disc); for(int i=first;i<=last;i++) { if((i-first)tracks()) { discRecord()->setIsrc(i-first, - RDDiscLookup::normalizedIsrc(discid_get_track_isrc(disc,i))); - } + RDDiscLookup::normalizedIsrc(discid_get_track_isrc(lookup_disc,i))); + } } } QApplication::restoreOverrideCursor(); - discid_free(disc); + discid_free(lookup_disc); + lookup_disc=NULL; + + emit lookupDone(RDDiscLookup::ExactMatch,"OK"); +} + + +bool RDDiscLookup::hasCdText() const +{ + return lookup_has_cd_text; } @@ -360,3 +432,82 @@ QString RDDiscLookup::normalizedUpcA(const QString &barcode,bool *ok) } return QString(); } + + +QString RDDiscLookup::tempDirectoryPath() const +{ + return lookup_temp_directory->path(); +} + + +bool RDDiscLookup::ReadCdText(const QString &cdda_dev) +{ + RDProfile *title_profile=new RDProfile(); + bool ret=false; + QString str; + QString cmd; + int exit_code; + + QStringList args; + args.push_back("-D"); + args.push_back(cdda_dev); + args.push_back("--info-only"); + args.push_back("-v"); + args.push_back("titles"); + QProcess *proc=new QProcess(this); + proc->setWorkingDirectory(tempDirectoryPath()); + proc->start("/usr/bin/cdda2wav",args); + proc->waitForFinished(); // 5 minutes + QByteArray output=proc->readAllStandardError(); + if(proc->exitStatus()!=QProcess::NormalExit) { + QMessageBox::warning(this,lookup_caption+" - "+tr("Ripper Error"), + tr("CD-Text reader process crashed!")); + delete proc; + return false; + } + if((exit_code=proc->exitCode())!=0) { + QMessageBox::warning(this,lookup_caption+" - "+tr("Ripper Error"), + tr("CD-Text reader process returned an error!")+"\n"+ + "["+output+"]"); + delete proc; + return false; + } + delete proc; + + // + // Read the Track Title Data File + // + for(int i=0;itracks();i++) { + title_profile->setSource(tempDirectoryPath()+ + QString().sprintf("/audio_%02d.inf",i+1)); + str=title_profile->stringValue("","Albumtitle",""); + str.remove("'"); + if((!str.isEmpty())&&(str!="''")) { + lookup_record->setDiscTitle(RDDiscRecord::LocalSource,str); + ret=true; + } + + str=title_profile->stringValue("","Albumperformer",""); + str.remove("'"); + if((!str.isEmpty())&&(str!="''")) { + lookup_record->setDiscArtist(RDDiscRecord::LocalSource,str); + ret=true; + } + + str=title_profile->stringValue("","Tracktitle",""); + str.remove("'"); + if((!str.isEmpty())&&(str!="''")) { + lookup_record->setTrackTitle(RDDiscRecord::LocalSource,i,str); + ret=true; + } + + str=title_profile->stringValue("","Performer",""); + str.remove("'"); + if((!str.isEmpty())&&(str!="''")) { + lookup_record->setTrackArtist(RDDiscRecord::LocalSource,i,str); + ret=true; + } + } + + return ret; +} diff --git a/lib/rddisclookup.h b/lib/rddisclookup.h index bfcab993..0c1b0735 100644 --- a/lib/rddisclookup.h +++ b/lib/rddisclookup.h @@ -2,7 +2,7 @@ // // Base class for CD metadata lookup methods // -// (C) Copyright 2003-2020 Fred Gleason +// (C) Copyright 2003-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -24,6 +24,8 @@ #include +#include + #include #include #include @@ -33,6 +35,7 @@ #include #include +#include class RDDiscLookup : public RDDialog { @@ -40,12 +43,15 @@ class RDDiscLookup : public RDDialog public: enum Result {ExactMatch=0,NoMatch=1,LookupError=2}; RDDiscLookup(const QString &caption,FILE *profile_msgs,QWidget *parent=0); + ~RDDiscLookup(); QSize sizeHint() const; virtual QString sourceName() const; virtual QPixmap sourceLogo() const; + QPixmap sourceLogo(RDDiscRecord::DataSource src) const; virtual QString sourceUrl() const; void setCddbRecord(RDDiscRecord *); void lookup(); + bool hasCdText() const; static bool isrcIsValid(const QString &isrc); static QString formattedIsrc(const QString &isrc,bool *ok=NULL); static QString normalizedIsrc(const QString &isrc,bool *ok=NULL); @@ -62,28 +68,34 @@ class RDDiscLookup : public RDDialog void cancelData(); protected: - virtual void lookupRecord()=0; + virtual void lookupRecord(); + void processLookup(RDDiscLookup::Result result,const QString &err_msg); void resizeEvent(QResizeEvent *e); RDDiscRecord *discRecord() const; void profile(const QString &msg); QComboBox *titlesBox(); QStringList *titlesKey(); + QString tempDirectoryPath() const; private: - QLabel *lookup_titles_label; - QComboBox *lookup_titles_box; - QStringList lookup_titles_key; - QPushButton *lookup_ok_button; - QPushButton *lookup_cancel_button; - RDDiscRecord *lookup_record; - QTcpSocket *lookup_socket; - int lookup_state; - QString lookup_username; - QString lookup_appname; - QString lookup_appver; - QString lookup_hostname; - FILE *lookup_profile_msgs; - QString lookup_caption; + bool ReadCdText(const QString &cdda_dev); + QLabel *lookup_titles_label; + QComboBox *lookup_titles_box; + QStringList lookup_titles_key; + QPushButton *lookup_ok_button; + QPushButton *lookup_cancel_button; + RDDiscRecord *lookup_record; + QTcpSocket *lookup_socket; + int lookup_state; + QString lookup_username; + QString lookup_appname; + QString lookup_appver; + QString lookup_hostname; + FILE *lookup_profile_msgs; + QString lookup_caption; + RDTempDirectory *lookup_temp_directory; + bool lookup_has_cd_text; + DiscId *lookup_disc; }; #endif // RDDISCLOOKUP_H diff --git a/lib/rddiscmodel.cpp b/lib/rddiscmodel.cpp index 1546e4bf..ca629a3b 100644 --- a/lib/rddiscmodel.cpp +++ b/lib/rddiscmodel.cpp @@ -283,20 +283,20 @@ void RDDiscModel::setDisc(RDCdPlayer *player) } -void RDDiscModel::refresh(RDDiscRecord *rec) +void RDDiscModel::refresh(RDDiscRecord *rec,RDDiscRecord::DataSource src) { beginResetModel(); for(int i=0;itracks();i++) { - if(!rec->trackTitle(i).isEmpty()) { - d_texts[i][2]=rec->trackTitle(i); + if(!rec->trackTitle(src,i).isEmpty()) { + d_texts[i][2]=rec->trackTitle(src,i); } - if(rec->trackArtist(i).isEmpty()) { - if(!rec->discArtist().isEmpty()) { - d_texts[i][3]=rec->discArtist(); + if(rec->trackArtist(src,i).isEmpty()) { + if(!rec->discArtist(src).isEmpty()) { + d_texts[i][3]=rec->discArtist(src); } } else { - d_texts[i][3]=rec->trackArtist(i); + d_texts[i][3]=rec->trackArtist(src,i); } } endResetModel(); diff --git a/lib/rddiscmodel.h b/lib/rddiscmodel.h index a36bf190..857b2e74 100644 --- a/lib/rddiscmodel.h +++ b/lib/rddiscmodel.h @@ -2,7 +2,7 @@ // // Data model for Audio CD track information // -// (C) Copyright 2021 Fred Gleason +// (C) Copyright 2021-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -62,7 +62,7 @@ class RDDiscModel : public QAbstractTableModel public slots: void clear(); void setDisc(RDCdPlayer *player); - void refresh(RDDiscRecord *rec); + void refresh(RDDiscRecord *rec,RDDiscRecord::DataSource src); private: QPalette d_palette; diff --git a/lib/rddiscrecord.cpp b/lib/rddiscrecord.cpp index 32773b50..33ef34b5 100644 --- a/lib/rddiscrecord.cpp +++ b/lib/rddiscrecord.cpp @@ -2,7 +2,7 @@ // // Container Class for Compact Disc Metadata // -// (C) Copyright 2003-2021 Fred Gleason +// (C) Copyright 2003-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -18,6 +18,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#include + #include "rddiscrecord.h" RDDiscRecord::RDDiscRecord() @@ -28,12 +30,23 @@ RDDiscRecord::RDDiscRecord() void RDDiscRecord::clear() { + for(int i=0;i: "+ + discTitle(src)+"
\n"; + } + if(!discArtist(src).isEmpty()) { + ret+=""+QObject::tr("Disc Artist")+": "+ + discArtist(src)+"
\n"; + } + for(int i=0;i"+trackTitle(src,i)+"
\n"; + } + + return ret; +} + + +QString RDDiscRecord::dump(RDDiscRecord::DataSource src) const +{ + QString ret=QString().sprintf("RDDiscRecord::dump(%u)\n",src); ret+=QString::asprintf("tracks: %d\n",tracks()); ret+=QString::asprintf("discLength: %d\n",discLength()); @@ -373,9 +423,9 @@ QString RDDiscRecord::dump() ret+="mcn: "+mcn()+"\n"; ret+="discMbId: "+discMbId()+"\n"; ret+="mbSubmissionUrl: "+mbSubmissionUrl()+"\n"; - ret+="discTitle: "+discTitle()+"\n"; - ret+="discArtist: "+discArtist()+"\n"; - ret+="discAlbum: "+discAlbum()+"\n"; + ret+="discTitle: "+discTitle(src)+"\n"; + ret+="discArtist: "+discArtist(src)+"\n"; + ret+="discAlbum: "+discAlbum(src)+"\n"; ret+="discAuthor: "+discAuthor()+"\n"; ret+=QString::asprintf("discYear: %u\n",discYear()); ret+="discGenre: "+discGenre()+"\n"; @@ -385,7 +435,7 @@ QString RDDiscRecord::dump() for(int i=0;i +// (C) Copyright 2003-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -25,22 +25,15 @@ #include #include - -/** - * @short A container class for CDDB data. - * @author Fred Gleason - **/ - class RDDiscRecord { - public: - /** - * Create an RDDiscRecord object - **/ + public: + enum DataSource {LocalSource=0,RemoteSource=1,LastSource=2}; RDDiscRecord(); void clear(); int tracks() const; void setTracks(int num); + bool hasData(RDDiscRecord::DataSource src) const; unsigned discLength() const; void setDiscLength(unsigned len); unsigned discId() const; @@ -53,12 +46,12 @@ class RDDiscRecord void setDiscReleaseMbId(const QString &mbid); QString mbSubmissionUrl() const; void setMbSubmissionUrl(const QString &url); - QString discTitle() const; - void setDiscTitle(QString title); - QString discArtist() const; - void setDiscArtist(QString artist); - QString discAlbum() const; - void setDiscAlbum(QString album); + QString discTitle(DataSource src) const; + void setDiscTitle(DataSource src,const QString &title); + QString discArtist(DataSource src) const; + void setDiscArtist(DataSource src,const QString &artist); + QString discAlbum(DataSource src) const; + void setDiscAlbum(DataSource src, const QString &album); QString discAuthor() const; void setDiscAuthor(QString author); unsigned discYear() const; @@ -73,18 +66,19 @@ class RDDiscRecord void setDiscPlayOrder(QString order); unsigned trackOffset(int track) const; void setTrackOffset(int track,unsigned frames); - QString trackTitle(int track) const; - void setTrackTitle(int track,QString title); + QString trackTitle(DataSource src,int track) const; + void setTrackTitle(DataSource src,int track,const QString &title); QString trackExtended(int track) const; void setTrackExtended(int track,QString text); - QString trackArtist(int track) const; - void setTrackArtist(int track,QString artist); + QString trackArtist(DataSource src,int track) const; + void setTrackArtist(DataSource src,int track,const QString &artist); QString trackRecordingMbId(int track) const; void setTrackRecordingMbId(int track,const QString &str); bool hasIsrcs() const; QString isrc(int track) const; - void setIsrc(int track,QString isrc); - QString dump(); + void setIsrc(int track,const QString &isrc); + QString summary(RDDiscRecord::DataSource src) const; + QString dump(RDDiscRecord::DataSource src) const; private: int disc_tracks; @@ -94,21 +88,22 @@ class RDDiscRecord QString disc_disc_release_mb_id; QString disc_mb_submission_url; unsigned disc_disc_length; - QString disc_disc_title; - QString disc_disc_artist; - QString disc_disc_album; + QString disc_disc_title[RDDiscRecord::LastSource]; + QString disc_disc_artist[RDDiscRecord::LastSource]; + QString disc_disc_album[RDDiscRecord::LastSource]; QString disc_disc_author; unsigned disc_disc_year; QString disc_disc_genre; QString disc_disc_label; QString disc_disc_extended; QString disc_disc_playorder; - QString disc_track_title[CDROM_LEADOUT]; + QString disc_track_title[RDDiscRecord::LastSource][CDROM_LEADOUT]; QString disc_track_extended[CDROM_LEADOUT]; - QString disc_track_artist[CDROM_LEADOUT]; + QString disc_track_artist[RDDiscRecord::LastSource][CDROM_LEADOUT]; QString disc_track_isrc[CDROM_LEADOUT]; unsigned disc_track_offset[CDROM_LEADOUT]; QString disc_track_recording_mb_id[CDROM_LEADOUT]; + bool disc_has_data[RDDiscRecord::LastSource]; }; diff --git a/lib/rddummylookup.cpp b/lib/rddummylookup.cpp index 81540050..b735412d 100644 --- a/lib/rddummylookup.cpp +++ b/lib/rddummylookup.cpp @@ -2,7 +2,7 @@ // // RDDiscLookup instance class for dummy lookup // -// (C) Copyright 2003-2020 Fred Gleason +// (C) Copyright 2003-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -30,5 +30,5 @@ RDDummyLookup::RDDummyLookup(const QString &caption,FILE *profile_msgs, void RDDummyLookup::lookupRecord() { - emit lookupDone(RDDiscLookup::NoMatch,"OK"); + processLookup(RDDiscLookup::NoMatch,"OK"); } diff --git a/lib/rddummylookup.h b/lib/rddummylookup.h index 910382c0..e6310b35 100644 --- a/lib/rddummylookup.h +++ b/lib/rddummylookup.h @@ -2,7 +2,7 @@ // // RDDiscLookup instance class for dummy lookup // -// (C) Copyright 2003-2020 Fred Gleason +// (C) Copyright 2003-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License diff --git a/lib/rdfontengine.cpp b/lib/rdfontengine.cpp index 9ddc5f4b..878cbe19 100644 --- a/lib/rdfontengine.cpp +++ b/lib/rdfontengine.cpp @@ -279,7 +279,7 @@ void RDFontEngine::MakeFonts(const QFont &default_font) font_big_label_font=QFont(family,label_size+4,QFont::Bold); font_big_label_font.setPixelSize(label_size+4); - font_big_label_font_metrics=new QFontMetrics(font_label_font); + font_big_label_font_metrics=new QFontMetrics(font_big_label_font); font_label_font=QFont(family,label_size,QFont::Bold); font_label_font.setPixelSize(label_size); diff --git a/lib/rdlibrary_conf.cpp b/lib/rdlibrary_conf.cpp index c03e306d..9d39d1bb 100644 --- a/lib/rdlibrary_conf.cpp +++ b/lib/rdlibrary_conf.cpp @@ -2,7 +2,7 @@ // // Abstract an RDLibrary Configuration. // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -18,14 +18,20 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#include + #include "rdconf.h" #include "rddb.h" #include "rdescape_string.h" #include "rdlibrary_conf.h" // -// Global Classes +// Logos // +#include "../icons/cd-text-55x47.xpm" +#include "../icons/cddb-60x25.xpm" +#include "../icons/musicbrainz-159x25.xpm" + RDLibraryConf::RDLibraryConf(const QString &station) { RDSqlQuery *q; @@ -414,7 +420,7 @@ QString RDLibraryConf::cdServerTypeText(RDLibraryConf::CdServerType type) break; case RDLibraryConf::CddbType: - ret="FreeDB"; + ret="CDDB"; break; case RDLibraryConf::MusicBrainzType: @@ -428,6 +434,30 @@ QString RDLibraryConf::cdServerTypeText(RDLibraryConf::CdServerType type) } +QPixmap RDLibraryConf::cdServerLogo(CdServerType type) +{ + QPixmap ret; + + switch(type) { + case RDLibraryConf::DummyType: + ret=QPixmap(cd_text_55x47_xpm); + break; + + case RDLibraryConf::CddbType: + ret=QPixmap(cddb_60x25_xpm); + break; + + case RDLibraryConf::MusicBrainzType: + ret=QPixmap(musicbrainz_159x25_xpm); + break; + + case RDLibraryConf::LastType: + break; + } + return ret; +} + + void RDLibraryConf::SetRow(const QString ¶m,int value) const { RDSqlQuery *q; diff --git a/lib/rdlibrary_conf.h b/lib/rdlibrary_conf.h index 785fb47a..1cd4dcec 100644 --- a/lib/rdlibrary_conf.h +++ b/lib/rdlibrary_conf.h @@ -2,7 +2,7 @@ // // Abstract RDLibrary Configuration // -// (C) Copyright 2002-2020 Fred Gleason +// (C) Copyright 2002-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -84,6 +84,7 @@ class RDLibraryConf bool searchLimited() const; void setSearchLimited(bool state) const; static QString cdServerTypeText(CdServerType type); + static QPixmap cdServerLogo(CdServerType type); private: void SetRow(const QString ¶m,int value) const; @@ -95,4 +96,4 @@ class RDLibraryConf }; -#endif +#endif // RDLIBRARY_CONF_H diff --git a/lib/rdmblookup.cpp b/lib/rdmblookup.cpp index 61d9cd01..76e72702 100644 --- a/lib/rdmblookup.cpp +++ b/lib/rdmblookup.cpp @@ -2,7 +2,7 @@ // // RDDiscLookup instance class for MusicBrainz // -// (C) Copyright 2003-2021 Fred Gleason +// (C) Copyright 2003-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -53,7 +53,6 @@ #include "rdconf.h" #include "rdmblookup.h" -#include "../icons/musicbrainz-159x25.xpm" #include "../icons/cover_art_default-60x60.xpm" QString err_str="OK"; @@ -118,7 +117,7 @@ QString RDMbLookup::sourceName() const QPixmap RDMbLookup::sourceLogo() const { - return QPixmap(musicbrainz_159x25_xpm); + return RDLibraryConf::cdServerLogo(RDLibraryConf::MusicBrainzType); } @@ -246,7 +245,7 @@ void RDMbLookup::lookupRecord() result_code=RDDiscLookup::NoMatch; } QApplication::restoreOverrideCursor(); - emit lookupDone(result_code,err_str); + processLookup(result_code,err_str); } @@ -260,7 +259,8 @@ RDDiscLookup::Result RDMbLookup::ProcessRelease(MusicBrainz5::CRelease *release) // Extract Basic Release Data // discRecord()->setDiscReleaseMbId(QString::fromUtf8(release->ID().c_str())); - discRecord()->setDiscAlbum(QString::fromUtf8(release->Title().c_str())); + discRecord()->setDiscAlbum(RDDiscRecord::RemoteSource, + QString::fromUtf8(release->Title().c_str())); //discRecord()->setDiscGenre(); QStringList f0=QString::fromUtf8(release->Date().c_str()).split("-"); discRecord()->setDiscYear(f0.at(0).toInt()); @@ -284,7 +284,7 @@ RDDiscLookup::Result RDMbLookup::ProcessRelease(MusicBrainz5::CRelease *release) QString::fromUtf8(credits->Item(j)->Artist()->Name().c_str()); str+=QString::fromUtf8(credits->Item(j)->JoinPhrase().c_str()); } - discRecord()->setDiscArtist(str); + discRecord()->setDiscArtist(RDDiscRecord::RemoteSource,str); } // @@ -307,7 +307,8 @@ RDDiscLookup::Result RDMbLookup::ProcessRelease(MusicBrainz5::CRelease *release) MusicBrainz5::CTrack *track=tracks->Item(k); MusicBrainz5::CRecording *recording=track->Recording(); discRecord()-> - setTrackTitle(k,QString::fromUtf8(recording->Title().c_str())); + setTrackTitle(RDDiscRecord::RemoteSource,k, + QString::fromUtf8(recording->Title().c_str())); discRecord()-> setTrackRecordingMbId(k,QString::fromUtf8(recording->ID().c_str())); MusicBrainz5::CISRCList *isrcs=recording->ISRCList(); diff --git a/rdadmin/edit_rdlibrary.cpp b/rdadmin/edit_rdlibrary.cpp index 6e71ef02..26788eda 100644 --- a/rdadmin/edit_rdlibrary.cpp +++ b/rdadmin/edit_rdlibrary.cpp @@ -2,7 +2,7 @@ // // Edit an RDLibrary Configuration // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -211,7 +211,7 @@ EditRDLibrary::EditRDLibrary(RDStation *station,RDStation *cae_station, lib_mb_server_edit=new QLineEdit(this); lib_mb_server_edit->setGeometry(190,278,160,19); lib_mb_server_edit->setValidator(validator); - lib_cd_server_label=new QLabel(tr("FreeDB Server:"),this); + lib_cd_server_label=new QLabel(tr("CDDB Server:"),this); lib_cd_server_label->setFont(labelFont()); lib_cd_server_label->setGeometry(25,278,160,19); lib_cd_server_label-> @@ -493,7 +493,7 @@ void EditRDLibrary::cdServerTypeData(int n) case RDLibraryConf::CddbType: lib_cd_server_label->setEnabled(true); - lib_cd_server_label->setText(tr("FreeDB Server")+":"); + lib_cd_server_label->setText(tr("CDDB Server")+":"); lib_cddb_server_edit->setEnabled(true); lib_cddb_server_edit->show(); lib_mb_server_edit->hide(); diff --git a/rdlibrary/cdripper.cpp b/rdlibrary/cdripper.cpp index 59d57552..709842da 100644 --- a/rdlibrary/cdripper.cpp +++ b/rdlibrary/cdripper.cpp @@ -2,7 +2,7 @@ // // CD Track Ripper Dialog for Rivendell. // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -135,8 +135,7 @@ CdRipper::CdRipper(QString cutname,RDDiscRecord *rec,RDLibraryConf *conf, rip_apply_box=new QCheckBox(this); rip_apply_box->setChecked(true); rip_apply_box->setDisabled(true); - rip_apply_label=new QLabel(tr("Apply")+" "+rip_disc_lookup->sourceName()+" "+ - tr("Values to Cart"),this); + rip_apply_label=new QLabel(tr("Apply Metadata Values to Cart"),this); rip_apply_label->setFont(labelFont()); rip_apply_label->setAlignment(Qt::AlignLeft); rip_apply_box->setChecked(false); @@ -586,25 +585,50 @@ void CdRipper::stoppedData() void CdRipper::lookupDoneData(RDDiscLookup::Result result,const QString &err_msg) { + RDDiscRecord::DataSource src=RDDiscRecord::LastSource; + if(rip_disc_record->hasData(RDDiscRecord::LocalSource)) { + src=RDDiscRecord::LocalSource; + } + else { + if(rip_disc_record->hasData(RDDiscRecord::RemoteSource)) { + src=RDDiscRecord::RemoteSource; + } + else { + rip_apply_box->hide(); + rip_apply_label->hide(); + rip_track[0]=-1; + rip_track[1]=-1; + return; // Apply no metadata + } + } + switch(result) { case RDDiscLookup::ExactMatch: if(rip_cdrom->status()!=RDCdPlayer::Ok) { + rip_apply_box->hide(); + rip_apply_label->hide(); + rip_track[0]=-1; + rip_track[1]=-1; return; } - rip_artist_edit->setText(rip_disc_record->discArtist()); - rip_album_edit->setText(rip_disc_record->discAlbum()); + rip_artist_edit->setText(rip_disc_record->discArtist(src)); + rip_album_edit->setText(rip_disc_record->discAlbum(src)); rip_label_edit->setText(rip_disc_record->discLabel()); rip_other_edit->setText(rip_disc_record->discExtended()); - rip_track_model->refresh(rip_disc_record); + rip_track_model->refresh(rip_disc_record,src); rip_apply_box->setChecked(true); rip_apply_box->setEnabled(true); rip_apply_label->setEnabled(true); rip_browser_button->setDisabled(rip_disc_lookup->sourceUrl().isNull()); rip_browser_label->setDisabled(rip_disc_lookup->sourceUrl().isNull()); + rip_apply_box->show(); + rip_apply_label->show(); trackSelectionChangedData(QItemSelection(),QItemSelection()); break; case RDDiscLookup::NoMatch: + rip_apply_box->hide(); + rip_apply_label->hide(); rip_track[0]=-1; rip_track[1]=-1; break; @@ -612,6 +636,8 @@ void CdRipper::lookupDoneData(RDDiscLookup::Result result,const QString &err_msg case RDDiscLookup::LookupError: QMessageBox::warning(this,"RDLibrary - "+rip_disc_lookup->sourceName()+ " "+tr("Lookup Error"),err_msg); + rip_apply_box->hide(); + rip_apply_label->hide(); rip_track[0]=-1; rip_track[1]=-1; break; diff --git a/rdlibrary/disk_ripper.cpp b/rdlibrary/disk_ripper.cpp index 6e9d92be..3181b679 100644 --- a/rdlibrary/disk_ripper.cpp +++ b/rdlibrary/disk_ripper.cpp @@ -2,7 +2,7 @@ // // CD Disk Ripper Dialog for Rivendell. // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -124,8 +124,7 @@ DiskRipper::DiskRipper(QString *filter,QString *group,QString *schedcode, rip_apply_box=new QCheckBox(this); rip_apply_box->setChecked(true); rip_apply_box->setDisabled(true); - rip_apply_label=new QLabel(tr("Apply")+" "+rip_disc_lookup->sourceName()+" "+ - tr("Values to Carts"),this); + rip_apply_label=new QLabel(tr("Apply Metadata Values to Carts"),this); rip_apply_label->setFont(labelFont()); rip_apply_label->setAlignment(Qt::AlignLeft); rip_apply_box->setChecked(false); @@ -711,8 +710,7 @@ void DiskRipper::mediaChangedData() rip_cutnames.push_back(QString()); rip_end_track.push_back(-1); rip_wave_datas.push_back(new RDWaveData()); - rip_wave_datas.back()-> - setTitle(tr("Track")+QString::asprintf(" %d",rip_cdrom->tracks()-i+1)); + rip_wave_datas.back()->setTitle(tr("Track")+QString().sprintf(" %d",i)); } rip_disc_record.clear(); rip_cdrom->setCddbRecord(&rip_disc_record); @@ -737,37 +735,66 @@ void DiskRipper::stoppedData() void DiskRipper::lookupDoneData(RDDiscLookup::Result result, - const QString &err_msg) + const QString &err_msg) { + RDDiscRecord::DataSource src=RDDiscRecord::LastSource; + if(rip_disc_record.hasData(RDDiscRecord::LocalSource)) { + src=RDDiscRecord::LocalSource; + } + else { + if(rip_disc_record.hasData(RDDiscRecord::RemoteSource)) { + src=RDDiscRecord::RemoteSource; + } + else { + rip_apply_box->hide(); + rip_apply_label->hide(); + rip_track=-1; + return; // Apply no metadata + } + } + switch(result) { case RDDiscLookup::ExactMatch: if(rip_cdrom->status()!=RDCdPlayer::Ok) { + rip_apply_box->hide(); + rip_apply_label->hide(); + rip_track=-1; return; } - rip_artist_edit->setText(rip_disc_record.discArtist()); - rip_album_edit->setText(rip_disc_record.discAlbum()); + rip_artist_edit->setText(rip_disc_record.discArtist(src)); + rip_album_edit->setText(rip_disc_record.discAlbum(src)); rip_other_edit->setText(rip_disc_record.discExtended()); - rip_track_model->refresh(&rip_disc_record); + rip_track_model->refresh(&rip_disc_record,src); for(int i=0;isetTitle(rip_disc_record.trackTitle(i)); - rip_wave_datas[i]->setArtist(rip_disc_record.discArtist()); - rip_wave_datas[i]->setAlbum(rip_disc_record.discAlbum()); - rip_wave_datas[i]->setLabel(rip_disc_record.discLabel()); + rip_wave_datas[rip_wave_datas.size()-i-1]-> + setTitle(rip_disc_record.trackTitle(src,i)); + rip_wave_datas[rip_wave_datas.size()-i-1]-> + setArtist(rip_disc_record.discArtist(src)); + rip_wave_datas[rip_wave_datas.size()-i-1]-> + setAlbum(rip_disc_record.discAlbum(src)); + rip_wave_datas[rip_wave_datas.size()-i-1]-> + setLabel(rip_disc_record.discLabel()); } rip_apply_box->setChecked(true); rip_apply_box->setEnabled(true); rip_apply_label->setEnabled(true); rip_browser_button->setDisabled(rip_disc_lookup->sourceUrl().isNull()); rip_browser_label->setDisabled(rip_disc_lookup->sourceUrl().isNull()); + rip_apply_box->show(); + rip_apply_label->show(); break; case RDDiscLookup::NoMatch: + rip_apply_box->hide(); + rip_apply_label->hide(); rip_track=-1; break; case RDDiscLookup::LookupError: QMessageBox::warning(this,"RDLibrary - "+rip_disc_lookup->sourceName()+ " "+tr("Lookup Error"),err_msg); + rip_apply_box->hide(); + rip_apply_label->hide(); rip_track=-1; break; } @@ -964,7 +991,7 @@ void DiskRipper::RipTrack(int track,int end_track,QString cutname,QString title) runImport(rda->user()->name(),rda->user()->password(), &audio_conv_err))) { case RDAudioImport::ErrorOk: - cart->setMetadata(rip_wave_datas[track-1]); + cart->setMetadata(rip_wave_datas[rip_wave_datas.size()-track]); cut->setDescription(rip_wave_datas[track-1]->title()); cut->setIsrc(rip_disc_record.isrc(rip_track_number-1)); cut->setRecordingMbId(rip_disc_record.trackRecordingMbId(rip_track_number-1)); diff --git a/rdlibrary/disk_ripper.h b/rdlibrary/disk_ripper.h index 7fa7bf04..338f6f6a 100644 --- a/rdlibrary/disk_ripper.h +++ b/rdlibrary/disk_ripper.h @@ -2,7 +2,7 @@ // // CD Disk Ripper Dialog for Rivendell // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2022 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/rdlibrary/rdlibrary.cpp b/rdlibrary/rdlibrary.cpp index 3f01e794..5e4b8488 100644 --- a/rdlibrary/rdlibrary.cpp +++ b/rdlibrary/rdlibrary.cpp @@ -49,11 +49,6 @@ DiskGauge *disk_gauge; RDCut *cut_clipboard=NULL; bool audio_changed; -// -// Prototypes -// -void SigHandler(int signo); - MainWidget::MainWidget(RDConfig *c,QWidget *parent) : MainWindow("rdlibrary",c) { @@ -260,11 +255,6 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent) connect(lib_player_shortcut,SIGNAL(activated()), this,SLOT(playerShortcutData())); - // - // Setup Signal Handling - // - ::signal(SIGCHLD,SigHandler); - lib_resize=true; // @@ -762,24 +752,6 @@ void MainWidget::resizeEvent(QResizeEvent *e) } -void SigHandler(int signo) -{ - pid_t pLocalPid; - - switch(signo) { - case SIGCHLD: - pLocalPid=waitpid(-1,NULL,WNOHANG); - while(pLocalPid>0) { - pLocalPid=waitpid(-1,NULL,WNOHANG); - } - ripper_running=false; - import_active=false; - signal(SIGCHLD,SigHandler); - break; - } -} - - void MainWidget::SetCaption(QString user) { QString str1;