• 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 12
Add sort by date added on movies library mode?
#91
it's my today homework Smile *

kiboy6 Wrote:That's easy - if you refresh info for any particular movie, (and ignore locally stored info if prompted) that movie will got to the top of the "date added" list. Big Grin


Maybe a script using this kind of method have a better result...

As I said file mode has the correct "date added" sort so...

A script that refreshes all movie info by file mode recent sort (Backwards) order should do it... maybe slower but (maybe) with no errors.

cheers
PJGM

*EDIT: I already Tried with some movies and that isn't working either... I Think that may be a skin issue, because "Recent added" sort is different from file mode to library mode. (File mode is the correct way)
Image
Reply
#92
If you have your movies each one in its own folder note that:

- File mode orders your movies by modification date of the FOLDER.

- Library mode, using joemiller script, orders your collection by modification date (in windows the creation date is also an option) of the movie FILE.

Probably your script to overwrite modification date is not updating correctly the modification date of the movie FILE. Check that the files have the correct date.

I made my own script to change dates but it is for Mac OSX, joemiller script runs impecable.

Just an idea.
Reply
#93
carmatana Wrote:If you have your movies each one in its own folder note that:

- File mode orders your movies by modification date of the FOLDER.

- Library mode, using joemiller script, orders your collection by modification date (in windows the creation date is also an option) of the movie FILE.

Probably your script to overwrite modification date is not updating correctly the modification date of the movie FILE. Check that the files have the correct date.

I made my own script to change dates but it is for Mac OSX, joemiller script runs impecable.

Just an idea.

Yes, I have One movie per folder...

And I "just" want that sort "movies by modification date of the FOLDER" on my "library mode" if I choose "Recent added" type.

I don't want to sort movies by modification date of the FILE on "Library mode"

Cheers
PJGM
Image
Reply
#94
I guess you need another tool, for the moment joemiller uses the date of the file.

As said you can modify your script to pass the dates of the Folder to the video files inside them.

I was in your situation but after a second thought I found this solution better because the modification date of a folder can be changed whenever you modify a file inside (e.g. creating or deleting a nfo file or adding a jpg). But the modification date of a movie file (e.g. avi or mkv) cannot be changed so easily.

good luck.
Reply
#95
You are completely right !!

The mkv file date is fine for me as a "recent added" sort Smile

Problem is that I think that script isn't working like it should Sad

You said that sort option at settings must be "(Unix/Linux)" even on Windows 7 right?

That was the only option that I haven't used/tried ... Smile

EDIT: OK, good news, it worked Smile
Database "recent added" is now ok.

PJGM
Image
Reply
#96
pjgm Wrote:You said that sort option at settings must be "(Unix/Linux)" even on Windows 7 right?

PJGM

Note that my comment refers to Mac OS.

I am not sure about Windows. As far as I remember in Unix-like systems (linux or Mac) the only option that works is to use MODIFICATION Date (of the file) for the sorting.

While in Windows it seems that also the CREATION date can be used for the sorting. I recall having do some tests but as my main OS is Mac I did not experiment further with Windows.
Reply
#97
Yes my friend but it works for me too in w7

And I have a NAS with my movies on linux, so I ask to a friend of mine to write a script to change the folders modification date, and He gave me this...

Quote:#!/bin/bash
#
# fix movie folder date
# by vpeter for pjgm
#
# ref
# http://unix.stackexchange.com/questions/...ecursively
#

# find folders in curent folder
find -mindepth 1 -maxdepth 1 -type d | while read dir ; do
echo -n "Modifying date '$dir' "
# go down
cd "$dir"
# get reference file date
#refFile=$(find -mindepth 1 -maxdepth 1 \( -name "*.avi" -o -name "*.mkv" \) -printf '%T+=%p\n' | sort -n | tail -n 1 | sed 's/[^=]*=//')
# first find .avi file
refFile=$(find -mindepth 1 -maxdepth 1 -name '*.avi' -printf '%T+=%p\n' | sort -n | tail -n 1 | sed 's/[^=]*=//')
if [ ! -n "$refFile" ]; then
# then find .mkv file
refFile=$(find -mindepth 1 -maxdepth 1 -name '*.mkv' -printf '%T+=%p\n' | sort -n | tail -n 1 | sed 's/[^=]*=//')
fi
# file set
if [ ! -n "$refFile" ]; then
echo " - no reference .avi|.mkv file found"
else
echo "using file '$refFile'"
# set date first on folder
touch -r "$refFile" .
# set date on all the other files too
touch -r "$refFile" *
fi
# go up
cd ..
done

