|
| Author |
Message |
burnside
Joined: 19 Jan 2009 Posts: 27
|
Posted: Sat Apr 04, 2009 11:44 pm Post subject: |
|
|
So is there anyway we can get sorting by name in the subfolders? I have my movies stored into folders in the root level as so:
A-B
C-D
E-H
...and so on
When I go into any of these folders, then the sorting is by date. I was in the E-H folder, looking for Eastern Promises and could not find it, but then realized it was one of the first DVDs I ripped when I installed pyTivo. Sure enough, at the bottom of the folder was Eastern Promises. It's just a pain to have to remember when you first ripped a DVD to know where it should show up in the sorting order for that folder.
What do you think? |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 1601
|
Posted: Sat Apr 04, 2009 11:53 pm Post subject: |
|
|
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. _________________ My pyTivo fork |
|
| Back to top |
|
 |
burnside
Joined: 19 Jan 2009 Posts: 27
|
Posted: Sat Apr 04, 2009 11:56 pm Post subject: |
|
|
| Man, thanks for your fast reply. So for that last option, could you explain it a bit more? |
|
| Back to top |
|
 |
burnside
Joined: 19 Jan 2009 Posts: 27
|
Posted: Sun Apr 05, 2009 12:22 am Post subject: |
|
|
| Wait, do you meant create shares for A-B, C-D, and so on? If so, would all those shares be on the root of the NPL or can I through those shares into a one share on the NPL? |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 1601
|
Posted: Sun Apr 05, 2009 12:43 am Post subject: |
|
|
No. I just mean:
[Movies]
type = video
path = /where/ev/er
sort = alpha
or something along those lines. Then that share would always be sorted alpha (the old pyTivo behavior). _________________ My pyTivo fork |
|
| Back to top |
|
 |
burnside
Joined: 19 Jan 2009 Posts: 27
|
Posted: Sun Apr 05, 2009 4:20 am Post subject: |
|
|
But that still wouldn't work for subfolders, right? This is what I have:
[Movie Server]
sort = alpha
type = video
path = D:\Videos\Movies
And it still does not sort the subfolders alpha. |
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 1420
|
Posted: Sun Apr 05, 2009 4:39 am Post subject: |
|
|
| Umm, wmcbrine is talking about possibly adding that option in the future. The code to do that currently doesn't exist so adding it to your conf will NOT work. |
|
| Back to top |
|
 |
burnside
Joined: 19 Jan 2009 Posts: 27
|
Posted: Sun Apr 05, 2009 4:59 am Post subject: |
|
|
| Oops... sorry bout that. I do like that option though! |
|
| Back to top |
|
 |
rjmitche
Joined: 05 Jan 2008 Posts: 47
|
Posted: Sat Apr 11, 2009 3:57 pm Post subject: |
|
|
I'll register another vote for doing something that allows sort to be alphabetic in subfolders (the per-share setting may be the best compromise). Most of my shares/subfolders contain movies and sorting by date doesn't make a lot of sense for movies.
I've resisted updating pyTivo since the sort was changed but, I'm getting tempted by some of the later mods.... |
|
| Back to top |
|
 |
Tekniqal
Joined: 11 Apr 2009 Posts: 4
|
Posted: Sat Apr 11, 2009 10:25 pm Post subject: |
|
|
| I am sorry if I missed it in one of the pages above but has anyone noticed that when you sort by name it puts all the capitalized titles first and then starts over with lower case. Really annoying to say the least. Lets say I have Lost.S05E12 and then lost.s05e10 they will be in completely different places in the list. Folders do the same thing so Las Vegas Season 1 is in a completely different place than las vegas season 2. |
|
| Back to top |
|
 |
ebf
Joined: 22 Mar 2008 Posts: 133
|
Posted: Sun Apr 19, 2009 5:54 pm Post subject: |
|
|
| Can someone remind me how to revert to the original name sort in all share folders? I just upgraded my install and overwrote my modified plugin.py file. |
|
| Back to top |
|
 |
choekstr

Joined: 06 Dec 2008 Posts: 152
|
Posted: Sun Apr 19, 2009 6:55 pm Post subject: |
|
|
| Either hit enter and choose alphabetical sort or hit "1" for a hotkey toggle. |
|
| Back to top |
|
 |
ebf
Joined: 22 Mar 2008 Posts: 133
|
Posted: Sun Apr 19, 2009 7:22 pm Post subject: |
|
|
| ebf wrote: | Can someone remind me how to revert to the original name sort in all share folders? I just upgraded my install and overwrote my modified plugin.py file. |
I figured it out... Replace:
| Code: | def name_sort(x, y):
return cmp(x, y)
def date_sort(x, y):
return cmp(os.stat(y).st_mtime, os.stat(x).st_mtime)
if query.get('SortOrder', ['Normal'])[0] == 'Random':
seed = query.get('RandomSeed', ['1'])[0]
self.random_lock.acquire()
random.seed(seed)
random.shuffle(files)
self.random_lock.release()
elif query.get('SortOrder', ['Normal'])[0] == '!CaptureDate':
files.sort(date_sort)
else:
files.sort(dir_sort) |
With:
| Code: | def name_sort(x, y):
return cmp(x, y)
if query.get('SortOrder',['Normal'])[0] == 'Random':
seed = query.get('RandomSeed', ['1'])[0]
self.random_lock.acquire()
random.seed(seed)
random.shuffle(files)
self.random_lock.release()
else:
files.sort(dir_sort) | [/code] |
|
| Back to top |
|
 |
ebf
Joined: 22 Mar 2008 Posts: 133
|
Posted: Sun Apr 19, 2009 7:45 pm Post subject: |
|
|
| choekstr wrote: | Either hit enter and choose alphabetical sort or hit "1" for a hotkey toggle. |
Since the date sort method cannot be controlled in subfolders, I wanted to go back to the original, always alpha method. |
|
| Back to top |
|
 |
KevinSartori
Joined: 08 Feb 2009 Posts: 27
|
Posted: Sun Apr 19, 2009 9:41 pm Post subject: |
|
|
Excellent tip, ebf! I've discovered that your method can be combined with danimal4326's tip (posted on Mon Mar 02, 2009 8:12 pm in this thread) to also ignore "The" when sorting.
For those who want both, open plugin.py with notepad or whatever and scroll to the bottom.
Replace:
| Code: | def name_sort(x, y):
return cmp(x, y)
def date_sort(x, y):
return cmp(os.stat(y).st_mtime, os.stat(x).st_mtime)
if query.get('SortOrder', ['Normal'])[0] == 'Random':
seed = query.get('RandomSeed', ['1'])[0]
self.random_lock.acquire()
random.seed(seed)
random.shuffle(files)
self.random_lock.release()
elif query.get('SortOrder', ['Normal'])[0] == '!CaptureDate':
files.sort(date_sort)
else:
files.sort(dir_sort) |
With:
| Code: | def name_sort(x, y):
(tmp,x) = os.path.split(x)
(tmp,y) = os.path.split(y)
if x.title().startswith('The '):
x = x.title().replace('The ', '')
if y.title().startswith('The '):
y = y.title().replace('The ', '')
return cmp(x, y)
if query.get('SortOrder', ['Normal'])[0] == 'Random':
seed = query.get('RandomSeed', ['1'])[0]
self.random_lock.acquire()
random.seed(seed)
random.shuffle(files)
self.random_lock.release()
else:
files.sort(dir_sort) |
To me, this is by far the most sensible method: sort both the folder names and their content alphabetically, while ignoring "The".
Thanks guys! |
|
| Back to top |
|
 |
|