Author Topic: Grouping for episodes  (Read 8996 times)

0 Members and 1 Guest are viewing this topic.

Offline lcer

  • Member
  • *
  • Posts: 3
    • View Profile
Grouping for episodes
« on: December 30, 2009, 01:12:18 pm »
Hallo forum,

I suggest do implement a function to group Episodes into an exsiting Movie. If you import movies form your disk which can not be grouped by the import tool, manual grouping becomes nessesary. I have solved it with a smoll C# program, but it schould be done from context-menu:

Code: [Select]
            // strMID ist the MID of the series-entry in MOVIES
            sqlQuery = "UPDATE MOVIES SET \"series\" = '-1' WHERE \"mid\" = " + strMID + ";";
            rows = PVD.execute(sqlQuery);
            // each line contains the mid of an imported, but not grouped episode
            string[] lines = Regex.Split(this.textBoxEPISODEN.Text, "\r\n");
            foreach (string line in lines)
            {
                sqlQuery = "SELECT gen_id(GEN_EPID,1) FROM RDB$DATABASE ;";
                FbDataReader myReader;
                myReader = PVD.select(sqlQuery);
                while (myReader.Read())
                {
                    strEID = myReader.GetString(0);
                }
                myReader.Close();

                sqlQuery = "INSERT INTO EPISODES (\"epid\", \"mid\", \"epnum\", \"season\") VALUES (" + strEID + ", " + strMID + ", '1', '1');";
                rows = PVD.execute(sqlQuery);

                sqlQuery = "UPDATE MOVIES SET \"epid\" = '" + strEID + "' WHERE \"mid\" = " + "'" + line.Trim() + "'" + ";";
                rows = PVD.execute(sqlQuery);
            }
            PVD.commit();
            PVD.close();

Thanks

lcer

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Grouping for episodes
« Reply #1 on: December 30, 2009, 01:21:54 pm »
I will probably implement this functionality in future.
Gentlemen, you can’t fight in here! This is the War Room!

Offline lcer

  • Member
  • *
  • Posts: 3
    • View Profile
Re: Grouping for episodes
« Reply #2 on: June 26, 2010, 10:10:25 pm »
Hallo,

while my database is growing, i'm more and more missing some grouping-feature.

But first it would be nice, to change a movie to a episode manually. If the filescanner misses some episode due to wrong regex I could fix it manually.

thanks

lcer

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Grouping for episodes
« Reply #3 on: June 26, 2010, 10:58:16 pm »
From nostra's comment, I wouldn't expect the feature to be implemented soon. The design of the scanner assumes the user will include whatever regex are required to properly process the file pathname patterns used. This is easier said than done, but a practise of making the necessary changes to the regex and/or filenames and re-scanning should quickly move the scanner towards an acceptable error rate.

I've eliminated the issue entirely by pre-processing my downloaded episodes using the regex renaming capability of my file manager. The renamer, of course, renames the files using a pattern that the scanner will recognize 100% of the time. The renamer regex usually just work, but if they don't I can manually fix the filename before it creates an error in PVD. I'll remain happier doing it this way, even when there is a tool for fixing the problem.

Offline patch

  • Older Power User
  • *****
  • Posts: 250
    • View Profile
Re: Grouping for episodes
« Reply #4 on: July 04, 2010, 03:29:28 am »
while my database is growing, i'm more and more missing some grouping-feature. But first it would be nice, to change a movie to a episode manually. If the filescanner misses some episode due to wrong regex I could fix it manually.

Similar discussion occurred here. I assume you are looking at case 3, where you are adding a new episode to an existing TV series.
« Last Edit: July 04, 2010, 07:15:56 am by rick.ca »