Page 1 of 1

[ENG] Potential features to help handle TV series

Posted: 2012-12-04 15:06:04
by kurosu
Hi,

French speaker here, but English's fine.

I've started using this program to handle my movie/series collection, but there are troublesome points that maybe have workarounds.

But firstly, how I am proceeding:
  • I am adding a new string tag "series" and an integer one "season" (though a string one would be more generic, albeit with maybe weird sorting on occasion)
  • I can then filter by season / series
But:
  • I don't know how to edit those custom tags at once, ie the field is inactive/hidden when several items are selected; it seems I once managed to set them all, but no idea how
  • If I initialize the series tag with the filtered filename, original title field is no longer set with it (and is thus empty)
  • Moving away the mouse cursor from the field sometimes makes it loose focus if it hovers another editable field; troublesome for copy-pasta
  • I don't know how to sort using 2 fields
    • indeed, you should at least specify the order in which the fields are used for sorting
    • and then you could display it as nested
Other things that might be useful:
  • "clean" filenames according to a format (using tags?) by renaming files, ie something close to ant renamer but within ant catalog
  • I know series are not a focus, but maybe some helper to eg extract season/episode from known patterns (SzEyy or zxyy or...); maybe that should be a plugin

Posted: 2012-12-04 17:31:08
by soulsnake
Hi kurosu,
I don't know how to edit those custom tags at once, ie the field is inactive/hidden when several items are selected; it seems I once managed to set them all, but no idea how
You can use scripts to change values of multiple movies at once such as script UpdateFields.
If I initialize the series tag with the filtered filename, original title field is no longer set with it (and is thus empty)
This is "normal", a value is affected to one field, no more, from "import window".
But again, you can use script UpdateFields after import to copy a field into another if you want to have the same value in another field.
Moving away the mouse cursor from the field sometimes makes it loose focus if it hovers another editable field; troublesome for copy-pasta
By default, if you move mouse on movie list or html viewer, focus is given to it (no click needed to scroll, ...). But you can remove this behavior if you want, just uncheck the option in preferences (General display > Activate autofocus on movie list and html viewer).
I don't know how to sort using 2 fields
I think you want to sort or group on the two fields Series + Season.
I know this limitation.
I am working on virtual fields that can contain several field values using a template.
e.g. "[Series] - Season [Season]" where [Series] and [Season] are replaced by their respective values dynamically.
Then you will can sort or group movie list on this field like a normal field, show this field in movie list, ...
In the same way, you will can define formatted title using a template.
This will be included in next update of version 4.1.2 beta ;).
"clean" filenames according to a format (using tags?) by renaming files, ie something close to ant renamer but within ant catalog
I already make a little script named "RenameFiles" to rename movie files using movie fields with some options.
You can use it if you want but be carefull before to run it on all your files if you are not sure of what you do.
I know series are not a focus, but maybe some helper to eg extract season/episode from known patterns (SzEyy or zxyy or...); maybe that should be a plugin
There is no plugin for this but you can make a little script or reuse existing scripts to do all what you can.
If you don't know, you can ask to the forum exactly what you need, we will try to help you ;).
To start, I give you a little script example that I make for someone to parse a full episode title from custom field 'Temp' into field originalTitle for "Series - Episode Title" and custom field 'SeasonEpisode' for Season and Episode as 01x01.

Here are some examples of full episode titles that can be parsed correctly:
  • Agatha Christie's Partners In Crime 1x01 The Secret Adversary
  • The X-Files [5x01] - Redux
  • The X-Files 4x13 - Never Again
  • X-Files, The - 01x01 - Pilot
  • BBC QI (Quite Interesting) S09E19 Immortal Bard
  • Poirot.5x07.Dead.Mans.Mirror

Code: Select all

program ParseEpisodeTitle;
var
  Value, SeriesTitle, EpisodeSeason, EpisodeTitle: string;
  Season, Episode: string;

