Opened 11 years ago

Closed 11 years ago

#824 closed enhancement (fixed)

Delete an element with cli/gmg

Reported by: janssen Owned by:
Priority: major Milestone: 0.7.0
Component: programming Keywords: delete, cli, bitesized
Cc: Parent Tickets:

Description

It would be nice, if elements (let’s say pictures) could be delete over a gmg command (or another cli command).

It happend, that i uploadad a picture, which could not be displayed (working on that, if it’s a bug, i’ll report that one later). so i cannot display the pictures. the problem is, i can only delete it, when i can display it.

an option would be great or even necessary.

Change History (7)

comment:1 by janssen, 11 years ago

+ how can i delete this picture now?

in reply to:  1 comment:2 by saul, 11 years ago

Replying to janssen:

+ how can i delete this picture now?

This may not be the best way, but it is how I've done it in the past.

Make a backup of your mediagoblin.db file. Then open the file with sqlite3 (running interactively).

sqlite3 mediagoblin.db

Then enter the following commands, substituting the ID number of the media for the ###s.

delete from core__collection_items where media_entry=###;
delete from core__comment_subscriptions where media_entry_id=###;
delete from core__media_comments where media_entry=###;
delete from core__media_entries where id=###;
delete from core__media_tags where media_entry=###;
delete from core__mediafiles where media_entry=###;
delete from image__mediadata where media_entry=###;

comment:3 by Christopher Allan Webber, 11 years ago

This would be pretty easy-ish to do probably. But not quite bitesized.

We already have media deletion code from the views point of view; adding that to a gmg command shouldn't be too hard.

comment:4 by Christopher Allan Webber, 11 years ago

Keywords: bitesized added

I'm not sure how bitesized this is, but it's bitesized *enough* to mark it I guess :)

comment:5 by berkerpeksag, 11 years ago

Status: newreview

comment:6 by janssen, 11 years ago

well, it’s quite odd.

I can shoot a photo with my D7000 dslr in NEF format.

Edit it with darktable:

darktable    1.4.1-1     amd64   virtual lighttable and darkroom for photographers

export as JPG (8bit) and upload it to my mediagoblin instance => failure. Uploading works fine, but image cannot be displayed.

when i open the image with gimp and export it as jpg, it works like a charm :(

Version 0, edited 11 years ago by janssen (next)

comment:7 by Christopher Allan Webber, 11 years ago

Resolution: fixed
Status: reviewclosed

Looks great. Merged!

Note: See TracTickets for help on using tickets.