Package: jack / 3.1.1+cvs20050801-31

59_assume_ok_query.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Under some circumstances we want to tag tracks even when the FreeDB query
failed: it's possible that the user manually added the jack.freedb file.
Therefore, check whether parsing the FreeDB file works.

Debian bug #441270

Depends on 53_no_tag_when_freedb_fails.patch

--- a/jack_prepare.py
+++ b/jack_prepare.py
@@ -494,7 +494,6 @@
             if string.upper(x[0]) != "Y":
                 sys.exit(0)
             cf['_query_on_start'] = 0
-            cf['_set_id3tag'] = 0
         else:
             jack_display.exit()
 
@@ -533,6 +532,14 @@
             error("query on start failed to give a good freedb file, aborting.")
     else:
         err, jack_tag.track_names, jack_tag.locale_names, freedb_rename, revision = jack_freedb.interpret_db_file(jack_ripstuff.all_tracks, todo, cf['_freedb_form_file'], verb = cf['_query_on_start'], warn = cf['_query_on_start'])
+        # If the FreeDB query failed and the FreeDB data cannot be parsed,
+        # don't tag the files.  However, if the FreeDB data can be parsed
+        # even though the query failed assume that the query worked and
+        # do the tagging (the user might have edited the file by hand).
+        if cf['_cont_failed_query'] and err:
+            cf['_set_id3tag'] = 0
+        else:
+            cf['_query_on_start'] = 1
     return freedb_rename
 
 def undo_rename(status, todo):