Jump to content

Show Intro Skip Option


Liquidfire88

Recommended Posts

rbjtech
12 minutes ago, chef said:

But, it currently lives inside the fingerprint task. This might not be ideal because  that task would have to run a second time after the title sequence task has completed. 

The title sequence task is such a long running task, I thought it was best to not bog it down at the end with a bunch of database clean up.

What do you guys think? 

Great progress 👍

So I guess you could solve this is one of two ways a) force the task to close after a time period (built into the schedule - I think) - downside of this is if you have a fast machine, then it may be ineffective or b) simply count the number of 'seasons' processed and then do a vacuum before moving onto the next, by stopping and restarting the task maybe ?  Maybe we need the vacuum task as a separate schedule ?

The 'hurt' period for this is the initial scan for those with large libraries, I don't see this being an issue at all once that is complete.

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

Cheesegeezer
14 minutes ago, chef said:

I was able to shrink the database file size down substantially after looking at removing finger prints at a 'completed' season level, and not series.

The vacuum method works perfectly.

But, it currently lives inside the fingerprint task. This might not be ideal because  that task would have to run a second time after the title sequence task has completed. 

The title sequence task is such a long running task, I thought it was best to not bog it down at the end with a bunch of database clean up.

 

What do you guys think? 

I'm a bit lost on how the process and logic works.... however i think that once the chromaprint and identification process is complete, then it will ignore that episode for future scans??? And only process new episodes that are added.  So the initial hit to scan all Shows, seasons and episodes is a one off slog, which makes for a better user experience.  

Have the scan & clean ups run at 2am as a scheduled task.

Quote

 

This is a good idea. I'll see if we can create a method using virtual items, and missing items to decide is the season is complete.

I think you are right. Making a request and then look specifically for 'IsMissing' items, would tell us that the season is not a complete season.

Very nice! 😉

I surprise myself sometimes!!! Darn that's my one good idea for the whole year used now..... lol :D

Edited by Cheesegeezer
typo
Link to comment
Share on other sites

Cheesegeezer
2 minutes ago, rbjtech said:

The 'hurt' period for this is the initial scan for those with large libraries, I don't see this being an issue at all once that is complete.

Great Minds

Link to comment
Share on other sites

Ugh,

In the Swagger, I can add the 'IsMissing' parama to the url and receive only items that are missing.

However, I can't find it for the 'InternalItemQuery', it doesn't have an 'IsMissing' flag.

Edited by chef
Link to comment
Share on other sites

Cheesegeezer

it used to be in there but looks like they have removed it and moved it from there to BaseItemDto.

Let me check, i dont even this it's in BaseItem.

Link to comment
Share on other sites

What about this:

        private bool IsComplete(BaseItem season)
        {
            var episodeQuery = LibraryManager.GetItemsResult(new InternalItemsQuery()
            { 
                Parent = season,
                IsVirtualItem = true,
                IncludeItemTypes = new[] { "Episode" },
                Recursive = true                
            });

            if(episodeQuery.Items.Any(item => item.IsVirtualItem || item.IsUnaired)) { return false; }

            return true;
        }

 

Link to comment
Share on other sites

rbjtech

If 'isMissing' is being problematic - then could you maybe use 'LocationTypes=Virtual' as this denotes a missing item ?

curl -X GET "http://emby.rbjtech.lan:8096/emby/Items?LocationTypes=Virtual&Ids=590692&api_key=*" -H "accept: application/json"

This returns record, as that episode is missing, it returns nothing if the episode is there.

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

2.0.2.5

  •  No longer request all data from the database at once. Instead, we query only the data we need per season.
  • Fingerprint data is removed from seasons that have  a 'complete' profile of title sequence data.

         Complete sequence profiles are calculated when all episodes have:  title sequence data, or are 'confirmed' by the user

  • The database is cleaned on the second run of the fingerprinting task.

IntroSkip_v2.0.2.5.zip

 

TODO:

  • give Cheese the source
  • create a specific table query for the 'GetEpisodeTitleSequence' endpoint

 

