Why using FFPROBE for duration and not Plex native method? #116
Replies: 7 comments 2 replies
-
|
@codeanator
Thanks for this - I had been looking for an inbuilt plex method but had not
been able to find one....
I will implement this as I hope it will be able to pick up the duration
from films that have split files on disk.
It is always welcome for contributions from members of the group....
Cheers
Jason
…On Sat, 11 Dec 2021 at 16:34, CodeAnator ***@***.***> wrote:
Hey,
Saw that you recetly added file duration support but why relying on
resource-heavy external component Ffprobe and not the default Plex method
for that?
fileDuration = 0 for part in media.items[0].parts: fileDuration +=
int(long(getattr(part, 'duration')))
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#116>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKMJ6CMFKD4UCBGSVHLUQNVSBANCNFSM5J3EDUOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
|
U're welc :) I am currently implementing this on my side and it is working. I'll try with split files. This idea would be :
|
Beta Was this translation helpful? Give feedback.
-
|
There are many python libraries for cropping images... but none of them
seem to work in the plex framework....
As it stands I if the system is not NT, and thumbor fails it will use the
original image as default....
When I get back home, I will look at getFilmImages and let you know what it
is doing.... Alternatively - just paste the code into an email... And I can
give feedback right away....
Cheers
Jason
…On Mon, 13 Dec 2021 at 10:07, CodeAnator ***@***.***> wrote:
U're welc :) I am currently implementing this on my side and it is
working. I'll try with split files.
Also, I am trying to turn the cropping method more resilient in case
thumbor fails and if Plex not running on Windows. In that case, I would
like to fallback to original image even if not optimal. But I do not
understand how def getFilmImages(imageType, imageURL, whRatio) is working.
This idea would be :
- Try Thumbor
- Except if nt try local cropping
- Except return original image
- Else if not nt, return original image
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#116 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKLMFX7SUDN4REU6ZGDUQWZUVANCNFSM5J3EDUOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
|
***@***.***
…On Mon, 13 Dec 2021 at 10:22, CodeAnator ***@***.***> wrote:
Where can I find ur email address? 😄
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#116 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKIBVCFI2OSHQK6AWRTUQW3M7ANCNFSM5J3EDUOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
|
to get by the censor... you can paste the code into a text file.... or
paste it straight into the email....
Sorry I have been so busy the past two days I forgot to look at the code
when I got home...
…On Mon, 13 Dec 2021 at 11:09, CodeAnator ***@***.***> wrote:
Censored by GH. Of you have a twitter account, follow me and send me a DM
at @holedestroyr (NSFW!!)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#116 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKO5RSBWRINXZU64H5TUQXA4TANCNFSM5J3EDUOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
|
It is not working. But don't worry. I fixed it ;) See #117 |
Beta Was this translation helpful? Give feedback.
-
|
@codeanator
Many thanks for the code in relation to film duration, I have confirmed it
works with stacked films!!!!!
I have also implemented your suggestion in regards to film images.
I am now working on matching the format of the movie names but having issue
with making both the year and segment info optional.... thinking of also
including optional cast names in the filenames at the end of the title...
I have asked a question on StackOverFlow - here is the link:
https://stackoverflow.com/questions/70748753/matching-and-managing-optional-groups-in-regex-python
The file names will be in the following format:
(Studio) - Title (Year) - Segment No [cast1, cast2, cast3]
Studio and Title will not be optional
Kind Regards and thanks for all your help!!!
Jason xxx
…On Tue, 14 Dec 2021 at 15:47, CodeAnator ***@***.***> wrote:
It is not working. But don't worry. I fixed it ;) See #117
<#117>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#116 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKI3AKNVI4G7TMS5SFWZACDUQ5RJZANCNFSM5J3EDUOA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
Saw that you recetly added file duration support but why relying on resource-heavy external component Ffprobe and not the default Plex method for that?
Beta Was this translation helpful? Give feedback.
All reactions