epg-FilmAndSeries - Show NEW Films & Series

fjk3489tb

Member
Don't have time to trawl through TV listing papers to find new series I might be interested in or films I haven't seen so I wrote a plugin to help.

I've made a web-if plugin that will show Films or series that haven't been marked as seen before (ignored).

Uses the Event CRID & Series CRID for new occurrences.

It's packaged as epg-FilmAndSeries and uploaded to ge.tt, it can be downloaded from this link:
Download to the box and install using opkg, ie:
humax# opkg install epg-FilmAndSeries_0.7_mipsel.opk
Installing epg-FilmAndSeries (0.7) to root...
Configuring epg-FilmAndSeries.

Give it a try and let me know how it goes. Currently it's not on the home page and is only available when you are in one of the sub menu's:


Selecting Films just shows the new and not ignored ones:

I've started on a settings dialogue. There's a few things you'll probably want to do with the ignore lists(s), eg:
  • ignore the ignore list (make backup copy) allowing to search all the series / films
  • recover the previous ignore list
  • completely delete the ignore list (ignore then delete!
I've made a start, just need to put the code behind the gui. Here's a proposed settings panel:

 

Attachments

  • menu.png
    menu.png
    69.8 KB · Views: 77
Last edited:

af123

Administrator
Staff member
Looks interesting and it might be possible to incorporate something like this into the web interface if enough people want it (given the lack of responses, maybe not? Let's see what pushing it back to the top of the topic list does.)

A couple of comments:

- If you put all of this into a plugin you can make it upgrade safe such that you don't need to manually edit the toolbar.jim file. That would just involve putting all of the files into a dedicated directory under /mod/webif/plugin/<whatever> and putting your 'tb' lines into a file in there called toolbar.hook. It could then be packaged for anyone who wants to give it a go.

- You can speed up your perl scripts by using the -T argument to the epg utility to filter on content type.
just use: exec epg -T1 json | perl ... for films.
(taking this further, you could just use the Jim EPG class to fetch a list of films directly (set films [epg fetch -type 1]) then iterate that to produce your HTML.)

- I'm afraid this will need updating slightly to be compatible with the new version of the epg command I just released. The JSON label content_type has become content_code and the plain text content is now content_type.
 
OP
F

fjk3489tb

Member
Looks interesting and it might be possible to incorporate something like this into the web interface if enough people want it (given the lack of responses, maybe not? Let's see what pushing it back to the top of the topic list does.)

A couple of comments:

- If you put all of this into a plugin you can make it upgrade safe such that you don't need to manually edit the toolbar.jim file. That would just involve putting all of the files into a dedicated directory under /mod/webif/plugin/<whatever> and putting your 'tb' lines into a file in there called toolbar.hook. It could then be packaged for anyone who wants to give it a go.

- You can speed up your perl scripts by using the -T argument to the epg utility to filter on content type.
just use: exec epg -T1 json | perl ... for films.
(taking this further, you could just use the Jim EPG class to fetch a list of films directly (set films [epg fetch -type 1]) then iterate that to produce your HTML.)

- I'm afraid this will need updating slightly to be compatible with the new version of the epg command I just released. The JSON label content_type has become content_code and the plain text content is now content_type.

I did try using "epg -T0 -T1 json" but it doesn't work although the help implies you should be able to use multiple -T options but what i found is they are effectively and'd and so no output.
epg help states: Filters : (can be specified multiple times, all must be true)

Ah just read all must be true !

Anyway I used the crude filter to figure out what I wasn't interested in, there's some programs with type > 10

How about an epg option to exclude types ?, eg epg -I2 -I3 -I4 to ignore types 2,3 & 4 ?

I've added multiple calls to epg now and concatenated in jim, ie:

set services [split [exec epg -T0 json | perl /mod/bin/sp_parse_epg]]
set services1 [split [exec epg -T1 json | perl /mod/bin/sp_parse_epg]]
append services $services1
 
OP
F

fjk3489tb

Member
I'm guessing people haven't really understood the capability and perhaps without a packaged module haven't given it a try.

Screen shot attached:Untitled.png
 

Attachments

  • Untitled.png
    Untitled.png
    142.8 KB · Views: 13
OP
F

fjk3489tb

Member
Click on the event Id to schedule recording and click the slider to ignore this film in future.

Same goes for series, I'm looking for new series I haven't seen, I've either recorded or not bothered and don't want to trawl through the hundreds of events manually.
 
OP
F

fjk3489tb

Member
There are some notes on creating a CFW package on the WiKi HERE, the file could then be posted to a file server such as http://ge.tt so that users could try it out

Well I've renamed all the files, moved them about a bit and packaged it up as epg-FilmAndSeries and uploaded to ge.tt, it can be downloaded from this link:
Download to the box and install using opkg, ie:
humax# opkg install epg-FilmAndSeries_0.7_mipsel.opk
Installing epg-FilmAndSeries (0.7) to root...
Configuring epg-FilmAndSeries.​

Give it a try and let me know how it goes.
 

hairy_mutley

Active Member
As a new install, it actually brings in a few more packages...

Code:
humax# opkg install epg-FilmAndSeries_0.7_mipsel.opk
Installing epg-FilmAndSeries (0.7) to root...
Installing perl (5.10.0) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/perl_5.10.0_mipsel.opk.
Installing libdb (4.2.52) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/libdb_4.2.52_mipsel.opk.
Installing gdbm (1.8.3) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/gdbm_1.8.3_mipsel.opk.
Installing libfcntl64 (1.0.0) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/libfcntl64_1.0.0_mipsel.opk.
Configuring libdb.
Configuring gdbm.
Configuring libfcntl64.
Configuring perl.
Configuring epg-FilmAndSeries.
which on my slow internet connection (rural, over-contended 8M), took a couple of minutes.

If you go to the "front-page", there is no evidence of the new packages, but if you navigate to any of the other pages, the Film and Series appear in the top-bar drop-down.

Looks like I now need to go through the new pages to filter 7 days worth of new stuff... I will see how it goes from there.
One thing that I could say is slightly annoying is that while you can go through flipping entries to ignore as fast as you want, the appearance of what I assume must be a progress bar at the top as it actions the change, means that the entries shift up and down as it appears and disappears. It would probably be better if it were always present so that the table does not move.

Still... nice start, I will see how it goes.
 

hairy_mutley

Active Member
Just tried clicking on one of the CRIDs. It brings up a search CRID:/E1157693 (for Dark Storm, Movie Mix, Tue Jan 13 19:10:00 2015 GMT)
unfortunately, that search doesn't find the film.
However, I have just tried it on a couple of others and they work... so the problem may lay outside your package.
Interesting... if I search for Dark Storm and bring up its programme information, it does not list a CRID for it at all.

Just found another "Mr Blandings Builds His Dream..." and "Mussolini And I". For these, searching the EPG for the CRID fails to find anything, but searching for the title fails as well.
Looking on the RS portal, it appears that these are on movies4men, which I do not have in my favourites.
So, maybe
- your table should show the channel
- you should have an option to search all channels, or only those in the active EPG channels.
It might also be useful to have an option at the top of the page to allow all ignored entries to be shown (in case you want to un-ignore something)?

Sorry, don't mean to appear critical... just constructive feedback, I hope.
 
OP
F

fjk3489tb

Member
Just tried clicking on one of the CRIDs. It brings up a search CRID:/E1157693 (for Dark Storm, Movie Mix, Tue Jan 13 19:10:00 2015 GMT)
unfortunately, that search doesn't find the film.
However, I have just tried it on a couple of others and they work... so the problem may lay outside your package.
Interesting... if I search for Dark Storm and bring up its programme information, it does not list a CRID for it at all.

Just found another "Mr Blandings Builds His Dream..." and "Mussolini And I". For these, searching the EPG for the CRID fails to find anything, but searching for the title fails as well.
Looking on the RS portal, it appears that these are on movies4men, which I do not have in my favourites.
So, maybe
- your table should show the channel
- you should have an option to search all channels, or only those in the active EPG channels.
It might also be useful to have an option at the top of the page to allow all ignored entries to be shown (in case you want to un-ignore something)?

Sorry, don't mean to appear critical... just constructive feedback, I hope.

I'm using the epg utility to extract the series & event CRID in json format, so typical example is like:

Code:
"3567": {
      "start": 1421614800,
      "end": 1421624400,
      "duration": 9600,
      "name": "Van Helsing",
      "text": "(2004) Horror action-adventure. The Vatican's star monster-hunter (Hugh Jackman) is sent to Transylvania to help a princess (Kate Beckinsale) fight Dracula (Richard Roxburgh). Violence.  ",
      "warning": "May contain content unsuitable for some viewers",
      "guidance_type": "0",
      "guidance_mode": "1",
      "content_code": "1",
      "content_type": "Film/Drama",
      "event_crid": "/55628/001"
    },

If the events have series CRID then I'm treating as series otherwise films. I also suspect there's some issues with the data but I get it from the epg tool.

I'll look at making improvements but it's a start. To reset the filters just need to remove the files:
/mod/var/epg-FilmAndSeries/Film.epg
/mod/var/epg-FilmAndSeries/Series.epg
I'll look at adding a button or perhaps in the settings ?

I think there's more info in the epg than the command tool is providing.
 
Last edited:
OP
F

fjk3489tb

Member
It might also be useful to have an option at the top of the page to allow all ignored entries to be shown (in case you want to un-ignore something)?

I've started on a settings dialogue. There's a few things you'll probably want to do with the ignore lists(s), eg:
  • ignore the ignore list (make backup copy) allowing to search all the series / films
  • recover the previous ignore list
  • completely delete the ignore list (ignore then delete!
I've made a start, just need to put the code behind the gui. Here's a proposed settings panel:
settings.png
 

Black Hole

May contain traces of nut
What, you mean like about Grocer's Apostrophies?

Wikis are about information with background discussion, but have little control over who is allowed to edit what (which is largely the point). The formatting allowed is too limited for my liking.

Because we have unlimited editing (of our own posts) and unlimited character count per post (used to be limited which is why some of my information posts are split up), a forum topic can be used as a "wiki" post (okay, the formatting is also limited, but I like the uniformity) by continually updating post 1 in the topic - then discussion can proceed in subsequent posts with an occasional alert when post 1 is significantly updated.

As I see it, a forum topic is more appropriate for a developing feature, because the author will be in control of the information (not subject to well-meaning but misinformed people editing the info willy-nilly), and a forum topic is a better place for debate than a wiki discussion page.

Once a project has matured, then it is time to transcribe it to the wiki, and the accumulated information in post 1 can go straight across.

Note that our wiki is primarily about the custom firmware and packages etc, so I specifically maintain information regarding unmodified HD/HDR-FOX as forum posts and not on the wiki (apart from which I would seek to lynch anyone who edited my prose).
 
OP
F

fjk3489tb

Member
One thing that I could say is slightly annoying is that while you can go through flipping entries to ignore as fast as you want, the appearance of what I assume must be a progress bar at the top as it actions the change, means that the entries shift up and down as it appears and disappears. It would probably be better if it were always present so that the table does not move.

1st plugin I've done and I'm not an experienced Jimsh or web-if hacker so if I want to do something new it takes a bit of time figuring out.
 

mihaid

Well-Known Member
Well I've renamed all the files, moved them about a bit and packaged it up as epg-FilmAndSeries and uploaded to ge.tt, it can be downloaded from this link:
Download to the box and install using opkg, ie:
humax# opkg install epg-FilmAndSeries_0.7_mipsel.opk
Installing epg-FilmAndSeries (0.7) to root...
Configuring epg-FilmAndSeries.​

Give it a try and let me know how it goes.
does the file not exist anymore?
wfopen no such file
 
Top