Previous 1 7 8 9 10 11 Next 159 Replies Latest reply: Feb 18, 2014 4:12 AM by sjbtax Go to original post Branched to a new discussion.
  • AbsolutGrndZer0 Level 1 Level 1 (40 points)

    They could build it into the new OSX, but that wouldnt help me.  I know this thread is under "iTunes for Mac" but I'm actually a PC user, reason I'm posting in this thread is because this issue affects BOTH Mac and PC users...

     

    Plus, there are a lot of other threads about this, a lot of people make their own, or they dont bother asking others for help since WE can fix the automatic downloads, only Apple can.

     

    I seriously doubt that even if the majority didn't like it, they wouldn't come here to discuss it, they'd just be emailing Apple, you know?  So we really have no way to know if we are the only ones who hate it, but I really doubt we are. We're just the few that care about it enough to discuss it here.

  • SMB-IL Level 1 Level 1 (25 points)

    That is the change. As long as the show's new episode is listed in your iTunes library (something I've found to be hit or miss), if you double-click the episode, it should start to play without downloading. I discovered this by accident as there has been no announcement about it, but you can stream stuff from iCloud on a computer now. I think it's only iTunes 11 and above though.

  • davidsignal Level 3 Level 3 (525 points)

    Yes, I see.  I have had iTunes purchases in the Cloud turned off until now because it has always messed up my play counts.  I noticed it is made to work via iTunes in the Cloud, eliminating the need for users to use hard drive space as long as all content is purchased from iTunes and used only on devices with constant internet connections.  The power users were hoping for an option to toggle downloads again.

     

    I liked my media server method, since it was easy to sync to the iPod in my car and my iPads on-the-go (wifi only).... plus I had content not only from iTunes that I could keep in one library and access via home sharing.  But the average user should not be expected to maintain a media server.... This is clearly the new way forward. 

  • SMB-IL Level 1 Level 1 (25 points)

    Me too. I would much rather download than stream -- the reliability is far better. Your Applescript above to get the purchase when the download email comes in is great!! The only thing I did in the email rule was to move the email message out of the Inbox after the script runs because it looks like if another email from iTunes comes in, it will re-download whatever is in the Inbox again. Hopefully, they won't change the email format again! Thanks!!

  • AbsolutGrndZer0 Level 1 Level 1 (40 points)

    Yeah, I can't stream 1080HD content, that's just not going to happen.  My ISP is only DSL 6MBPS.  Now, I COULD get 50MB cable in theory, but I left them because of their habit of always doing maintenance during my usual internet times.  I'm a night person.  "Well, we have to do maintenance every day, and businesses need the internet during the day." That's great guys, but I'm a customer too.  If you can't provide me internet 95% of the time I need it, I'll find someone who can.  So I went to DSL and can count on one hand the # of times in the past 10 years my internet has been down.

     

    IF they are moving to a more streaming model, they need to rethink that every user is going to have a superfast super reliable internet connect able to stream 1080HD.  ****, my computer just barely meets the iTunes 1080HD requirements (which is ironic, since the computer is intended to play 1080HD content, but iTunes requirements seem to be a bit higher than others' software) so if I was streaming at 6 MBPS, I seriously doubt I'd not get serious lag.

  • davidsignal Level 3 Level 3 (525 points)

    SMB-IL wrote:

     

    Me too. I would much rather download than stream -- the reliability is far better. Your Applescript above to get the purchase when the download email comes in is great!! The only thing I did in the email rule was to move the email message out of the Inbox after the script runs because it looks like if another email from iTunes comes in, it will re-download whatever is in the Inbox again. Hopefully, they won't change the email format again! Thanks!!

    Thanks, I'm glad you found it useful.  It is still a work-in-progress, since I only get 3 episodes a week currently, so testing is usually limited to me manually applying mail rules, which isn't always the same outcome.  I have made a few small modifications to make it work better since I posted it, but I will post a fixed version of the script again when I am sure that it is close to 100%.

  • SMB-IL Level 1 Level 1 (25 points)

    I've only been able to test with previous emails in the Inbox and haven't had a "real" one come in yet, but I'll post results here also. The mail rule I have is the one you put in your original post with checking for the sender address and the word "available" in the Subject. I added to run the script and then put the email in the trash. I get Saturday Night Live and Monday night shows, so I'll leave it running and see what happens in the next few days.

  • davidsignal Level 3 Level 3 (525 points)

    there is one error that I have definately noticed in the way the script tries to enter the iTunes password.  In the section at the bottom of the script that is marked "on iTunesDL()", you should change the line that shows keystroke return to click button "Buy" of window 1

  • SMB-IL Level 1 Level 1 (25 points)

    I bet they change that "Buy" button. Too many people are going to be crazy clicking a button that says "Buy" for a Season Pass!

  • AbsolutGrndZer0 Level 1 Level 1 (40 points)

    SMB-IL wrote:

     

    I bet they change that "Buy" button. Too many people are going to be crazy clicking a button that says "Buy" for a Season Pass!

     

    Not only that, but even it it does say "Download" the first time I did it, I saw it says "Purchasing..." on the title bar... which freaked me out and I emailed them, they said that no, it's just saying that because I haven't entered my password in the last 15min.  Srsly? It needs to change, it STILL freaks me out even though I know it's not actually charging me.

  • davidsignal Level 3 Level 3 (525 points)

    I have a feeling that it will be that way for at least a little while.  It is just the way the download system works.  AppleTV requires users to "buy" free episodes.  And now the iTunes prompt has a "download" button for the first prompt, then if user hasn't logged into the store recently a username and password prompt comes up with a button to "buy" the free episode.   Before the most recent update, sending keystroke return would work, but, as of now, the "buy" button must be clicked.

     

    I don't have any new episdoes for about 6 days, but I think the following script should take care of everything.  I also made a change so that it only runs on new (unread) mail, so when manually using the right-click menu to apply rules it won't download every episode unless you mark the message as unread first.

     

    using terms from application "Mail"

              on perform mail action with messages messageList

                        repeat with currentMessage in messageList

                                  if read status of currentMessage is false then

      getEpisode(currentMessage)

                                  end if

                        end repeat

              end perform mail action with messages

    end using terms from

     

    on getEpisode(theMessage)

              tell application "Mail"

                        set myMessage to source of theMessage

                        set start to offset of "https://buy.itunes.apple.com/" in myMessage

                        if start ≠ 0 then

                                  set theLength to length of myMessage

                                  set addr to characters start through theLength of myMessage as string

                                  set addyEnd to offset of "&mt=" in addr

                                  set addyEnd to addyEnd + 7

                                  set addr to characters 1 through addyEnd of addr as string

                                  if length of addr > 7 then

                                            tell me to set fixedAddress to fixTheText(addr)

                                            my openWeb(fixedAddress)

                                            my iTunesDL()

                                            set read status of theMessage to true

                                  end if

                        end if

              end tell

    end getEpisode

     

    on fixTheText(someText)

              set someText to do shell script ("echo " & quoted form of someText & " | sed 's/=3D/@/g'")

              delay 0.5

              set someText to do shell script ("echo " & quoted form of someText & " | sed 's/=//g'")

              delay 0.5

              set someText to do shell script ("echo " & quoted form of someText & " | sed 's/@/=/g'")

              set theLines to TextToList(someText, return)

              set trimChars to {" ", ASCII character 9}

              repeat with aLine in theLines

                        set lineLen to length of aLine

                        set startPos to 1

                        set foundEOFwd to false

                        repeat while not foundEOFwd and startPoslineLen

                                  set theChar to text startPos thru startPos of aLine

                                  if not (trimChars contains theChar) then

                                            set foundEOFwd to true

                                  else

                                            set startPos to startPos + 1

                                  end if

                        end repeat

                        set contents of aLine to text startPos thru -1 of aLine

                        set endPos to length of aLine

                        set foundEOFwd to false

                        repeat while not foundEOFwd and endPos ≥ 1

                                  set theChar to text endPos thru endPos of aLine

                                  if not (trimChars contains theChar) then

                                            set foundEOFwd to true

                                  else

                                            set endPos to endPos - 1

                                  end if

                        end repeat

                        set contents of aLine to text 1 thru endPos of aLine

              end repeat

              set someText to ListToText(theLines, "")

              return (someText)

    end fixTheText

     

    on TextToList(theText, theDelimiter)

              set saveDelim to AppleScript's text item delimiters

              try

                        set AppleScript's text item delimiters to {theDelimiter}

                        set theList to every text item of theText

              on error errStr number errNum

                        set AppleScript's text item delimiters to saveDelim

                        error errStr number errNum

              end try

              set AppleScript's text item delimiters to saveDelim

              return (theList)

    end TextToList

     

    on ListToText(theList, theDelimiter)

              set saveDelim to AppleScript's text item delimiters

              try

                        set AppleScript's text item delimiters to {theDelimiter}

                        set theText to theList as text

              on error errStr number errNum

                        set AppleScript's text item delimiters to saveDelim

                        error errStr number errNum

              end try

              set AppleScript's text item delimiters to saveDelim

              return (theText)

    end ListToText

     

    on openWeb(pageAddress)

              tell application "Safari"

      open location pageAddress

              end tell

    end openWeb

     

    on iTunesDL()

      activate application "iTunes"

              tell application "System Events" to tell process "iTunes"

      activate

                        set windowFound to false

                        repeat until windowFound

                                  delay 2

      activate

                                  if button "Download" of window 1 exists then

                                            click button "Download" of window 1

                                            set windowFound to true

                                  end if

                        end repeat

                        set keepgoing to true

                        repeat until not keepgoing

                                  delay 10

                                  if text field 2 of window 1 exists then

                                            tell me to set passwd to getPW("iTunes Login")

                                            set value of text field 2 of window 1 to passwd

                                            click button "Buy" of window 1

                                  else

                                            set keepgoing to false

                                  end if

                        end repeat

              end tell

    end iTunesDL

     

    on getPW(searchName)

              do shell script "security 2>&1 >/dev/null find-generic-password -gs " & quoted form of searchName & " | awk '{print $2}'"

              return (text 2 thru -2 of result)

    end getPW

  • J. Tuttle Level 1 Level 1 (5 points)

    Thanks for the script.  I didn't feel comfortable putting my iTunes password in my Keychain.  Figure my kids will figure out it's there and use it all the time!  Also, while testing out the "security" command in Terminal, I got prompted to allow Terminal to access my Keychain (Once or Always).  I assume I need to click Always for the script to work, but that means anyone with command-line access to my Mac has open access to my Keychain (or at least this item in the Keychain).

     

    Anyone else have any observations/issues with using Keychain like this?

  • SMB-IL Level 1 Level 1 (25 points)

    Thanks, David, that's awesome! I should have two downloads overnight tonight, so I'll report back.

  • davidsignal Level 3 Level 3 (525 points)

    J. Tuttle wrote:

     

    Thanks for the script.  I didn't feel comfortable putting my iTunes password in my Keychain.  Figure my kids will figure out it's there and use it all the time!  Also, while testing out the "security" command in Terminal, I got prompted to allow Terminal to access my Keychain (Once or Always).  I assume I need to click Always for the script to work, but that means anyone with command-line access to my Mac has open access to my Keychain (or at least this item in the Keychain).

     

    Anyone else have any observations/issues with using Keychain like this?

    Yes, security needs to be able to access the keychain always for the script to automatically download the episodes.  There is not another way around this, short of manually checking your email and clicking the link and typing in your password.  The other automatic option is to put the password directly in the script, but that is far less secure.

     

    The keychains are per-user.  So, someone would first need full command shell access to your OSX account.  The security command doesn't spit out information remotely using ssh, so someone would have to be physically at the computer or screen share via the local network (would need your osx username/password).

     

    I am sorry you don't trust your kids, but if they are using your OSX account and know the shell, there is a lot of other information they could get at too (more than the keychain)...

    You could create a separate user account for your kids, though, and then they wouldn't have access to your keychain items.

  • SMB-IL Level 1 Level 1 (25 points)

    The script works just like it's supposed to! Tuesday morning I had two shows ready to watch. Excellent script, David. Thanks again!