 |
pyTivo Discussion Forum Answers and the development of pyTivo a TiVo transcoding server
|
|
| Author |
Message |
mikebridge
Joined: 29 Jan 2009 Posts: 3
|
Posted: Thu Jun 04, 2009 5:06 am Post subject: |
|
|
i'm entirely confused by what date its supposed to be sorting by (on windows at least) in sub folders, its not date created, its not date modified, its not original air date, it seems basically random
edit: nevermind, seems to be some sort of a list cache issue, after restarting pytivo, the files in the subfolders sort on modified date. |
|
| Back to top |
|
 |
Chew
Joined: 11 Feb 2008 Posts: 15
|
Posted: Thu Jun 04, 2009 4:08 pm Post subject: |
|
|
I have an issue that may be difficult to explain and is not exactly like what is being described here.
I have a Podcast folder in which contains a number of video podcasts and it displays date sorted.
I was using a build of wmcbrine's done prior to the sorting update discussed in this thread (sorry, can't remember the exact number). When iTunes updated a podcast, the podcast folder on my TiVo shows an updated date. This would cause anything new to pop to the top of the date sorted list. I would then have an easy way to know when something is new.
I've since tried a number of different builds since that time. Although the TiVo continues to show the folder in date order like I want, it's "stuck" with whatever date it showed before I updated to that new build. Now when a new podcast comes in, the folder still shows the old date.
I've gone back and forth between the build that worked and ones that don't: the old build does update the date properly when a new podcast comes out, but then the new build still reflects the old date when another new one comes out.
For example (and I'm making this up):
Geekbrief 570 05/30/09
Geekbrief 571 06/01/09
If I kept the old build, the TiVo Podcast folder would show the correct dates. If I were to update to a new build on, say 05/31/09, the folder would still show 05/30/09 after the 06/01/09 podcast came out.
Is this a setting I need to update to use a new build and continue to have the dates updated? Or is this just something changed in the coding? |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 1223
|
Posted: Thu Jun 04, 2009 11:11 pm Post subject: |
|
|
It's due to the caching, newly applied in the video plugin as of May 13th. If you go into the folder, you should see an up-to-date list. You can get the parent directory to update by restarting.
I'll try to find a way to get something close to what you're looking for without abandoning the cache. _________________ My pyTivo fork |
|
| Back to top |
|
 |
lrhorer
Joined: 04 Mar 2008 Posts: 88
|
Posted: Sat Jun 20, 2009 6:32 pm Post subject: |
|
|
| wmcbrine wrote: | The TiVo just doesn't offer (nor preserve) the sort options in the submenus. You'd either have to save some state information across requests (bad in many ways), always sort subfolders alpha (ugh), or else have a per-share config option to force alpha sorting. I'm reluctantly leaning towards the last, as perhaps the least of the available evils. |
Well, no doubt per-share sorting has some validity, but since my subfolders all have file names either like "1 Back to the Future", "2 Back to the future II", etc. if they are movies, or else "Wings S01 E07 ...", "Wings S07 E08...", etc. if it is a TV series, I never have any use for sorting by date.
Last edited by lrhorer on Sat Jun 20, 2009 8:12 pm; edited 1 time in total |
|
| Back to top |
|
 |
lrhorer
Joined: 04 Mar 2008 Posts: 88
|
Posted: Sat Jun 20, 2009 8:09 pm Post subject: |
|
|
| wmcbrine wrote: | OK, I've added an per-share option "force_alpha" -- set this to "True" to get the old pyTivo behavior. Video shares only. While I was changing things, I made the name sorting when not using force_alpha work more like it does on the TiVo, by not grouping folders and files separately. |
I'm a little ambivalent about this. Both methods have some merit, and one or the other may be more appropriate under different circumstances. I think overall, however, I prefer directories sorted by alpha at the top of the page. Actually, a really neat option would be directory metafiles, so I can name the directories one thing and have them sort one way, but have them show up differently on the TiVo. For example, I have a folder named Outer Limits in my main share, but it would be nice to have it show up as The Outer Limits on the TiVo. You could of course have the folder sort ignore leading articles, and I could then just name the folder The Outer Limits, but then the folder would show up in the "wrong" place on the server, and I don't want that, either. Folder metafiles would be perfect.
| wmcbrine wrote: | I acknowledge the wisdom of these comments:
| TheAmigo wrote: | If you do implement that (which I'd really appreciate), I have a couple requests:
1) Ignore leading articles. As others have posted on how to skip 'the ', but it should also ignore 'a ' and 'an '.
2) Don't sort based on filename, instead, sort by seriesTitle, episodeNumber, then title. |
However, that involves more work, so it will have to wait. I've put this off this long enough. |
1. On my system, the routine which automatically organizes the files also moves leading articles to the end of the program name, so this is moot for me. Not only that, but if it is a TV series, I preface the episode name with the Season and episode numbers, so a leading article or lack thereof in the episode title has no effect when sorting by filename.
2. This is the last thing I want. I have the file names embedded with sort information, so sorting by alpha on the file name results in a proper listing. None of the metafiles on my system have an episode number. Sorting by series title doesn't do anything for my main share, since all series are contained in their own folders. It would be helpful in my Genre share, however, which groups programs by genre and has no delineation for series groupings. Sorting by title, however, would almost never result in a proper sort. The Pirates of the Caribbean folder, for example, (and assuming leading articles are ignored) would look like:
| Code: | At World's End
The Curse of the Black Pearl
Dead Man's Chest |
Instead of the correct sort:
| Code: | The Curse of the Black Pearl
Dead Man's Chest
At World's End |
Thus, I would vote, "Yes", on sorting by series title, but, "No", to the other two. I don't know how much trouble it would be to allow several different sort filters, with the ability to turn each one on or off. In the best of worlds, the user could specify not only the filters, but the order in which they are applied. Something like:
| Code: | sort_01 = Series_Title
sort_02 = CIAlpha (Case Insensitive Alpha)
sort_03 = Date |
|
|
| Back to top |
|
 |
