Skip to content

Commit

Permalink
Merge 0432561 into 5eae81f
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherlogic committed Jun 19, 2019
2 parents 5eae81f + 0432561 commit b55aa0c
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
51 changes: 51 additions & 0 deletions cdtests/2194660.data
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

����*Legend Of A Mind The Underground Anthology �Various ��b*�
�https://img.discogs.com/AFKhXwsLEspYrlrUb78QO0yk470=/fit-in/500x500/filters:strip_icc():format(jpeg):mode_rgb():quality(90)/discogs-images/R-2194660-1286727200.jpeg.jpgprimary0�м :
Decca5857832�)@HP����b2002j
Compilation

RemasteredCD3�-
1-1Legend Of A Mind (1974 Remix)track �#
1-2Screams In The Earstrack �
1-3Suite No. Onetrack �(
1-4Introspection - Part Onetrack �2
1-5"I Can't Keep From Crying Sometimestrack �!
1-6Austin Osmansparetrack �;
1-7+The Song Of McGuillicudie The Pusillanimoustrack �
1-8Voodoo Foresttrack �
1-9Nymphenburgertrack �B
1-101Once Upon A Hill/Put That In Your Pipe & Smoke Ittrack �%
1-11No More White Horsestrack �-
1-12Hello Hello (Single Version)track �
1-13Freelance Fiendtrack �%
1-14Nutmeg, Bitter Suitetrack �
1-15 The Witchtrack �
1-16Still As Stonetrack �
2-1Maybe Somedaytrack �
2-2Chauffertrack �'
2-3Tomorrow Morning Bringstrack �!
2-4The Unknown Yearstrack �!
2-5Free To Be Stonedtrack �2
2-6"Cemetery Junction Part One And Twotrack �
2-7
Roundabouttrack �(
2-8Question (Album Version)track �/
2-9Love Like A Man (Album Version)track �
2-10 Jig-A-Jigtrack �
2-11 Golf Girltrack �%
2-12Boulders On My Gravetrack �3
2-13"Theme Song / En Route / Theme Songtrack �
3-1Hellbound Traintrack �
3-2Strandedtrack �B
3-32The Rise & Dear Demise Of The Funky Nomadic Tribestrack �
3-4Seafulltrack �
3-5 C'Lu Thlutrack �0
3-6 Whisky In The Jar (Full Version)track �r Lady Fantasyindex*
3-7a
Encounter track *
3-7bSmiles For Youtrack *
3-7c Lady Fantasytrack �
3-8Nights In Armourtrack �
3-9 Propositionstrack �
3-10Air Borntrack �
3-11 The Envoytrack N��݌ 2194660_38Ѣ��@H��bh����UU�@�����������м ���)�����
Expand Down
7 changes: 7 additions & 0 deletions recordutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ func shouldMerge(t1, t2 *TrackSet) bool {
}
}

if len(t1.tracks[0].Position) > 1 && len(t2.tracks[0].Position) > 1 {
combiner := regexp.MustCompile("[a-z]$")
if combiner.MatchString(t1.tracks[0].Position) && combiner.MatchString(t2.tracks[0].Position) {
return true
}
}

return false
}

Expand Down
22 changes: 22 additions & 0 deletions recordutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,25 @@ func TestRunExtractInfotainment(t *testing.T) {
t.Errorf("Bad disk extract %+v:", tracks[12+19-1])
}
}

func TestRunExtractLegend(t *testing.T) {
data, err := ioutil.ReadFile("cdtests/2194660.data")
if err != nil {
t.Fatalf("Error: %v", err)
}

record := &pbrc.Record{}
proto.Unmarshal(data, record)

tracks := TrackExtract(record.GetRelease())

if len(tracks) != (16 + 13 + 11) {
t.Errorf("Wrong number of tracks: %v, from %v", len(tracks), len(record.GetRelease().Tracklist))
for i, t := range tracks {
log.Printf("%v. %v", i, len(t.tracks))
for j, tr := range t.tracks {
log.Printf(" %v. %v", j, tr.Title)
}
}
}
}

0 comments on commit b55aa0c

Please sign in to comment.