After the tasks complete, it would be interesting to know if the UI loads faster with the new table queries. I think it does.

  • Like 2
Link to comment
Share on other sites

BillOatman
1 minute ago, chef said:

TODO:

  • give Cheese the source

Not in Git anymore? Too many prying eyes wanting to release before Emby did? :)

  • Like 2
Link to comment
Share on other sites

Cheesegeezer
2 minutes ago, chef said:

2.0.2.5

  •  No longer request all data from the database at once. Instead, we query only the data we need per season.
  • Fingerprint data is removed from seasons that have  a 'complete' profile of title sequence data.

         Complete sequence profiles are calculated when all episodes have:  title sequence data, or are 'confirmed' by the user

  • The database is cleaned on the second run of the fingerprinting task.

IntroSkip_v2.0.2.5.zip 43.55 kB · 0 downloads

 

TODO:

  • give Cheese the source
  • create a specific table query for the 'GetEpisodeTitleSequence' endpoint

 

After the tasks complete, it would be interesting to know if the UI loads faster with the new table queries. I think it does.

Great work Chef!! 

This made me laugh... in my head.... Give cheese some sauce lol :D

 

  • Haha 2
Link to comment
Share on other sites

Cheesegeezer

@chef are the admins going to create a way to use this?  Also a lot of shows have the "Previously on" intro.  so we should look at skipping the Intro End point in the core if a user has the skip intro option enabled.

@Luke  @ebr

are you guys looking to implement this feature in the playback options to skip intros.

Link to comment
Share on other sites

8 minutes ago, BillOatman said:

Not in Git anymore? Too many prying eyes wanting to release before Emby did? :)

I'll send it to you. 

Link to comment
Share on other sites

rbjtech

ok - so a quick run (yes I deleted the dB..) - Maybe I've got my wires crossed - but I though the new version was going to do the detection after each Season ?

I still have the Detect schedule ... err...

I'm confused .. (doesn't take much..)

Link to comment
Share on other sites

rbjtech
8 minutes ago, Cheesegeezer said:

@chef are the admins going to create a way to use this?  Also a lot of shows have the "Previously on" intro.  so we should look at skipping the Intro End point in the core if a user has the skip intro option enabled.

The complication here is many shows have the Intro throughout the show, not necessarily directly after the 'Previously' part - so if you skipped to the IntroEnd - you may miss a lot of the show.    The only known bit you can automatically skip (if desired) is in-between IntroStart and IntroEnd.

Link to comment
Share on other sites

Cheesegeezer
1 minute ago, rbjtech said:

The complication here is many shows have the Intro throughout the show, not necessarily directly after the 'Previously' part - so if you skipped to the IntroEnd - you may miss a lot of the show.    The only known bit you can automatically skip (if desired) is in-between IntroStart and IntroEnd.

like how do you mean?  you mean like 2 and a half men, where there is a lot of that "meeeeeen" stuff. I can't think of a show that repeats the intro half way thru.

Or am i just being dumb 

Link to comment
Share on other sites

rbjtech
1 minute ago, Cheesegeezer said:

like how do you mean?  you mean like 2 and a half men, where there is a lot of that "meeeeeen" stuff. I can't think of a show that repeats the intro half way thru.

Or am i just being dumb 

My bad - I worded it poorly - "The complication here is many shows start the Intro partially into the show"

So I may have -

 

2 mins of 'Previously'

10 mins of 'the episode starting'

2 mins of 'Intro'

40 mins of 'the rest of the episode'

 

in the next episode I have

 

2 mins of 'Previously'

5 mins of 'the episode starting'

2 mins of 'Intro'

45 mins of 'the rest of the episode'

 

So if I skipped to IntroEnd - yes I would skip Previously, but I would also skip 10 mins on the 1st episode and 5 minutes from the next etc.

 

  • Thanks 1
Link to comment
Share on other sites

Cheesegeezer
1 minute ago, rbjtech said:

My bad - I worded it poorly - "The complication here is many shows start the Intro partially into the show"

So I may have -

 

2 mins of 'Previously'

10 mins of 'the episode starting'

