elementary / videos

Video player and library app designed for elementary OS
https://elementary.io
GNU General Public License v3.0
58 stars 17 forks source link

Use Gtk4 list widgets #371

Closed leolost2605 closed 1 year ago

leolost2605 commented 1 year ago

Use GTK4 grid view for library and list view for episodes We now have MediaItems instead of Videos which can be a show or a video (I thought about making two classes Show and Video which might have been a bit easier to understand but would require quite a bit of duplicate code). All logic regarding posters and what episodes belong to which show and how they are connected is moved into the MediaItems from being scattered across the LibraryItem widget and the video object. We now also can easily move to a tracker based library, use gst discoverer for meta data and have shows by the show name tag and not file structure but that's left to follow up PRs. All in all the behavior shouldn't change with this PR but can (at least I hope so) much more easily be altered in the future.

A lot of the logic regarding posters was taken from the old Video object but altered and stripped of some caching. I'm not 100% sure about why some (duplicate?) caching was being done there so I would like someone to double check the removal of the poster_cache_file but from what I understood the contents of it should either be in the corresponding thumbnail file or a file with a custom image and the poster_cache_file was only a duplicate. But maybe I'm missing something or performance was indeed increased by this duplicate? Although I didn't notice a difference.