feature/artwork_gallery #41
No reviewers
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: music-kraken/music-kraken-core#41
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/artwork_gallery"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Please add the following settings:
Is the Interface ready?
@Luna not yet, but the code is pushed. I suggest you look at it and try implementing it yourself. Here is how the interface should work:
Classes
ArtworkCollection
: All the different artworks for one data objectsArtwork
: One artwork with multipleArtworkVariants
. This is necessary because maybe the same picture can be found with multiple different urlsArtworkVariant
: Contains the actual url of the artworkFunctions
The most important function for the scraping is
ArtworkCollection.add_data
, which adds the data passed into the function to existing entities or new one. It matches new ones by the url.Artwork.add_data
does the same. This should be implemented.For consistency
ArtworkCollection.append
has to exist even though it probaply won't be used much. There are 2 options how to go about it.The second option would be cleaner imo but I want your opppinion.
ArtworkCollection.compile
fetches every variant of artworks, and is called once the data-object is compiled (aka on download). There should the duplicate recognition be implementedunfortunately I couldn't run the changes because of time so you will probaply will have to fix many small issues because of so big changes.
Perfect thanks I'll probably do that tonight
Duplicate Recognition of the images
@Elara6331 said Google uses the simhash algorythm for their web crawler, and it doesn't seem to bad to implement.
@Luna found this code in a cli tool, which looks really nice:
It uses ImageHash, which looks REALLY good and has 3k Stars, so this seems to be the best option.
One thing to note is, that this can calculate the difference between the images, and I would just add it to the settings at which threshhold the images are duplicates or not.
👍 so no change for image hashing should be the same libary that you found
If @Elara6331 or you don't have good arguments that overweigh the pros of this library then yes 👍
But I highly doubt this is controversioal at all
ImageHash looks good to me :3
there is a slight problem with that, since artwork is an object i cant import download since download itself imports artwork so question would be what i should do with that problem.
wouldnt even be that bad just means that i cant check for duplicates in artwork
Yes I am aware of this issue. Fuck circular imports, so easy to avoid when designing a language. Because of technicalities it works if you import the connection class in the Artwork constructor. Then just create an instance of the class in the constructor right after. Just give it a constant module name. Cuz then I can optimize the collection class to only create one global instance of each module later <333
Yes I am aware of this issue. Fuck circular imports, so easy to avoid when designing a language. Because of technicalities it works if you import the connection class in the Artwork constructor. Then just create an instance of the class in the constructor right after. Just give it a constant module name. Cuz then I can optimize the collection class to only create one global instance of each module later <333
Okay thanks ugly way to do it (not your fault) but it's a way xD thanks for the help ❤️🫂
Okay thanks ugly way to do it (not your fault) but it's a way xD thanks for the help ❤️🫂
@Elara6331 you gonna love this fix and limitation xD
With that issue away I think I'll have it done tonight excepte the metadata stuff not really sure where to put what 🙃
Python allows circular imports?!
Also, how does that workaround work?? This makes no sense. Circular imports should just be disallowed completely.
The more I learn about Python, the more convinced I am that it was designed by a drunk 5 year old with no programming experience lol.
Still better than java c# and many other languages
I hope you meant circular imports shouldn't exist
Because it's really really pointless and annoying
Yes, that's what I meant. Circular imports should not be a thing.
I think not even java has that "feature" and that says a lot 😂
How can it be so hard to import with that annoying import function
I kinda dont know how to fix this i cant really import the connection module because it imports some other modules and it just doesnt work and i amout of ideas
Since i am kinda to dumb to handle this i am gona put the compile function into page_attributes if any of you have a better idea just tell me.
@Luna I can't look at it, if you don't push your changes.
Sorry
@Luna I fixed the
add_data
function, and I fixed the circular import in a very clean way. Now you should be able to continue <333Your the bestttt 🥹❤️❤️❤️❤️ thank you so so much
Wait wait wait you fixed the circulat import issue with just one line of code ?!!!???
Also does this mean i can do the download in the artwork class?
Yes. All I did was only import the objects module for the type checker. Thus you still have the intellisense, but no circular import :)
That's so crazy your the best ❤️
Musify is done genius and bandcamp should also work but something is majorly wrong with Youtube music invideous isn't even responding i am gona investigate further and write everything that i found but i dont think i am qualified to fix this issue.
Okay i am done it would be great if @Hazel could look over it and remove the wip tag if your happy with the result.
WIP: feature/artwork_galleryto feature/artwork_gallery