Chew
Joined: 11 Feb 2008 Posts: 15
|
Posted: Wed Jul 29, 2009 4:14 pm Post subject: |
|
|
| wmcbrine wrote: | It's due to the caching, newly applied in the video plugin as of May 13th. If you go into the folder, you should see an up-to-date list. You can get the parent directory to update by restarting.
I'll try to find a way to get something close to what you're looking for without abandoning the cache. |
I've checked a recent build (from the last day or two). My caching issue is still occuring.
Have you been able to find a way to handle this problem? |
|
| Back to top |
|
 |
Minckster
Joined: 02 Oct 2008 Posts: 56
|
Posted: Sat Aug 01, 2009 9:33 pm Post subject: |
|
|
When pyTivo sorts by file name, I'd like it to both ignore case and use dictionary sorting [i.e. ignore the (in)definite articles "a", "an" and "the" at the beginning of names]. Also, the characters ".", "_", and " " should all be able to delineate the (in)definite articles from the rest of the name.
For example, given the following file and folder names:
| Quote: | A_Separate_Peace.mpg
the.closer.s05e08.episode.name.avi
The World at War/ |
I'd like pyTivo to sort them as follows:
- The Closer
- A Separate Peace
- The World at War
but instead I get:
- A Separate Peace
- The World at War
- The Closer
I have an edit to plugin.py to effect the change. Starting at line 220:
| Code: | def name_sort(x, y):
return cmp(x.name, y.name) | becomes:
| Code: | # cat lists of lowercase (in)definite articles & delineation chars
articles = ["the", "an", "a"]
delineators = [" ", ".", "_"]
delineatedArticles = []
for article in articles:
for delineator in delineators:
delineatedArticles.append(article + delineator)
def name_sort(x, y):
# remove path and set to lower case
xydict = { 'xlc' : os.path.split(x.name)[1].lower(),
'ylc' : os.path.split(y.name)[1].lower() }
# strip any leading, delineated (in)definite-articles
for var, value in xydict.iteritems():
for delineatedArticle in delineatedArticles:
if value.startswith(delineatedArticle):
xydict[var] = value.split(delineatedArticle)[1]
continue
return cmp(xydict['xlc'], xydict['ylc']) |
The edit is working for me so far. (I also renamed name_sort() to dictionary_name_sort(), as a reminder that it does something funky, but didn't want to show all three edits.)
If asked, I should be able to extend the code to correctly sort file names that are similar to those in the following list. I have an AppleScript that works with such names, but have no reason to sort them within pyTivo.
- the.closer.s05e02••••.avi
- The_Closer_503••••.avi
- the closer 05x04••••.avi
- The Closer s05e05••••.avi
I'm using wmcbrine's branch dated "Sat, 1 Aug 2009 00:54:16." |
|
| Back to top |
|
 |
bonorden
Joined: 01 Oct 2009 Posts: 1
|
Posted: Thu Oct 01, 2009 7:36 pm Post subject: 3 options for Sorting |
|
|
There was lots of discussions about what is the best way to sort (personally, I like the things Tivo records sorted by Date and the items I tranfer via pytivo to be sorted by Alpha).
Others would like to have it left to Tivo and simply hit the 1 key to toggle (this doesn't help subfolders).
I don't know anything about programming, but it was mentioned that a potential solution was to:
[Movies]
type = video
path = /where/ev/er
sort = alpha (or date).
Can you have a third option of:
sort = alpha, date or tivo (which would basically leave it to how tivo normally operates...I'm assuming that leaving it blank would achieve the same result)
This way, everyone can have the flexibility of picking whatever is best for them.
Thanks,
Jeff |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 1223
|
Posted: Thu Oct 01, 2009 8:08 pm Post subject: |
|
|
It's been implemented for a while now, as "force_alpha", i.e. "force_alpha = True" if you want the old behavior. Otherwise it follows what the TiVo requests. I see no purpose to an option to force date-sorting. _________________ My pyTivo fork |
|
| Back to top |
|
 |
txporter
Joined: 11 Dec 2008 Posts: 123
|
Posted: Mon Dec 28, 2009 12:06 am Post subject: |
|
|
I just now started playing around with alphabetically sorting (not sure why it took me so long to look into it...). Anyhow, it seems to be sorting first by file type and then by the metadata. Is that intended?
For instance, I have 3 seasons of Boston Legal in one folder. Seasons 3-4 are .mp4 files while Season 5 is .mpg. Season 5 is sorted alphabetically first, and then Seasons 3-4 follow it alphabetically.
All of my shows are titled, Season Number Episode Number Title (example: 501-Smoke Signals). |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|