works for me...
Now the modification date of my folders have the same date as the mkv or Avi files that they have inside them.

cheers
Pjgm
Image
Reply
#98
Joe Miller script 2.1 isn't quite working for me. It says sort completes, but movies are not correctly sorted. In debug, every movie is listed as follows:

Code:
02:08:21 T:5340  NOTICE: [media-sort] OSerror: The filename, directory name, or volume label syntax is incorrect, file: M:\hd\movies\Fast Times at Ridgemont High.wmv\

Any ideas? 10-30 nightly build, run in portable mode, on Windows 7.
Reply
#99
Question regarding platform in the add-on settings for this script.

Is the platform referred to what you're running XBMC on? Or the platform your library is stored on?

For example I'm running XBMC on a Win7 notebook. 7TB of my library is on HFS+ formatted drives that I stream the content from and 1TB is on a NTFS formatted drive connected to the notebook.

Does this mean I need to set the sorting key to modification for Mac OS drives and disconnect the NTFS drive and then change the sorting key to Windows and disconnect from my network shares to the Mac drives for the script to work correctly?
Reply
IMO, sort by create or mod date (file or dir) should be implemented natively in XBMC to make it available for easy use by any XBMC noobs. As we already do a lot of access() why don’t we simply make use of that info?
This is a typical GUI issue and I think we should focus on the end user in this matter.

Ps..
I also wish there was a reverse sort order option on the favorite list. Currently newly added items are showing up at the end...
1. XBMC: http://github.com/FlyingRat/xbmc (ffmpeg-head-inc-xbmc-patches)
2. FFmpeg: http://github.com/FlyingRat/FFmpeg (ffmpeg-head-with-xbmc-custom-patches)
3. XBMC-updated-FFmpeg-binaries (just dev snapshots, no regular distros)
Reply
Searching this thread, it seems I'm the only one having the error where the Sort add-on just gives an error that every movie has the incorrect syntax for filename/directory? Windows 7, Eden nightly build of XBMC.

pastebin here: http://pastebin.com/v34eHNdf
Reply
jubilex Wrote:Searching this thread, it seems I'm the only one having the error where the Sort add-on just gives an error that every movie has the incorrect syntax for filename/directory? Windows 7, Eden nightly build of XBMC.

pastebin here: http://pastebin.com/v34eHNdf


having same issue.. perhaps this script doesn't support Eden Beta 1?

If so.. I'd like to ask the author to consider supporting Eden?
Reply
shawndavid Wrote:having same issue.. perhaps this script doesn't support Eden Beta 1?

If so.. I'd like to ask the author to consider supporting Eden?

Is there someone who could help look at the python in this script? In Eden, is is simply applying an extra "/" (remote file) or "\" (local file) to the file path.

I've tried looking through it; but with zero python skills, I'm a bit lost. It seems if this file path is extracted correctly from the DB; everything should be back in working order.

I'm happy to help test and output logs.


Thanks!
Reply
Hi guys, I'm the first author of the plugin and I started working on a fix for Eden this morning (using Beta2) and have a simple (potential) solution that could use some testing.

See the discussion thread on github here:
https://github.com/joemiller/xbmc-script...e/issues/4

You'll need to download the 'eden' branch (not master branch) from the repo.

Or, frankly, you can edit the sort.py file directly since the change is only 1 line:
sort.py, line 114, change the following:
strFileName = xbmc.makeLegalFilename(fields[3])
to:
strFileName = fields[3]

It appears that the makeLegalFilename method is adding a trailing '/' to the filename in Eden (this didn't happen in Dharma). I'm not sure why yet, and my googling has not revealed any reasons either.

I have only tested this change on Eden-beta2/win32 with smb: files. I could use some testing help on other platforms (mac,linux) as well as with other file sources (local, nfs, etc)
Reply
jmphx Wrote:Hi guys, I'm the first author of the plugin and I started working on a fix for Eden this morning (using Beta2) and have a simple (potential) solution that could use some testing.
...

Nevermind folks, that was not a fix at all. The new external python in Eden makes this a bit tricky to do. I think the fastest way to get this done would be to add a 'stat()' method to the new 'xbmcvfs' module.

See additional info/discussion here: https://github.com/joemiller/xbmc-script...nt-3598657
Reply
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 12

Logout Mark Read Team Forum Stats Members Help
Add sort by date added on movies library mode?2