Giter Club home page Giter Club logo

Comments (12)

wtanksleyjr avatar wtanksleyjr commented on June 5, 2024

I was building a script to do this (but got distracted). However, I didn't know that --latest N would check before downloading -- how does it perform the check? Wouldn't just using --latest with a big number solve the problem?

With that said, my plan to implement this (before I got distracted) was to use odmpy --exportloans loans.json, then get the individual book IDs (something like cat loans.json | jq '.[].id', but I haven't tested that) then remove the IDs I've already processed, and then call odmpy --selectid [list of IDs].

from odmpy.

wtanksleyjr avatar wtanksleyjr commented on June 5, 2024

OK, this works to filter and show only the loans I've downloaded: cat loans.json | jq '.[].id' | sort -u | sed 's/"//g' | combine - not <(cd ~/au/sources/libby/ && ls)
(That's combine from moreutils, and obviously this is after odmpy --exportloans loans.json).
Then you can pass that almost directly to odmpy --selectid ... the only hard part is figuring out how I need to set up the download directory, as well as how to best get the metadata.

from odmpy.

wtanksleyjr avatar wtanksleyjr commented on June 5, 2024

One comment: there used to be another project on github that automatically downloaded all my checked-out libby books. It's gone now, the whole project's missing. The two facts might be related, although I don't know for sure.

from odmpy.

ping avatar ping commented on June 5, 2024

Like what was mentioned, using --latest N with a sufficiently large number should work for you unless you move the previously downloaded files to a different location.

What is it about --latest that is an issue for your use case?

from odmpy.

jahlborn avatar jahlborn commented on June 5, 2024

Like what was mentioned, using --latest N with a sufficiently large number should work for you unless you move the previously downloaded files to a different location.

What is it about --latest that is an issue for your use case?

yeah, latest with a large number would probably work. i thought it might be cleaner to have an option which specifically was targeted at getting all new books, but i can make latest work.

from odmpy.

jahlborn avatar jahlborn commented on June 5, 2024

@ping another issue that i noticed just now as i was testing this out is that even though --latest doesn't re-download the files, it does modify the files, so when i check for newly modified files, the stuff that has already been downloaded shows up as "new" again. so maybe i don't need --new, but would it be possible to make it so that --latest doesn't modify existing files?

from odmpy.

ping avatar ping commented on June 5, 2024

@ping another issue that i noticed just now as i was testing this out is that even though --latest doesn't re-download the files, it does modify the files, so when i check for newly modified files, the stuff that has already been downloaded shows up as "new" again. so maybe i don't need --new, but would it be possible to make it so that --latest doesn't modify existing files?

Existing audiofile downloads will no longer have their ID3 updated in affc94c
You can test this by installing from the latest source.

from odmpy.

jahlborn avatar jahlborn commented on June 5, 2024

@ping another issue that i noticed just now as i was testing this out is that even though --latest doesn't re-download the files, it does modify the files, so when i check for newly modified files, the stuff that has already been downloaded shows up as "new" again. so maybe i don't need --new, but would it be possible to make it so that --latest doesn't modify existing files?

Existing audiofile downloads will no longer have their ID3 updated in affc94c You can test this by installing from the latest source.

hmmm, did an upgrade, force-reinstall of the latest and saw the same behavior (local modification times changed).

from odmpy.

ping avatar ping commented on June 5, 2024

Can you provide the actual command you are using?

Also, are you looking at the modification time of the folder or the actual mp3 files?

from odmpy.

jahlborn avatar jahlborn commented on June 5, 2024

Can you provide the actual command you are using?

Also, are you looking at the modification time of the folder or the actual mp3 files?

command:
odmpy libby --latest 10 --hideprogress --downloaddir AudioBooks

i'm looking at the modification times of the mp3 files. (running this all on ubuntu linux box).

from odmpy.

ping avatar ping commented on June 5, 2024

My bad. I missed out on the changes for odm-based downloads. Can you update from source and try again?

from odmpy.

jahlborn avatar jahlborn commented on June 5, 2024

My bad. I missed out on the changes for odm-based downloads. Can you update from source and try again?

yep, that did it, thanks! guess i'll call this good to go. thanks again for an awesome utility.

from odmpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.