Not logged in

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

Overview
Comment:Detect whether the user is adding a duplicate release from the edit dialog
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:317c252e0077895fcc9a66ca74282fbcef0843b0
User & Date: brandon 2018-11-13 22:12:16
Context
2018-11-13
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
22:11
Be sure to include blorbed files in the list of possible file extensions check-in: a60434f578 user: brandon tags: trunk
Changes

Changes to src/grotesque/ui/gtk3/dialogs/editdialog.py.

1247
1248
1249
1250
1251
1252
1253








1254
1255
1256
1257
1258
1259
1260
1261
1262
            d = Gtk.MessageDialog(self, Gtk.DialogFlags.MODAL,
                                  Gtk.MessageType.ERROR,
                                  Gtk.ButtonsType.OK)
            d.set_markup("Could not deduce IFIDs for this file")
            d.run()
            d.destroy()
            return False








        db.query.insert_release(self.conn, ifids[0], self.story_id, filepath, None,
                          None, None, None, format_id)
        self.release_store.append([False, ifids[0], raw_format, filepath,
                                   None, None, None, None])

    def _on_remove_release(self, button):
        selection = self.release_view.get_selection()
        if selection is None:
            d = Gtk.MessageDialog(self, Gtk.DialogFlags.MODAL,







>
>
>
>
>
>
>
>
|
|







1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
            d = Gtk.MessageDialog(self, Gtk.DialogFlags.MODAL,
                                  Gtk.MessageType.ERROR,
                                  Gtk.ButtonsType.OK)
            d.set_markup("Could not deduce IFIDs for this file")
            d.run()
            d.destroy()
            return False
        if db.query.select_release(self.conn, ifids[0]) is not None:
            d = Gtk.MessageDialog(self, Gtk.DialogFlags.MODAL,
                                  Gtk.MessageType.ERROR,
                                  Gtk.ButtonsType.OK)
            d.set_markup("A release with this IFID is already in the database")
            d.run()
            d.destroy()
            return False
        db.query.insert_release(self.conn, ifids[0], self.story_id, filepath,
                                None, None, None, None, format_id)
        self.release_store.append([False, ifids[0], raw_format, filepath,
                                   None, None, None, None])

    def _on_remove_release(self, button):
        selection = self.release_view.get_selection()
        if selection is None:
            d = Gtk.MessageDialog(self, Gtk.DialogFlags.MODAL,