Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not enforce import throttling when visiting files that are already in the database
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6ee03bf3e98d6232a655c30d5d48127e30827e64
User & Date: brandon 2018-11-13 22:52:49
Context
2018-11-13
23:23
Check if a cover exists before trying to import a new one; update the old one if it exists. Also, update the insert_cover query to account for the comments field. check-in: 8f79b7799b user: brandon tags: trunk
22:52
Do not enforce import throttling when visiting files that are already in the database check-in: 6ee03bf3e9 user: brandon tags: trunk
22:12
Detect whether the user is adding a duplicate release from the edit dialog check-in: 317c252e00 user: brandon tags: trunk
Changes

Changes to src/grotesque/ui/gtk3/threads/storyimportthread.py.

68
69
70
71
72
73
74




75
76










77
78
79
80
81
82
83
            yield True
            self.dialog.info_label.set_text('Importing {0}'.format(basename))
            try:
                story_id, failed = db.add_story_from_file(
                    self.conn, self.settings, filename, self.fetch_metadata,
                    self.fetch_coverart)
            except BabelError:




                continue
            except ValueError:










                continue
            if failed:
                self.fails.append(story_id)
            if story_id is not None:
                story_rec = db.query.select_story(self.conn, story_id)
                self.library.add_story_from_db_rec(story_rec)
                self.library.update_filter_stores()







>
>
>
>


>
>
>
>
>
>
>
>
>
>







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
            yield True
            self.dialog.info_label.set_text('Importing {0}'.format(basename))
            try:
                story_id, failed = db.add_story_from_file(
                    self.conn, self.settings, filename, self.fetch_metadata,
                    self.fetch_coverart)
            except BabelError:
                count = count + 1
                # Update the progress bar.
                self.dialog.progressbar.set_fraction(
                    float(count) / float(len(self.filenames)))
                continue
            except ValueError:
                count = count + 1
                # Update the progress bar.
                self.dialog.progressbar.set_fraction(
                    float(count) / float(len(self.filenames)))
                continue
            if story_id is None and failed is None:
                count = count + 1
                # Update the progress bar.
                self.dialog.progressbar.set_fraction(
                    float(count) / float(len(self.filenames)))
                continue
            if failed:
                self.fails.append(story_id)
            if story_id is not None:
                story_rec = db.query.select_story(self.conn, story_id)
                self.library.add_story_from_db_rec(story_rec)
                self.library.update_filter_stores()