Pages

Categories

What I'm Doing...

  • Defend PHP; convince me it isn’t horrible http://snipr.com/6di74 Nothing compelling so far. 22 hrs ago
  • Good points, The Decline and Fall of Agile http://is.gd/7EFu 2 days ago
  • I REALLY could have used the new Geo-Spatial features that are in SQL 2008 last night. 2 days ago
  • With Remote Desktop to Windows Server 2008 you can copy local files and paste them in the RDP window. That is damn useful. 2 days ago
  • can't be a good sign when a programmer's resume has bugs in it. A 66 page word doc with duplicate pages and spacing issues. 2 days ago
  • More updates...

Posting tweet...

itunes and “remember playback position”

iTunes won’t automatically bookmark your video files playback postiton so you can resume where you left off. You need to right click on the track, select “get info” and check “remember playback postion” under the options tab. Unfortunately there is no way to do multiple tracks at once. Here is a c# code snippet that takes the selected items in the itunes browser window and sets the “remember playback position” to true. You will need to add a reference to the iTunes type COM library.

 

 

    1 using System;

    2 using System.Collections.Generic;

    3 using System.Text;

    4 using iTunesLib;

    5

    6 namespace RemeberPlaybackPostion

    7 {

    8     class Program

    9     {

   10         static void Main(string[] args)

   11         {

   12             iTunesApp app = new iTunesAppClass();

   13

   14             // IITTrackCollection tracks = app.LibraryPlaylist.Tracks;

   15             IITTrackCollection tracks = app.BrowserWindow.SelectedTracks;

   16

   17             if(tracks == null)

   18             {

   19                 return;

   20             }

   21

   22             Console.WriteLine(“{0} tracks selected.”, tracks.Count);

   23

   24             for (int i = 0; i < tracks.Count; i++)

   25             {

   26                 IITTrack track = tracks[i + 1];

   27                 IITFileOrCDTrack vidTrack = track as IITFileOrCDTrack;

   28                 if (vidTrack != null)

   29                 {

   30                     vidTrack.RememberBookmark = true;

   31                     Console.WriteLine(“{0} RememberBookmark set to {1}”, vidTrack.Name, vidTrack.RememberBookmark);

   32                 }

   33                 else

   34                 {

   35                     Console.WriteLine(“Skipping {0}”, track.Name);

   36                 }

   37             }

   38             Console.WriteLine(“Done.”);

   39             Console.ReadLine();

   40

   41

   42

   43         }

   44     }

   45 }

 

 

Leave a Reply

You must be logged in to post a comment.