Giter VIP home page Giter VIP logo

Comments (6)

AJMitev avatar AJMitev commented on July 19, 2024

@jim-craane The problem is self defined into the error message. There are two file types that match the particular stream content. This is not wanted behavior. Please be sure that your custom class does not contains the bytes array from library mp3 filetype.

from filetypechecker.

jim-craane avatar jim-craane commented on July 19, 2024

It does not contain the bytes from the already existing mp3 filetype:
image
image

from filetypechecker.

AJMitev avatar AJMitev commented on July 19, 2024

There is something wrong here. I am already implemented this file extension into my project and using the sample you provided into issue #9 all current and new tests are passed. Cant reproduce this behavior. New version including this file type and some others will be released today.

from filetypechecker.

jim-craane avatar jim-craane commented on July 19, 2024

Yeah you are right, I was implementing my workaround for issue #9, and with that my issue is resolved. Many thanks for the speed.

But I can imagine that it can happen for any other filetype with different magic bytes you didn't implement and someone tries to create a custom implementation for it to get it done. So that's what's this bug is about. It's not only about the mp3 filetype, but for any other file type that misses magic bytes that are also valid for that extension.

from filetypechecker.

AJMitev avatar AJMitev commented on July 19, 2024

I don't think your implementation is workaround. Its an absolute valid scenario where the filetype you want to identify is not implemented by design. I think of it as a feature. The purpouse of IFileType and FileType abstraction is to provide that feature.

There is many types that I am not implemented because there are rare to met.

The main goal of this library is to allow programmer to easily adding new types if its nessecery. I am trying to do my best when somebody require an specific type - to be implemented.

from filetypechecker.

jim-craane avatar jim-craane commented on July 19, 2024

Ah ok! Then you are right!

from filetypechecker.

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.