Enhancement to the Trailer function in Fen Light to serve only Public Videos and reordering the first two or three 'Official Trailer' results #172

Closed
opened 2024-11-09 23:24:34 +00:00 by jeromedevine · 1 comment
jeromedevine commented 2024-11-09 23:24:34 +00:00 (Migrated from github.com)

Hello Tikipeter,

I hope I find you well.

I figured out two contributions which I think could improve further the Trailer function of Fen Light over the current version 1.0.92. I am posting these for your kind consideration.

  1. Filtering trailers to Public videos only for the status.privacyStatus property value so that Private videos that are unviewable are not picked up, especially as the first result.

For example when I tried to use the trailer function on 'The Lion King (2019)' the first result in the list was a private video, so it just gave out an error when attempting to load the video after pressing 'Trailer'. I was not sure if a YouTube API key would be required to use the status.privacyStatus filter [relevant source: https://developers.google.com/youtube/v3/docs/videos#status.privacyStatus]

  1. Reordering the first two or three 'Official Trailer' results so that when the 'Trailer' button is pressed, the first result served is 'Official Trailer' instead of 'Official Trailer 2' or 'Official Trailer 3' or 'Final Official Trailer'. Also note the hash key found in some titles. Also for the extras page, by reordering them they would look neater in the 'Videos' box in the movie/tv show page instead of OT3, Final OT, OT2, OT...

I came up with a rudimentary edit of metadata.py and extras.py, and they work pretty well for my Fen Light setup on 1.0.92 to sort the first 3 OT results. I am attaching them with this post if you want to see my rough solution. Edits are in metadata.py line 111, and extras.py lines 352-357. I changed their extension from .py to .txt to upload here:

metadata.txt
extras.txt

I am bringing this up because as it is, the Trailer function is mostly serving 'Official Trailer 2' or even 'Official Trailer 3' (e.g. Wolfs, The Matrix Resurrections, Dune: Part Two) as the first result when you press 'Trailer', and I noticed that the first 'Official Trailer' released gives a better introduction to what a movie is all about, with OT 2 and OT 3 or even Final Official Trailer giving out a lot of spoilers. Then I rechecked back the number of videos loaded before and after my edit and they returned the same number on the movie page, so I am concluding that I am not filtering out any videos with my edits.

Anyways, I am sharing these ideas. Perhaps you can see some value in them if you find some time to include them. Thank-you for your improvements over 1.0.91, I have enjoyed those enhancements quite a lot since you posted them! :)

Hello Tikipeter, I hope I find you well. I figured out two contributions which I think could improve further the Trailer function of Fen Light over the current version 1.0.92. I am posting these for your kind consideration. 1. Filtering trailers to Public videos only for the status.privacyStatus property value so that Private videos that are unviewable are not picked up, especially as the first result. For example when I tried to use the trailer function on 'The Lion King (2019)' the first result in the list was a private video, so it just gave out an error when attempting to load the video after pressing 'Trailer'. I was not sure if a YouTube API key would be required to use the status.privacyStatus filter [relevant source: https://developers.google.com/youtube/v3/docs/videos#status.privacyStatus] 2. Reordering the first two or three 'Official Trailer' results so that when the 'Trailer' button is pressed, the first result served is 'Official Trailer' instead of 'Official Trailer 2' or 'Official Trailer 3' or 'Final Official Trailer'. Also note the hash key found in some titles. Also for the extras page, by reordering them they would look neater in the 'Videos' box in the movie/tv show page instead of OT3, Final OT, OT2, OT... I came up with a rudimentary edit of metadata.py and extras.py, and they work pretty well for my Fen Light setup on 1.0.92 to sort the first 3 OT results. I am attaching them with this post if you want to see my rough solution. Edits are in metadata.py line 111, and extras.py lines 352-357. I changed their extension from .py to .txt to upload here: [metadata.txt](https://github.com/user-attachments/files/17689640/metadata.txt) [extras.txt](https://github.com/user-attachments/files/17689641/extras.txt) I am bringing this up because as it is, the Trailer function is mostly serving 'Official Trailer 2' or even 'Official Trailer 3' (e.g. Wolfs, The Matrix Resurrections, Dune: Part Two) as the first result when you press 'Trailer', and I noticed that the first 'Official Trailer' released gives a better introduction to what a movie is all about, with OT 2 and OT 3 or even Final Official Trailer giving out a lot of spoilers. Then I rechecked back the number of videos loaded before and after my edit and they returned the same number on the movie page, so I am concluding that I am not filtering out any videos with my edits. Anyways, I am sharing these ideas. Perhaps you can see some value in them if you find some time to include them. Thank-you for your improvements over 1.0.91, I have enjoyed those enhancements quite a lot since you posted them! :)
Tikipeter commented 2024-11-17 10:40:38 +00:00 (Migrated from github.com)

Filtering trailers to Public videos only for the status.privacyStatus property value so that Private videos that are unviewable are not picked up, especially as the first result.

There's no info provided for that. The info for all the videos come from TMDb. There's no interaction with youtube so as to get that information.

Reordering the first two or three 'Official Trailer' results so that when the 'Trailer' button is pressed, the first result served is 'Official Trailer' instead of 'Official Trailer 2' or 'Official Trailer 3' or 'Final Official Trailer'. Also note the hash key found in some titles. Also for the extras page, by reordering them they would look neater in the 'Videos' box in the movie/tv show page instead of OT3, Final OT, OT2, OT...

That should be improved for next update.

>Filtering trailers to Public videos only for the status.privacyStatus property value so that Private videos that are unviewable are not picked up, especially as the first result. There's no info provided for that. The info for all the videos come from TMDb. There's no interaction with youtube so as to get that information. >Reordering the first two or three 'Official Trailer' results so that when the 'Trailer' button is pressed, the first result served is 'Official Trailer' instead of 'Official Trailer 2' or 'Official Trailer 3' or 'Final Official Trailer'. Also note the hash key found in some titles. Also for the extras page, by reordering them they would look neater in the 'Videos' box in the movie/tv show page instead of OT3, Final OT, OT2, OT... That should be improved for next update.
Sign in to join this conversation.
No description provided.