#56 Allow updating paths for collections

open
nobody
Library (8)
5
2013-01-08
2012-07-19
anrxc
No

Hello my comics collection was moved from /mnt/backup/user/hourly/strip to /mnt/storage/Comics and I found it impossible to change the base path in my library which has 300 books and is annotated and fully sorted in trees.

I can't find the time to re-create all of this from scratch, I did it years ago when I had time to waste. I'd just like to have a method to update the paths for any book.

Discussion

  • anrxc
    anrxc
    2012-07-19

    Script to update all paths in library collection

     
    Attachments
  • anrxc
    anrxc
    2012-07-19

    Until we get such a feature I attached a script that can be used to update all paths at once.

     
  • Oddegamra
    Oddegamra
    2012-07-19

    I would have suggested something along the line of using the command line version of sqlite3 on ~/.local/share/mcomix/library.db, in conjunction with a statement like "UPDATE book SET path = REPLACE(path, '/mnt/backup/user/hourly/strip', '/mnt/storage/Comics')", but I guess the script works just as well.

    I'm not sure how much of a help a generic "Change path" function would be, as the only use case is pretty much what you describe. In such a case, having a batch functionality would probably be much easier than changing the path of each book individually. Now, the question that remains is how to best go about this in an user-friendly manner.

     
  • anrxc
    anrxc
    2012-07-19

    Phew that command is way cooler :). I didn't know any better, so it was a nice opportunity to learn a little about sqlite in the process.

     
  • anrxc
    anrxc
    2012-07-19

    > I'm not sure how much of a help a generic "Change path" function would be,
    > as the only use case is pretty much what you describe.

    Hm yes that may be the most common problem. I did imagine what if users store comic books in multiple directories, or if you want to move just one comic. However for one or handful of comics, renaming a path in some dialog is almost the same time waster as delete + new import of those few.