1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sort Now Playing in TiVo GUI

Discussion in 'TiVo Series 1 - UK' started by mikerr, Sep 23, 2007.

  1. Sep 23, 2007 #1 of 260
    mikerr

    mikerr TiVoCentral.co.uk

    2,598
    0
    Jun 2, 2005
    Up North
    Sort now playing list on tivo GUI
    +folders

    Version 0.61

    Now you can:
    sort your programmes alphabetically, grouped by series
    sort by duration (longer shows/films to the bottom)

    add episode titles/film years to the now-playing list youtube video
    restore / undelete deleted programmes youtube video

    Screenshots: Normal, With episode titles added, and A-Z sorted
    [​IMG][​IMG][​IMG]

    Added a quick video on youtube: [media]http://www.youtube.com/watch?v=x3rHtLfYrZU[/media]

    Requirements:
    Make sure you have newtext2osd (included) installed in /var/hack/bin

    Usage:

    Run the script and enter now-playing on tivo.

    Special Remote Keys:

    Pause
    - when on a folder, expands that folder
    - when on a normal show, will make a folder for that show

    Replay
    - sorts the list alphabetically

    Skip
    -sorts the list by date

    Thumbs Up / Down
    -navigates to the top / bottom of the now playing list

    Menus

    Pressing (0) on the remote brings up a menu.

    (1) Sort alphabetically (A-Z)
    (2) Sort by Duration (i.e longer shows/films at the bottom)
    (3) Sort by Date (as normal)

    All these options make tivo switch to tivo-central,
    and then auto-returns to now-playing with the list sorted several seconds later (be patient!)

    (4) Add /remove episode titles

    This one changes titles to include the episode title, and adds the year to films
    e.g. Friends => Friends: The one with the Fish
    Jaws => Jaws (1975)
    Top Gear => Top Gear: The Aston Martin DB9


    (4) Make Folders

    Groups shows into folders
    [​IMG][​IMG]
    [​IMG]

    (5) Expands the folders back out again to normal.

    Selecting a folder, then pressing pause to expand it will
    show just episodes of that series at the top of now-playing.

    [​IMG]
    Pressing (8) kills the program.



    -help: list options
    -addtitles: add episode titles
    -addeps: enable background adding of episode titles
    -deltitles: remove episode titles

    -sortdate: Sort by Date (normal tivo view)
    -sortaz: Sort alphabetically
    -sortza: Sort reverse alphabetically

    -nogui: exit script immediately after doing above actions

    The above command line actions happen at startup only, and the GUI stays on unless you specify the -nogui option.

    To use any of the folder functionality, you must have run
    ./fixmwstate.tcl
    and then rebooted once. Otherwise you'll get mwstate errors when using individual folders.

    Normally you'll just run it with no options,

    ./sortnp.tcl

    or put the following in rc.sysinit.author:

    /var/hack/sortnp.tcl >/dev/null &

    # Version 0.61
    #
    # 0.58
    # white progress bar instead of percentages
    # stops it getting confused if you change screen while sorting
    # changed code for jump to top/bottom of NPL to use bonks(!)
    # 0.56
    # Remote shortcut keys, much faster folder operation.
    # programmes in folders now show episode info (see screenshot)
    # 0.53
    # minor bugfixes, process priority, to fix some stuttering issues.
    #0.52
    # - changed single folder creation/expansion from buttons 1/2 to pause key
    # 0.48
    # - added transactionholdoff - speeds up all operations
    # 0.47
    # bugfixes: sometimes showed 0.00 as duration
    # 0.46
    # - added sort by duration (mainly for films)
    #- thumbs up/down to go to top/bottom of nowplaying
    # - background adding of episode titles
    # - progress when sorting
     

    Attached Files:

  2. Sep 24, 2007 #2 of 260
    martink0646

    martink0646 New Member

    545
    0
    Feb 8, 2005
    Wisbech
    Mike,

    Many thanks, this is great. Works a treat apart from the episode title function. I haven't had long to play with it so I might be doing something wrong, but the A-Z is fantastic.

    EDIT: It does work. I'm not sure what I did but I went back after posting & there it was with episode names. Brilliant module.

    You are really coming up with the goods as far a really useful modules are concerned. Any teasers as whats next?

    Martin
     
  3. Sep 24, 2007 #3 of 260
    mikerr

    mikerr TiVoCentral.co.uk

    2,598
    0
    Jun 2, 2005
    Up North
    Tivo takes a while to show them up the first time for some reason,
    if you do an A-Z sort immedately afterwards it shows quicker.
    A caching issue I think.

    Folders & searching are 70% done - working but flaky ;) ;) :)
     
  4. Sep 24, 2007 #4 of 260
    martink0646

    martink0646 New Member

    545
    0
    Feb 8, 2005
    Wisbech
    Folders!!!??!! I can't wait!

    Martin
     
  5. Sep 24, 2007 #5 of 260
    RichardJH

    RichardJH New Member

    1,195
    0
    Oct 7, 2002
    Hanworth....
    A brilliant update to our old S1 units. Works much quicker than expected on a large NP list.
    I tried the option 4 (add episode titles) which worked but slow however you say that doing it again would remove episode titles but I cannot get it to remove them although it does run.
    Not sure that I would want to use add episode titles as you cannot usually read all of the text in Now Playing because it gets cut off and so many programmes don't have episode titles. However that is nothing to do with your great work Thanks again.
     
  6. Sep 24, 2007 #6 of 260
    martink0646

    martink0646 New Member

    545
    0
    Feb 8, 2005
    Wisbech
    Hi Mike,

    One minor issue. There seems to be a problem running this & your great mp3 app as they both require 0 to be pressed. Is it possible to change one of them to 9? Can a complete layman do it from looking at the code?

    Cheers,

    Martin
     
  7. Sep 24, 2007 #7 of 260
    martink0646

    martink0646 New Member

    545
    0
    Feb 8, 2005
    Wisbech
    Hi,

    I have had a look at the code & whilst I don't really understand any of it I have pulled out a bit that looks like the key press 0 to get the menu up

    binary scan $EventData II data Serial
    if { $type == $TmkEvent::EVT_REMOTEEVENT && $subtype == 0 && $CurrentContext == 7} {


    Am I right in thinking that if i changed that to 9 both apps could run or will the 1,2,3 & 4 key presses interfere with each other. If they do I assume that they could be changed to 1,2,3,4 & 9 for npsort.tcl - 5,6,7 & 0 for mp3.tcl - with 8 exiting both. Am I going down the right path? Let me know before I waste too much time or tell me if I'm talking complete b******s.

    Cheers

    Martin
     
  8. Sep 24, 2007 #8 of 260
    RichardJH

    RichardJH New Member

    1,195
    0
    Oct 7, 2002
    Hanworth....
    Not sure if it is relevant but when I run sortnp.tcl in a telnet window I get the following
    The sort still works Ok from the Tivo GUI
     
  9. Sep 24, 2007 #9 of 260
    mikerr

    mikerr TiVoCentral.co.uk

    2,598
    0
    Jun 2, 2005
    Up North
    errTmbackgoundHoldoff is nothing to worry about, it just means tivo is using the database at the same time - i.e sort might be a bit slower.
    You'll get alot of them if you try viewing now-playing as the sort takes place (and the sort will take 10x longer)

    martin: No, the keypresses are these bits:
    Code:
    if { $data == $::evrc(0) }  # 0 Pressed
    Just changing the keys won't work well though, the proper way for them to co-exist is to add some code to the menu systems, which I'll do tonight.
     
  10. Sep 24, 2007 #10 of 260
    jonphil

    jonphil New Member

    524
    0
    Aug 7, 2002
    Derbyshire, UK
    Any chance someone could give a step by step guide to installing this and the other files needed.
    Really would love to try it.

    Cheers
     
  11. Sep 24, 2007 #11 of 260
    martink0646

    martink0646 New Member

    545
    0
    Feb 8, 2005
    Wisbech
    Hi jonphil,

    Ok here goes. If any of this is wrong somene will pop up & set me/you straight.

    1) Unzip files (sortnp.tcl & fixmwstate.tcl) onto your desktop
    2) ftp files to var/hack on your TiVo
    3) telnet in to TiVo from a DOS prompt
    4) Change directory: cd /var/hack
    5) Run fixstate: ./fixmwstate.tcl
    6) Set permissions: chmod 755 *
    7) Run the file: ./sortnp.tcl
    8) Done.

    That's the way I work. In the permissions line the * I assume gives permission for all files. I have no idea whether or not that is the right way to do it but it works for me. If it's wrong or worse still dangerous, I hope someone will let me know.

    Martin
     
  12. Sep 24, 2007 #12 of 260
    jonphil

    jonphil New Member

    524
    0
    Aug 7, 2002
    Derbyshire, UK
    I'll give that a go, but it was more the other things.I have downloaded the newtext2 thing and I'm not sure what that does or what I need to install it?
     
  13. Sep 24, 2007 #13 of 260
    mikerr

    mikerr TiVoCentral.co.uk

    2,598
    0
    Jun 2, 2005
    Up North
    If you're running both this and my mp3 app, you'll need to download both of them again, as I've fixed both so they co-exist now. (No new features - but the mp3 player has changed to using key 7 to start/stop)

    [edit] The option (4) episode-titles now shows up in the list immedately
     
  14. Sep 24, 2007 #14 of 260
    RichardJH

    RichardJH New Member

    1,195
    0
    Oct 7, 2002
    Hanworth....
    Mike is it worth starting sortnp from sysinit.author so that it starts automatically on a reboot and does it need backgrounding with the /dev/null 2>&1 & at the end of the command line
     
  15. Sep 24, 2007 #15 of 260
    mikerr

    mikerr TiVoCentral.co.uk

    2,598
    0
    Jun 2, 2005
    Up North
    Yes it does need backgrounding:

    add this at the end of rc.sysinit.author:
    Code:
    /var/hack/sortnp.tcl > /dev/null &
     
  16. Sep 24, 2007 #16 of 260
    Pete77

    Pete77 New Member

    7,968
    0
    Aug 1, 2006
    Not Far...
    This is a great add on module Mike and one that puts you in very select company by actually significantly modifying the Tivo UI itself. Not of course that we should ever forget those other two very significant previous enhancements to that interface - namely autospace.tvl and aerialplug's extensive efforts to allow us to display logos for all the channels we receive.

    As you indicated in your description the first time that one selects the episode titles option it doesn't work but reverting to normal sort order by date from A-Z then adds them and they remain on screen thereafter, even when sorted back to A-Z. Of course having episode titles becomes in a way all the more indispensible once you have sorted a long multi-episode series by program name.

    By the way I should point that your module is coping with absolutely no issues in doing all this for my Now Playing list of around 600 items.

    So the main remaining requests for further possible enhancement are as follows:-

    1) Is there any way to make the inclusion of episode titles happen by default when the module is booted through rc.sysinit.author or rc.sysinit.author.edit It seems pretty likely that many of us will want to have episode titles included at all times, whereas most of us will continue to sort by date for most Tivo use and then only just occasionally sort by program name in some situations.

    2) Also is there any way to change the size of the font used by Tivo for program names and dates so that more of each episode name will be visible on screen?

    This is already a fantastic module Mike and my last 2 suggestions are made only to see if they are even actually achievable without unreasonable and vastly disproportionate additional effort on your part.
     
  17. Sep 24, 2007 #17 of 260
    mikerr

    mikerr TiVoCentral.co.uk

    2,598
    0
    Jun 2, 2005
    Up North
    How long does it take? under 20 seconds?

    It would make more sense and easy enough to spin that part off into another app, then it could run in the background every 30minutes updating the titles of new recordings as they are recorded....

    I've seen hacks to do this, but none worked with our 2.5.5 version.

    [edit] found one that worked on UK tivos, see post 74
     
  18. Sep 24, 2007 #18 of 260
    Pete77

    Pete77 New Member

    7,968
    0
    Aug 1, 2006
    Not Far...
    I have discovered a bug with program dates in Now Playing becoming inaccurate using Sort by Name - at least on my 600+ item Now Playing Tivo. Adding Episode titles but sorted conventionally by recording date does not seem to cause this problem to occur.

    For instance sorted by program name the new episode of Captain Scarlet (Best of Enemies) screened today (24th September) on CITV at 7.15am appears in the alphabetic A-Z Now Playing list of programs with the screening date of 14th June. Yet an episode of Destination Dakar broadcast on 4th January at 11.30pm is shown in the list of episodes by date in Now Playing as having a recording date of 16th December, a smaller discrepancy than the error for Captain Scarlet. While episodes of This Life broadcast between 24th November and 6th December have now changed to have dates beteween 27th November and 6th January in the Now Playing list. There seems to be no discernible pattern to the amount by which the recording dates in the Now Playing list sorted by date are incorrect. Around 12 episodes of Top Gear recording on numerous different Sundays have all changed to show 17th August in the Now Plating List sorted by Program Title.

    So is it just the length of my Now Playing list causing this problem or is it more widespread?

    More like 2 minutes+ to sort by name. But then normal wait time of 0 to about 10 seconds for the Now Playing list is restored thereafter but with the info now sorted by name instead of date.
     
  19. Sep 25, 2007 #19 of 260
    mikerr

    mikerr TiVoCentral.co.uk

    2,598
    0
    Jun 2, 2005
    Up North
    All the recording dates on the now playing list are faked during sort by name
    thats how the name sorting works, as tivo itself can only sort by date.

    The real correct date should always be shown on the program synopsis page,
    and of course in sort by date.

    E.g.
    Now playing list:

    Commando Sun 11/3
    Captain Scarlet Sun 12/3

    Program screen:

    Commando Tue 24/9 9:00 pm 134

    Is this what you mean?
     
  20. Sep 25, 2007 #20 of 260
    RichardJH

    RichardJH New Member

    1,195
    0
    Oct 7, 2002
    Hanworth....
    Just as Pete did I found that when sorted by A-Z a series would all show the same date but the main info page for that programme would show correct dates. Glad that it isn't a bug and that you were aware of it.

    A brilliant add on keep up the good work.
     

Share This Page