Hellowlol / bw_plex

binge watching for plex
MIT License
368 stars 23 forks source link

Is there any requirement to persist Audio/Video of TV Episode? #80

Closed tomking2 closed 5 years ago

tomking2 commented 5 years ago

When an episode has been correctly processed and stored within the DB containing start/end times of the opening theme, is there still a requirement to persist the MP4/MKV/AVI file that is downloaded from Plex and stored in the 'themes' folder? As subsequent requests to play the media should load this direct from the database, thus negating the requirement to obtain a copy of the Audio/Video.

Am I correct in thinking that each episode will download its own instance of the Audio/Video for that episode only, thus negating the need to ever store the video upon completion?

Hellowlol commented 5 years ago

The theme should only be downloaded once per show (this download can be multiple themes depending on the sources it was collected from).

However the themes db is stored in memory and only written to disk when it gets a KEywordinterupt, so if bw_plex is restarted or shutdown incorrectly the themes are downloaded again. I havnt done anything to fix this as I wanted to be able to manually control the themes.

In a later version the default action would be to delete the theme and there be a config option to not do it.

The theme shouldn’t be downloaded as long as there is a entry in the SQLite db.

Hellowlol commented 5 years ago

https://github.com/Hellowlol/bw_plex/issues/72

Hellowlol commented 5 years ago

bw_plex hasn’t gotten any updates for a while, I have been exploring other ways to find the intro. Atm I’m stuck on writting a browser extension :( I get a new computer tomorrow so I get back to bw_plex, running test take so long time that lost my motivation

tomking2 commented 5 years ago

Thanks for the info, I've only just discovered this repo and very interested into the idea. Slowly working my way through the code to figure out how it all goes together, and I'm sure it'll be a lot clearer given time.

Yeah I've noticed, saw a couple comments floating around the idea of a browser extension of this. Personally I'm very happy with Python, great to mess with.

Tests, definitely the worst. Always start coding them far too late, very easy to lose motivation at that point, I've done it before!

Look forward to seeing where this goes, hope you get your motivation back. May dig into intro parsing, saw the mention of a blog by Netflix in a related post, although A/V isn't my strong suit

Hellowlol commented 5 years ago

The code is not as tidy as as I would like.

The browser extension will be used to upload reference frames to a central db, think of it as a identifying image of the start and end of the intro.

Let me know if you have any questions.

Hellowlol commented 5 years ago

I plan to borrow you code for chromecast 👍

Hellowlol commented 5 years ago

@tomking2 did you get chromecast working?

tomking2 commented 5 years ago

Hey, yeah I got the code to a working state surprisingly!

It's a bit hacky, and I haven't given it much thought to match to the correct chromecast to the one actually playing the content, but it does work.

Unfortunately I've got nowhere to run the code as it currently stands, so my use in on hold until I have a new server up and running locally.

Hellowlol commented 5 years ago

Thanks! I have been dabling with the chromecast to support play next episode. (If the skip credits option is enabled. 👍

tomking2 commented 5 years ago

Ended up placing the code into python-plexapi as though this would be a better location, currently in https://github.com/tking2/python-plexapi/tree/dirty

Most of the changes to bw_plex focus on hardcoded specific skip times for consistent TV shows that always have the opening credits from 00:00-01:00 for example. Saves having to process each episode that way

Hellowlol commented 5 years ago

Chromecast support is added now. For now the user has to install pychromecasr manually

tomking2 commented 5 years ago

Just seen, thanks for this :)!