2 mins of 'Intro'

40 mins of 'the rest of the episode'

 

in the next episode I have

 

2 mins of 'Previously'

5 mins of 'the episode starting'

2 mins of 'Intro'

45 mins of 'the rest of the episode'

 

So if I skipped to IntroEnd - yes I would skip Previously, but I would also skip 10 mins on the 1st episode and 5 minutes from the next etc.

 

Gotchya... yep... so we need a identification marker for when Intro starts playing, which triggers that netflix style button,  which appears in the player..... that says skip intro!!

 

  • Agree 2
Link to comment
Share on other sites

rbjtech
1 minute ago, Cheesegeezer said:

Gotchya... yep... so we need a identification marker for when Intro starts playing, which triggers that netflix style button,  which appears in the player..... that says skip intro!!

 

Either manually or Automatically, but of course that needs server and likely client code changes.

Initial thoughts were to add it into the existing episode 'chapters' list - as now that is a function in most clients, it's only a couple of clicks away to jump to the 'IntroEnd' chapter point .. 

Link to comment
Share on other sites

Cheesegeezer
10 minutes ago, rbjtech said:

Either manually or Automatically, but of course that needs server and likely client code changes.

Initial thoughts were to add it into the existing episode 'chapters' list - as now that is a function in most clients, it's only a couple of clicks away to jump to the 'IntroEnd' chapter point .. 

All the clients are driven from one source now and passed thru electron depending on what device they are on.  So this would be a fairly straightforward process to implement to all clients.

The player just needs to watch for a Intro Start Chapter tag from chapters(as you suggest) and then show the button until the intro end chapter tag has passed.

But if you plan on backing out then clicking the chapter for intro end, it's probably quicker to just hit skip on the remote 2 or 3 times and watch the last 10 secs of an intro.

Really need the admins on board for this to work and be a polished feature.  I mean @chef has done all the heavy lifting and hard work here for them.

Edited by Cheesegeezer
  • Agree 1
Link to comment
Share on other sites

30 minutes ago, rbjtech said:

ok - so a quick run (yes I deleted the dB..) - Maybe I've got my wires crossed - but I though the new version was going to do the detection after each Season ?

I still have the Detect schedule ... err...

I'm confused .. (doesn't take much..)

 

That might be difficult with the tasks split.

Let me see what it would look like to have a master task. 

It probably wouldn't  be much faster, but it would keep our file size in check for sure.

I'll get back to you.

  • Thanks 1
Link to comment
Share on other sites

rbjtech
7 minutes ago, Cheesegeezer said:

But if you plan on backing out then clicking the chapter for intro end, it's probably quicker to just hit skip on the remote 2 or 3 times and watch the last 10 secs of an intro.

Really need the admins on board for this to work and be a polished feature.  I mean @chef has done all the heavy lifting and hard work here for them.

Playing hit the 'IntroEnd' is always fun on the remote.  It would need to be a single click or two at most to be useful I agree entirely.  Maybe add as a 'Skip Intro' on the new enhanced UI - that would be two button presses.

si.PNG.cd319713aa45f57bb2c018ba38c0d7a0.PNG

Edited by rbjtech
Link to comment
Share on other sites

Cheesegeezer
2 minutes ago, rbjtech said:

Playing hit the 'IntroEnd' is always fun on the remote.  It would need to be a single click or two at most to be useful I agree entirely.  Maybe add as a 'Skip Intro' on the new enhanced UI - that would be two button presses.

si.PNG.cd319713aa45f57bb2c018ba38c0d7a0.PNG

well you could have the button appear on the eUI and auto focus on it. Same as the play/pause button is the autofocus when pulling up the eUI.

  • Like 1
Link to comment
Share on other sites

Cheesegeezer

Very crude mockup but not have any of the interface show, just the button by itself.  (by the way before you get confused, it's a screen capture video i use for testing plugins on my work/code laptop, just have it set up as Avengers in the metadata) 

 

image.thumb.png.56a4d626a0afc9c7fdada035dc42f6a8.png

Edited by Cheesegeezer
  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...