"Insert DVD" option (1 Viewer)

FWSMulder

New Member
October 13, 2007
2
0
39
Bourges, Middle of France
Home Country
France France
Hi everyone,
I have many TV Series and I frequently use this plugin which is very excellent (congratulations Inker, very good work).
My hard disk is full and I burn few TV Series on DVDs...
Does an option could be add, like "Insert DVD", for exemple if you try to launch an episode which is on DVD ?
Thank you in advance...
 

Ryoga79

Portal Pro
January 14, 2007
55
1
44
This is probably my "most wanted" feature....hopefully someone will figure out a way to implement it.

The alternative that i can think of would be to somehow allow multiple "instances" of the plugin, working on two separate databases...one "online" and one "offline". Thoughts?
 

nfox

Portal Pro
August 22, 2006
163
24
London
Home Country
United Kingdom United Kingdom
I have a large TV series library on DVD and would really like to see something implemented to properly handle offline media. I have no programming knowledge, so I don't know how best this could be achieved, but if there was a way of indicating to the plugin which drive was the "offline" drive, so that when it showed up in the database the plugin knew to prompt to have the correct disc inserted? Or something?

A field in the DB for a disc name (not just a number) and an option to eject the drive would also be nice :D
 

eventone

Portal Member
February 16, 2007
48
1
Home Country
Portugal Portugal
Actually I had an idea for this, since my library is also quite large on DVD's. What I did was use the "DISCID" field in the database to insert the DVD code (say S1 D1 (season 1, disc 1)), and then add this field to the graphic display next to each episode, just by configuring the options. Instead of the airdate, it would list the title and then the disc code. I always knew what disc to put in for each episode.

I did it manually for each episode, but it wasn't too much trouble.

This worked pretty well for a while... until I needed to update the database for new episodes... and the system automatically synced the information with the website. Since the website has these fields, my information was always erased... Well, it was good while it lasted, but then i just had to give up :p
 

err_duh

Portal Member
April 13, 2007
5
0
Home Country
United States of America United States of America
I second, third and fourth this idea.

I have thought about this as well. With the little programing I've done what about a way to select an episode(s) to 'Archive' and it would burn it to a dvd (using the existing Media Portal plugin) or just select which ones are archived and mark them as appropriate and mark the episode(s) as archived in the db and display an 'Offline' Icon in the view to let us know. If selected it would check the CD Drive(s) (root of drive) for the file and if not found then prompt to insert disc? This would really make this plugin that much more of an awesome plugin.

A big :D goes out to all of the people involved in making this plugin such a must have for media portal (should be included as part of it)
 

safran64

Portal Member
June 25, 2007
30
0
Home Country
Germany Germany
Little workaround

Hi,

I wanted this feature, too, and made a workaround that is working for me.

In general I have 3 situations:

1. File is found -> everything is ok. ;-)
2. File is not found because I have it on a Disc -> Dialog "please insert disc"
3. File is not found because I of any other cause (deleted, moved, etc.) -> Dialog "File not found - Filelocation/filename"

This is a "dirty" solution, because the programm doesn't detect automatically if the files are in a disc or on HD.
So I had to tell it in the code, i.e. all files on H: (which is my DVD drive) are "on disc" all others are thought to be on their HD location.

One important note at the beginning: I'm always using the "keep reference" activated in the config!

First I changed some lines in the TVseriesPlugin.cs as followed.
(To get behind it compare it with the original one and you'll find the line. I also noted the top and bottom line to show where it start and stops).

(//cs1 are only helper marks from me to show where I changed something)

Code:
case Listlevel.Episode:
                        this.m_SelectedEpisode = (DBEpisode)this.m_Facade.SelectedListItem.TVTag;
                        MPTVSeriesLog.Write("Selected: ", this.m_SelectedEpisode[DBEpisode.cCompositeID].ToString(), MPTVSeriesLog.LogLevel.Normal);
                        ////////////////////////////cs1 Dialog No File/CD ///////////
                        string videofilename = m_SelectedEpisode[DBEpisode.cFilename];//cs1
                        if (System.IO.File.Exists(videofilename))//cs1
                        {
                            m_VideoHandler.ResumeOrPlay(m_SelectedEpisode);
                            //{
                            // AB: I put back this code as it was before, as if I watch one local episode I think it's safe to consider all local episodes watched

                            //-- Jon: isWatched check now happens on stopping (VideoHandler.OnPlayBackStopped)
                            /* 
                             * SQLCondition condition = new SQLCondition();
                             * condition.Add(new DBEpisode(), DBEpisode.cFilename, this.m_SelectedEpisode[DBEpisode.cFilename], SQLConditionType.Equal);
                             * List<DBEpisode> episodes = DBEpisode.Get(condition, false);
                             * foreach (DBEpisode episode in episodes)
                             * {
                             *     episode[DBOnlineEpisode.cWatched] = 1;
                             *     episode.Commit();
                             * }
                             * this.LoadFacade();
                             * this.OnPageLoad();
                             */
                            //}
                            //break;
                        }
                        else
                        {
                            GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
                            dlgOK.SetHeading("My TV Series");
                            if (videofilename.Contains("H:")) //cs1 H: = DVD drive
                            {
                                dlgOK.SetLine(2, 219); //no Disc 219
                                dlgOK.DoModal(GUIWindowManager.ActiveWindow);
                            }
                            else
                            {
                                dlgOK.SetLine(1, "File not found"); //cs1
                                dlgOK.SetLine(3, videofilename); //cs1
                                dlgOK.DoModal(GUIWindowManager.ActiveWindow);
                            }
                        }
                        break;
                    ////////////////////////////cs1 Dialog No File/CD ///////////


	 }
            }
            base.OnClicked(controlId, control, actionType);


