mirror of
				https://github.com/Jonny007-MKD/OTR-DecodeAll
				synced 2025-11-03 16:15:36 +01:00 
			
		
		
		
	Rename torrentDb to labelDb
This commit is contained in:
		
							parent
							
								
									441d1811ae
								
							
						
					
					
						commit
						66f262bc71
					
				
					 2 changed files with 6 additions and 6 deletions
				
			
		
							
								
								
									
										4
									
								
								config
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								config
									
									
									
									
									
								
							| 
						 | 
					@ -18,7 +18,7 @@ function funcConfigPre {	# These values are set at the beginning of the script
 | 
				
			||||||
	logLevel=2														# level, which messages shall be written into the log.
 | 
						logLevel=2														# level, which messages shall be written into the log.
 | 
				
			||||||
	echoLevel=5														# level, which messages shall be written to stdout.
 | 
						echoLevel=5														# level, which messages shall be written to stdout.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	torrentDb="/home/deluged/torrents.db"							# File with file names and labels (see at github: OTR-TorrentDb) (optional)
 | 
						labelDb="/home/deluged/labeldb/labelsOfTorrents.db"				# File with file names and labels (see at github: Torrent-Label-DB) (optional)
 | 
				
			||||||
	# Add label to directory mapping. (optional)
 | 
						# Add label to directory mapping. (optional)
 | 
				
			||||||
	#   1st arg: Label
 | 
						#   1st arg: Label
 | 
				
			||||||
	#   2nd arg: Each movie with this label will be moved to this subdirectory of $outDir
 | 
						#   2nd arg: Each movie with this label will be moved to this subdirectory of $outDir
 | 
				
			||||||
| 
						 | 
					@ -48,7 +48,7 @@ function funcConfigPost {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cmdCut="/home/deluged/multicutmkv.sh"							# path to multicut
 | 
						cmdCut="/home/deluged/multicutmkv.sh"							# path to multicut
 | 
				
			||||||
	cmdCutArgs="-o $tempDir -t $tempDir"
 | 
						cmdCutArgs="-q -o $tempDir -t $tempDir"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -251,11 +251,11 @@ function funcUnlock {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function funcGetLabel {
 | 
					function funcGetLabel {
 | 
				
			||||||
	if [ -n "$torrentDb" -a -r "$torrentDb" ]; then
 | 
						if [ -n "$labelDb" -a -r "$labelDb" ]; then
 | 
				
			||||||
		label="$(LC_ALL=C fgrep -m 1 "$filename" $torrentDb | grep -o ' [a-zA-Z0-9_-]*$' | grep -o '[a-zA-Z0-9_-]*$')"
 | 
							label="$(LC_ALL=C fgrep -m 1 "$filename" $labelDb | grep -o ' [a-zA-Z0-9_-]*$' | grep -o '[a-zA-Z0-9_-]*$')"
 | 
				
			||||||
		funcLog 5 "label: $label"
 | 
							funcLog 5 "label: $label"
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		funcLog 5 "no/incorrect torrentDb given"
 | 
							funcLog 5 "no/incorrect labelDb given"
 | 
				
			||||||
		label="N\\A"
 | 
							label="N\\A"
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -371,7 +371,7 @@ function funcProcessFiles {
 | 
				
			||||||
			funcLog 4 "Label did not match filter. Skipping";
 | 
								funcLog 4 "Label did not match filter. Skipping";
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
		if [ -z "$label" -a "$label" != "N\\A" ]; then						# Empty label and torrentDb does exist --> skip
 | 
							if [ -z "$label" -a "$label" != "N\\A" ]; then						# Empty label and labelDb does exist --> skip
 | 
				
			||||||
			funcLog 1 "No label specified for this movie. Skipping"
 | 
								funcLog 1 "No label specified for this movie. Skipping"
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue