Page 1 of 2

Video: add year of the movie

PostPosted: Sun Dec 05, 2010 10:26 pm
by scalp
Hi,
As you get the year of the movie into the metadata, could it be possible to sort by year, as it is already possible by genre, actor...
Thanks a lot,
Pascal.

Re: Video: add year of the movie

PostPosted: Fri Jul 29, 2011 11:05 pm
by Xmantium
I'd very much like this too, viewing by year it's easier to watch recent movies

Re: Video: add year of the movie

PostPosted: Sat Jul 30, 2011 2:40 am
by zip
would this be just movies or all videos with a year (e.g. episodes). WOuld we have MOvies by Year or just By Year?

Re: Video: add year of the movie

PostPosted: Sat Jul 30, 2011 4:46 am
by Cerberus
zip wrote:would this be just movies or all videos with a year (e.g. episodes). WOuld we have MOvies by Year or just By Year?


i would guess only movies by year cause looking at series metadata it doesnt show rekease info :)

Re: Video: add year of the movie

PostPosted: Wed Aug 03, 2011 1:15 pm
by Xmantium
Yes by Movies only please
TV series is fine just the way it is. :D

Also is there a way of organising the library in the order of preference of user. Such as I prefer "Folder" to be on top, followed by "Last viewed" and "last added" then the remaining library folders.

Re: Video: add year of the movie

PostPosted: Wed Aug 03, 2011 1:30 pm
by Cerberus
Xmantium wrote:Yes by Movies only please
TV series is fine just the way it is. :D

Also is there a way of organising the library in the order of preference of user. Such as I prefer "Folder" to be on top, followed by "Last viewed" and "last added" then the remaining library folders.


would that not be done by the renderer rather than serviio as from what i see from my device is they are in alpha order.

Re: Video: add year of the movie

PostPosted: Wed Aug 03, 2011 3:03 pm
by Xmantium
Cerberus wrote:would that not be done by the renderer rather than serviio as from what i see from my device is they are in alpha order.

On my ps3 it's in alphabetical order but on my Bravia TV it's the same order as in the presentation tab, so it would great if the user can change the order in the presentation tab

Re: Video: add year of the movie

PostPosted: Wed Aug 03, 2011 3:10 pm
by Illico
Xmantium wrote:
Cerberus wrote:would that not be done by the renderer rather than serviio as from what i see from my device is they are in alpha order.

On my ps3 it's in alphabetical order but on my Bravia TV it's the same order as in the presentation tab, so it would great if the user can change the order in the presentation tab


There were a request for an option to rearrange the library folder list:
https://bitbucket.org/xnejp03/serviio/i ... older-list
You could add your request too

Re: Video: add year of the movie

PostPosted: Wed Aug 03, 2011 3:32 pm
by Xmantium
It says library rearrange going to be implemented in 0.6 build... Has it?
I'm not part of the beta test program

Re: Video: add year of the movie

PostPosted: Wed Aug 03, 2011 3:35 pm
by Cerberus
Xmantium wrote:It says library rearrange going to be implemented in 0.6 build... Has it?
I'm not part of the beta test program


not yet no..

Re: Video: add year of the movie

PostPosted: Thu Aug 04, 2011 3:50 am
by zip
some renderers follow the order sent by the server, some dont (Xbox, C series Samsung TVs, etc). I won't be doing that for now, it seems very minor functionality enhancement, but if you can, you can do that by editing contentDefinition.xml file insede serviio.jar (just unzip it)

Re: Video: add year of the movie

PostPosted: Thu Aug 04, 2011 3:26 pm
by Xmantium
Thanks zip. It would be nice to see this added as a GUI for novice users.
For anyone who want to do this open serviio.jar, i used winrar, navigate to \org\serviio\upnp\service\contentdirectory\definition\
and edit contentDirectoryDef.xml to order you want, then add and replace in winrar, you must do a full restart

But I do hope you can add "Year" to movies on 0.6 build

Re: Video: add year of the movie

PostPosted: Fri Aug 05, 2011 6:23 am
by zip
Xmantium wrote:But I do hope you can add "Year" to movies on 0.6 build

It's not been planned and if i keep adding stuff it'll never be released... But there is always 0.6.1 and beyond

Re: Video: add year of the movie

PostPosted: Tue Dec 04, 2012 3:45 pm
by KrisDech
I also needed my videos (self recorded) to be sorted by year. As the feature request is quite old I am now using the following workaround. Maybe this helps other users as well:

For each *mov,*avi,*mkv file I created an AHK script that will create an XBMC nfo file like this:
  Code:
<movie>
<title>MVI_4053[nfo]</title>
<director>1 2011 06</director>
</movie>


Now I can browse my files per year/month by "reusing" the Directors category.
Example:

Video
-Directors
--1 (all years 1991,2001,2011,...)
---1 2011 01 (all movies Jan 2011)
----MVI_2344[nfo]
----MVI_2345[nfo]
----... all other movies created in jan 2011
---2 2011 02 (all movies Feb 2011)
--2 (all years 1992,2002,2012,...)
--3 (all years 1993,2003,2013,...)
...

If somebody wants to try. Below is the ahk script. You have to install autohotkey from http://www.autohotkey.com/ to run the script.

Upon start script will ask you to select a folder. Once folder is selected it will scan all files in this folder and subfolders of the selected folder. If it finds a file with extension mkv,avi,mov and there is no corresponding nfo file if will create one.

  Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Recommended for catching common errors.
#SingleInstance force

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

GetFilename(filepath)
{
; filepath C:\Users\user\Documents\ahk\MVI_4053.MOV should return MVI_4053.MOV
  SplitPath, filepath, outFileName
  return outFileName
}

GetFilenameWithoutExtension(filepath)
{
; filepath C:\Users\user\Documents\ahk\MVI_4053.MOV should return MVI_4053
  SplitPath, filepath,,,,OutNameNoExt
  return OutNameNoExt
}

GetNfoFileName(filepath)
{
; filepath C:\Users\user\Documents\ahk\MVI_4053.MOV should return C:\Users\user\Documents\ahk\MVI_4053.nfo
  SplitPath, filepath , OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive
  return OutDir . "\" . OutNameNoExt . ".nfo"
}

GetTimeLabel(filepath)
{
; filepath C:\Users\user\Documents\ahk\MVI_4053.MOV should return "1 2011 06" (modification time 2011.06.24)
  FileGetTime, timeLabel , %filepath%, M
  FormatTime, year , %timeLabel%, yyyy
  FormatTime, month , %timeLabel%, MM
  index := mod(year,10)
  return index . " " . year . " " . month
}

Output(text)
{
GuiControl,, MyListBox, %text%
Gui, Show, AutoSize Center
}

GenerateNfoForFile(filepath)
{
nfoFileName := GetNfoFileName(filepath)

IfExist, %nfoFileName%
{
    Output("Skipped: " . filepath . ". nfo File already exists.")
    return
}

;Output("<movie>")
text := "<movie>`n"
FileAppend , %text%, %nfoFileName%, UTF-16

;Output("<title>MVI_4053.MOV</title>")
text := "<title>" . GetFilenameWithoutExtension(filepath) . "[nfo]</title>`n"
FileAppend , %text%, %nfoFileName%


;Output("<director>1 2011 06</director>")
text := "<director>" . GetTimeLabel(filepath) . "</director>`n"
FileAppend , %text%, %nfoFileName%

;Output("</movie>")
text := "</movie>`n"
FileAppend , %text%, %nfoFileName%

Output("Created: " . nfoFileName)
}

Gui, Add, Text,, Simple Output Window.
Gui, Add, ListBox, vMyListBox gMyListBox w640 r20
Gui, Add, Button, Default, OK

FileSelectFolder, folder2scan, , 0 , Select folder to scan for video files
if folder2scan =
{
    MsgBox, You didn't select a folder. I will exit now.
    ExitApp
}

Output("Selected folder: " . folder2scan)

Loop, %folder2scan%\*, 1, 1 
{
    if A_LoopFileAttrib contains D  ; Skip directories
      continue
    if A_LoopFileExt in mkv,avi,mov
    {
      GenerateNfoForFile(A_LoopFileLongPath)
    }
}
return

MyListBox:
return
ButtonOK:
GuiClose:
GuiEscape:
ExitApp

Re: Video: add year of the movie

PostPosted: Tue Dec 04, 2012 4:01 pm
by moltra
KrisDech wrote:I also needed my videos (self recorded) to be sorted by year. As the feature request is quite old I am now using the following workaround. Maybe this helps other users as well:

For each *mov,*avi,*mkv file I created an AHK script that will create an XBMC nfo file like this:
  Code:
<movie>
<title>MVI_4053[nfo]</title>
<director>1 2011 06</director>
</movie>


Now I can browse my files per year/month by "reusing" the Directors category.
Example:

Video
-Directors
--1 (all years 1991,2001,2011,...)
---1 2011 01 (all movies Jan 2011)
----MVI_2344[nfo]
----MVI_2345[nfo]
----... all other movies created in jan 2011
---2 2011 02 (all movies Feb 2011)
--2 (all years 1992,2002,2012,...)
--3 (all years 1993,2003,2013,...)
...

If somebody wants to try. Below is the ahk script. You have to install autohotkey from http://www.autohotkey.com/ to run the script.

Upon start script will ask you to select a folder. Once folder is selected it will scan all files in this folder and subfolders of the selected folder. If it finds a file with extension mkv,avi,mov and there is no corresponding nfo file if will create one.




This is sounds great, my wife has been wanting this for a while. How does this affect the other Metadata that is downloaded from the net?

Re: Video: add year of the movie

PostPosted: Tue Dec 04, 2012 4:10 pm
by KrisDech
Yes my wife is the reason why I came up with this workaround too :-)
However I am not using metadata from the internet. If your metadate is stored as nfo files it will work out of the box. Existing nfo files will not be changed. So you will still not find them in the directors category.
However if you are using any other kind of metadata retrieval you are stuck because you have to select:
Metadata
- Descriptive metadata
-- XBMC .nfo files
in Serviio console and I assume you can't have two different metadata providers :|

Re: Video: add year of the movie

PostPosted: Tue Dec 04, 2012 5:21 pm
by moltra
When I get home I will try this with online metadata enabled and see what happens. Either way, I think that this idea and script would ba a good addition to the Wiki.

Re: Video: add year of the movie

PostPosted: Tue Dec 04, 2012 5:37 pm
by zip
YOu can only have 1 extractor at a time. So either all XBMC or all Online.

Re: Video: add year of the movie

PostPosted: Tue Dec 04, 2012 8:06 pm
by KrisDech
zip wrote:YOu can only have 1 extractor at a time. So either all XBMC or all Online.


Thanks zip. That is also what I thought.

If you want to create nfo Files for existing movies using information from IMDB this tool might be helpful: http://mediacompanion.codeplex.com/ I am not using it. Just found it mentioned in the XBMC forums.

Re: Video: add year of the movie

PostPosted: Sun Dec 09, 2012 7:35 pm
by matmat07
I wish there was a +1 system, but since there isn't i'll just say i'd like to have this too