This commit is contained in:
		@@ -139,8 +139,8 @@ func matchYear(fileName string) (int, string) {
 | 
				
			|||||||
	if len(years) == 0 {
 | 
						if len(years) == 0 {
 | 
				
			||||||
		return -1, fileName
 | 
							return -1, fileName
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						// get last year occurance and cut first and last char
 | 
				
			||||||
	year, err := strconv.Atoi(years[len(years)-1])
 | 
						year, err := strconv.Atoi(years[len(years)-1][1 : len(years)-1])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return -1, fileName
 | 
							return -1, fileName
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,6 +63,11 @@ func SearchVideo(MovieName string, year int) *VideoTMDB {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	fmt.Println(len(t.Results))
 | 
						fmt.Println(len(t.Results))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// if there was no match with tmdb return 0
 | 
				
			||||||
 | 
						if len(t.Results) == 0 {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	var tmdbVid tmdbVidResult
 | 
						var tmdbVid tmdbVidResult
 | 
				
			||||||
	if year != -1 {
 | 
						if year != -1 {
 | 
				
			||||||
		for _, result := range t.Results {
 | 
							for _, result := range t.Results {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user