Giter Club home page Giter Club logo

Comments (7)

AlexAplin avatar AlexAplin commented on September 26, 2024

If you care about data loss, use {quality} in the filename template to prevent improper file chaining. Since resuming only reads a simple byte position, it can't distinguish between a complete low quality video and an incomplete high quality video. Possible long term solutions:

  1. Check if the file is complete by checking the integrity. Either a third party tool like ffprobe or maybe reading a chunk of previous bytes and comparing it to the download.
  2. Use {quality} in the default filename format.

from nndownload.

Suika avatar Suika commented on September 26, 2024

In case of high quality videos, [{quality}][{video_quality}].{ext} will result in [auto][archive_h264_1080p].mp4
In case of ?old content?: [auto][__NONE__].mp4

So I would guess that {video_quality} should be used?
As {quality} doesn't return anything viable.

from nndownload.

AlexAplin avatar AlexAplin commented on September 26, 2024

Only quality is available to all videos, where auto is high quality and low is low quality. The other qualities aren't reported on legacy videos. If quality is being misreported, that's something that needs to be looked into.

from nndownload.

AlexAplin avatar AlexAplin commented on September 26, 2024

Give 9159d45 a try. This compares the tail bytes on the existing data and the download, only resuming if they match.

from nndownload.

Suika avatar Suika commented on September 26, 2024

Tested it. As expected the download is not resumed in case of mismatching sizes.
At least there will be no files that are ~200mb big but play in 360p.

A bit more verbose information would be welcome, since it's hard to decide if the "different quality"/size is higher or lower in regards to the existing file. And having the video id in the same line would allow to programmatically decide if file should be kept or be replaced

Optimal would be a flag that allows for file to be overwritten by a video of a bigger size.
Since bigger size + quality=auto would mean that the old file is of lower quality.
But that is up to you.

from nndownload.

AlexAplin avatar AlexAplin commented on September 26, 2024

I suspect people want the high quality if it's available by default, so the file will be overwritten when quality is auto if:

  • The existing file length is less than the reported download length and the byte comparison window does not match or
  • The existing file is negligibly small

When the quality is low and the byte window doesn't match, it'll report as such. I'll push this up in a few.

from nndownload.

Suika avatar Suika commented on September 26, 2024

Thank you.

from nndownload.

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.