To make TV-Series detect if there are any changes while it is running, e.g. ejected Disc, etc., I also implemented a line (see //cs1) in TVSeriesPlugin.cs that checks the database everytime I change to season level.
Note: this may only work properly with "keep reference" switched on.

Code:
case Listlevel.Season:
                        this.m_CurrViewStep++;
                        setNewListLevelOfCurrView(m_CurrViewStep);
                        this.m_SelectedSeason = (DBSeason)this.m_Facade.SelectedListItem.TVTag;
                        m_stepSelection = new string[] { m_SelectedSeason[DBSeason.cSeriesID].ToString(), m_SelectedSeason[DBSeason.cIndex].ToString() };
                        m_stepSelections.Add(m_stepSelection);
                        MPTVSeriesLog.Write("Selected: ", m_stepSelection[0] + " - " + m_stepSelection[1], MPTVSeriesLog.LogLevel.Normal);
                        // always do a local scan when on episode level
                        m_parserUpdaterQueue.Add(new CParsingParameters(true, false));//cs1
                        this.LoadFacade();
                        this.m_Facade.Focus = true;
                        break;


Since in my case the "keep reference" is activated I made one last change. With this option activated missing files would not be shown in the "not found" color. To circumvent this I again changed one line in TVSeriesPlugin.cs (see //cs1)

Code:
item.Label2 = FieldGetter.resolveDynString(m_sFormatEpisodeCol3, episode);
                                item.Label3 = FieldGetter.resolveDynString(m_sFormatEpisodeCol1, episode);
                                item.IsRemote = episode[DBEpisode.cImportProcessed].ToString().Contains("1");// CS1 old: ...cFilename].ToString().Length > 0; //Labels are shown in notpresent color even with activated 'keep reference'
                                item.IsDownloading = episode[DBOnlineEpisode.cWatched] == 0;
                                item.TVTag = episode;


It looks more complicated than it is if you know how to modify your TV-Series plugin with MS Visual#. Simply find the three passages and copy/paste the changed codes over the old ones.

But again: use at your own risk and it may only work properly with "keep reference" marked.

Edit: some pictures
 

Inker

Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Please test latest build.

    You can now:
    - mark import paths as being "removable"
    - episodes under a removable path will never get their reference file deleted automatically, even if you have the option set in the config
    - if you try to play an episode under a removable path, that the plugin cannot find (eg. it isnt there) it will prompt you to insert the correct disk (it will aks you by volumenID (basically the name of the cd/dvd)) -> This is of course translatable to different languages, I will commit a modified english/german language file at a later date
    - it also enables you to display a logo for offloaded files (<Episode.Removable> -> 0/1) and you can display the volumeid anywhere you like ( <Episode.VolumeLabel> )
    - if you have not had a path marked as removable before an episide was imported (basically with any files in your current database) the value(s) will only be reevaluated if you try to play the file for the first time - (your logos will NOT show up until that time).

    This is highly experimental at this time, in fact, It may very well screw up your database or crash with an existing database, so BACK UP your current DB before you try and use at your own risk.

    That being said, I need you guys who actually use such a sceneraio to try it out and give me feedback, as really I can only try this on my dev machine, my HTPC doesn't even have an optical drive so i will not notice if something doesn't work.

    If you find the build doesn't work at all, you can always roll back to a previous version from here: http://mp-tvseries.svn.sourceforge....TVSeries/bin/release/MP-TVSeries.dll?view=log
    and also copy back the dabase you backed up (remember how I said back it up?) ;-)

    Have fun
     

    eventone

    Portal Member
    February 16, 2007
    48
    1
    Home Country
    Portugal Portugal
    Ok, I'd like to give it a go, but I'm a bit lost... I replaced my MP-TVseries.dll for this latest one and backed up my database.

    However, how do I mark the import path as "removable"? I don't see any new options in the configuration window... Where is the volumeID field stored? Doesn't the database have to change?
     

    spuck

    Community Skin Designer
    April 6, 2007
    397
    59
    Home Country
    Sweden Sweden
    Sounds very nice Inker, so that would work with my external drives as well?
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Ok, I'd like to give it a go, but I'm a bit lost... I replaced my MP-TVseries.dll for this latest one and backed up my database.

    However, how do I mark the import path as "removable"? I don't see any new options in the configuration window... Where is the volumeID field stored? Doesn't the database have to change?

    There should be an option under importPaths. Yes, volumeID is stored in DB obviously, but as i said, only after youve either imported or atempted to play the file at least once.

    works for any paths, i deliberatly made it not auto set to removable for cd/dvd drives, it should also help you if you have network shares that are inavailable half the time.
     

    Users who are viewing this thread

    Top Bottom