begin
  // Get full episode title from custom field 'Temp' into value
  Value := GetCustomField('Temp');
 
  // Add begin/end space to value
  Value := ' ' + Value + ' ';
 
  // Replace special chars by spaces in value
  Value := RegExprSetReplace('[-_.\[\]+]', Value, ' ', False);
 
  // Split value
  RegExprSetExec('^(.*)([ ]S[0-9]{1,2}E[0-9]{1,2}[ ]|[ ][0-9]{1,2}X[0-9]{1,2}[ ])(.*)$', Value);
  SeriesTitle := Trim(RegExprSubstitute('$1'));
  EpisodeSeason := Trim(RegExprSubstitute('$2'));
  EpisodeTitle := Trim(RegExprSubstitute('$3'));
 
  // Replace multi spaces by 1 space
  SeriesTitle := RegExprSetReplace('(^|[ ])([ ]{2,})($|[ ])', SeriesTitle, '$1 $3', True);
  EpisodeTitle := RegExprSetReplace('(^|[ ])([ ]{2,})($|[ ])', EpisodeTitle, '$1 $3', True);
 
  // Debug message
  //ShowMessage('|' + Value + '|' + ' - |' + SeriesTitle + '|' + ' - |' + EpisodeSeason + '|' + ' - |' + EpisodeTitle + '|')
 
  // Write EpisodeSeason if it is not empty
  if (EpisodeSeason <> '') then
  begin
    // Format season and episode like we want
    if AnsiUpperCase(StrGet(EpisodeSeason, 1)) = 'S' then
      RegExprSetExec('^S([0-9]{1,2})E([0-9]{1,2})$', EpisodeSeason)
    else
      RegExprSetExec('^([0-9]{1,2})x([0-9]{1,2})$', EpisodeSeason);
    Season := RegExprSubstitute('$1');
    Episode := RegExprSubstitute('$2');
    if Length(Season) = 1 then
      Season := '0' + Season;
    if Length(Episode) = 1 then
      Episode := '0' + Episode;
    EpisodeSeason := Season + 'x' + Episode;
    // Write EpisodeSeason in a field
    SetCustomField('SeasonEpisode', EpisodeSeason);
    // Clear custom field 'Temp'
    SetCustomField('Temp', '');
  end;
 
  // Write EpisodeTitle if it is not empty
  if (EpisodeTitle <> '') then
  begin
    // Write EpisodeTitle in a field
    SetField(fieldOriginalTitle, EpisodeTitle);
  end;
 
  // Write SeriesTitle if it is not empty
  if (SeriesTitle <> '') then
  begin
    if EpisodeTitle <> '' then
      SeriesTitle := SeriesTitle + ' - ' + EpisodeTitle;
    // Write SeriesTitle in a field
    SetField(fieldOriginalTitle, SeriesTitle);
  end;
end.
Soulsnake.

Posted: 2013-01-12 19:09:47
by Droppo
Reading whole topic coz I'm interested in this too, I found on nasty thing, the updatefields script is french only, some of us don't kno w french, only spanish and english... would be possible to translate the script to english atleast?? thnxs in advance...

In my case I have all my TV shows on DVD only, not TV recording or anything and something normal on that kind of DVDs is that they have a particular name parts like S01D01 which means Season 1 Disk 1 So would be nice to have a way to "contract" all the others to 1 item only
Like this

House M.D. - S01D01
|
|--House M.D. - S01D02
|--House M.D. - S01D03
|--House M.D. - S01D04

House M.D. - S02D01
|
|--House M.D. - S02D02
|--House M.D. - S02D03
|--House M.D. - S02D04

and so on... also, this could be made with a name pattern config

Posted: 2013-03-10 18:08:41
by kurosu
Sorry for the very late reply, but I found it was not very useful in the end. Anyway, I have this topic available if I ever feel like trying it.

Thanks a lot for the time taken, though.