| 
									
										
										
										
											2023-09-23 21:57:56 -05:00
										 |  |  | package app | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							|  |  |  | 	"fmt" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	"codeberg.org/danjones000/strip-beats/media" | 
					
						
							| 
									
										
										
										
											2023-09-24 16:40:24 -05:00
										 |  |  | 	"codeberg.org/danjones000/strip-beats/media/brainz" | 
					
						
							| 
									
										
										
										
											2023-09-23 21:57:56 -05:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func print() { | 
					
						
							|  |  |  | 	if file == nil { | 
					
						
							|  |  |  | 		PickFileWithConf() | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	fp, err := media.Fingerprint("/home/drj/MyFiles/Videos/WebShows/YouTube/Dolly_Parton_-_Topic/Just_Because_I_m_a_Woman.Dolly_Parton_-_Topic.Fmv-XQerVkM.webm") | 
					
						
							|  |  |  | 	if err != nil { | 
					
						
							|  |  |  | 		panic(err) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	ids, err := media.LookupFingerprint(fp) | 
					
						
							|  |  |  | 	if err != nil { | 
					
						
							|  |  |  | 		panic(err) | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2023-09-24 16:40:24 -05:00
										 |  |  | 	var recs []brainz.Recording | 
					
						
							| 
									
										
										
										
											2023-09-23 21:57:56 -05:00
										 |  |  | 	for _, res := range ids.Results { | 
					
						
							|  |  |  | 		for _, rec := range res.Recordings { | 
					
						
							| 
									
										
										
										
											2023-09-24 16:40:24 -05:00
										 |  |  | 			err = brainz.FillRecording(&rec) | 
					
						
							| 
									
										
										
										
											2023-09-23 21:57:56 -05:00
										 |  |  | 			if err != nil { | 
					
						
							|  |  |  | 				panic(err) | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			recs = append(recs, rec) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	fmt.Printf("%+v\n", recs) | 
					
						
							|  |  |  | } |