Show TV Server recordings tumbnails with one line code changing! (1 Viewer)

MoPhat

Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Can anyone test this if this works?
    I have just changed the codeline for the thumbnails.

    its from TvRecorded.cs from line number 780
    Code:
       private static GUIListItem BuildItemFromRecording(Recording aRecording)
        {
          string strDefaultUnseenIcon = GUIGraphicsContext.Skin + @"\Media\defaultVideoBig.png";
          string strDefaultSeenIcon = GUIGraphicsContext.Skin + @"\Media\defaultVideoSeenBig.png";
          GUIListItem item = null;
          try
          {
            if (!string.IsNullOrEmpty(aRecording.Title))
            {
              item = new GUIListItem(aRecording.Title);
              item.TVTag = aRecording;
              //string strLogo = Utils.GetCoverArt(Thumbs.TVRecorded, Utils.SplitFilename(Path.ChangeExtension(aRecording.FileName, Utils.GetThumbExtension())));
              [COLOR=red][B]string strLogo = Thumbs.TVRecorded + @"\" + Path.ChangeExtension(Utils.SplitFilename(aRecording.FileName), ".png");[/B][/COLOR]
              if (!File.Exists(strLogo))
              {
                strLogo = Utils.GetCoverArt(Thumbs.TVChannel, aRecording.ReferencedChannel().DisplayName);
                if (!File.Exists(strLogo))
                  strLogo = aRecording.TimesWatched > 0 ? strDefaultSeenIcon : strDefaultUnseenIcon;
              }
              else
              {
                string strLogoL = Utils.ConvertToLargeCoverArt(strLogo);
                if (File.Exists(strLogoL))
                  item.IconImageBig = strLogoL;
                else
                  item.IconImageBig = strLogo;
              }
              item.ThumbnailImage = strLogo;
              item.IconImage = strLogo;
     
              //Mark the recording with a "rec. symbol" if it is an active recording.
     
              if (IsRecordingActual(aRecording))
              {            
                item.PinImage = Thumbs.TvRecordingIcon;                        
              }          
            }
            else
              Log.Warn("TVRecorded: invalid recording title for {0}", aRecording.FileName);
          }
          catch (NullReferenceException singleex)
          {
            Log.Warn("TVRecorded: error building item from recording {0} - {1}", aRecording.FileName, singleex.Message);
          }
     
          return item;
        }

    For testing you can put some png images on the tv\thumbs folder if this are visible in the list istead of the standart image.

    And yes if this works, please add this to the SVN!!!

    I will then update my Thumbnailer plugin to create the png for the recordîngs :D

    P.S.
    its an older SVN code above with the thumb line...

    P.S. second :)

    The orginal code line:
    Code:
    string strLogo = Utils.GetCoverArt(Thumbs.TVRecorded, Utils.SplitFilename(Path.ChangeExtension(aRecording.FileName, Utils.GetThumbExtension())));

    returns a empty string (""), not a null... the Thumbs.TVRecorded are correct setted and the filename "aRecording.FileName" are also correct...but just on the methods around this line are something wrong/broken???


    Patch and TvPlugin_20227 attached!


    thx
    MoPhat
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    So i had now compiled a version with the source changes... and, what should im say? IT WORKS!

    For testing add some PNG files in the folder (VISTA) "C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\tv\Recorded" or use the Thumbnailer plugin.

    The thumbs must have the same file name as the recorded one from the TV Server like:


    this should work :D:D:D
    MoPhat
     

    diskeeper

    Portal Pro
    January 5, 2007
    6,109
    421
    Dortmund
    Home Country
    Germany Germany
    ... <snip-german mumbo jumbo>

    ps: sorry no english, take google translator.:sorry:

    no problem mate, here u go... (gibman)

    -->

    "for me it will not work.
    as is the tag? have in my skin # TV.RecordedTV.thumb.
    if I in the property browser nachsehe this tag is still the senderlogo.

    something else, it makes little sense for recordings in the thumb receptive to create folders when he is in
    C: \ Documents and Settings \ All Users \ Application Data \ Team Media Portal \ Media Portal \ thumbs \ tv \ Recorded
    queried. either directly or as purely query receptive to the folder change.

    also, if I anschalte your plugin and start recording ends with an error message mp
    "mediaportal errors in the application / softwarefehler unknown".
    I have the time to 10 sec. set and now suspect the thumb but is created immediately and then
    by the time does not fit.

    but I am sure you make the already"
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Ähhhhh, bitte schreibe dies nochmals in deutsch habe gerade meinen Translator verschlampt :mad::rolleyes:...:D:D:D

    Hast du XP oder Vista?

    gruss
    MoPhat
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Please check the thumbnailer which now supports creating the recordings thumbnails

    Der Thumbailer unterstützt nun auch die Erstellung der Vorschaubilder von Aufnahmen

    https://forum.team-mediaportal.com/...icly-thumbnails-video-files-41250/#post276485

    mophat-albums-misc-picture14-proud.gif


    MoPhat
     

    diskeeper

    Portal Pro
    January 5, 2007
    6,109
    421
    Dortmund
    Home Country
    Germany Germany
    du bist ja schnell, oder hattest du das schon vorbereitet.:D

    fehler kommt aber leider immer noch, andere ursache ?
    muss morgen noch mal schauen.
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Wie lautet der Fehler (screenshot)?

    Mit dem BlueTwo wide sehe ich die thumbs...(!?)

    MoPhat
     

    diskeeper

    Portal Pro
    January 5, 2007
    6,109
    421
    Dortmund
    Home Country
    Germany Germany
    steht doch oben, mediaportal Fehler in der Anwendung / unbekannter softwarefehler :D
    außerdem finde ich im error.log noch
    Thumbnailer: Das System kann die angegebene Datei nicht finden

    die thumbs im video-ordner werden auch nicht mehr erstellt, was in der letzten version aber ging.
    anmerken möchte ich noch das ich nicht die standart intallations ordner benutze.

    Mit dem BlueTwo wide sehe ich die thumbs...(!?)

    ich nicht. :(
     

    Users who are viewing this thread

    Top Bottom