My favorites
▼
|
Sign in
itivo
Download shows from your TiVo to your Mac and iPhone
Project Home
Downloads
Wiki
Issues
Source
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
198
attachment: mountain-lion-patch.txt
(3.4 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
diff --git a/iTiVo.applescript b/iTiVo.applescript
index 824c867..23b2c7b 100755
--- a/iTiVo.applescript
+++ b/iTiVo.applescript
@@ -615,19 +615,19 @@ on readSettings()
if TiVo ≠ "My TiVos" then
set title of popup button "MyTiVos" of window "iTiVo" to TiVo
try
- set theScript to "mDNS -L \"" & TiVo & "\" _tivo-videos._tcp local | colrm 1 42 &
+ set theScript to "dns-sd -L '" & TiVo & "' _tivo-videos._tcp local | grep 'can be reached at' | head -1 | cut -d' ' -f 9 | awk -F: '$2 == \"443\" {print $1}' &
sleep 2
-killall mDNS"
- set hostList to paragraphs 1 thru -1 of (do shell script theScript)
- repeat with j in hostList
- try
- if text 17 thru 19 of j is "443" then
- set IPA to first word of j
- set contents of text field "IP" of window "iTiVo" to IPA
- set canAutoConnect to true
- end if
- end try
- end repeat
+killall dns-sd"
+ my debug_log("script: " & theScript)
+ set dnsSDName to paragraphs 1 thru -1 of (do shell script theScript)
+ my debug_log("dnsSDName: " & dnsSDName)
+ set theScript to "ping -c 1 " & dnsSDName & "| grep PING | cut -d'(' -f 2 | cut -d')' -f 1"
+ my debug_log("script: " & theScript)
+ set hostIP to paragraphs 1 thru -1 of (do shell script theScript)
+ my debug_log("hostIP: " & hostIP)
+
+ set contents of text field "IP" of window "iTiVo" to hostIP
+ set canAutoConnect to true
on error
display dialog "Unable to connect to TiVo " & TiVo & ". It is no longer available on your network."
end try
@@ -708,11 +708,11 @@ on setSettingsInUI()
end setSettingsInUI
on getTiVos()
- set theScript to "mDNS -B _tivo-videos._tcp local | colrm 1 74| grep -v 'Instance Name' |sort | uniq &
+ set theScript to "dns-sd -B _tivo-videos._tcp local | colrm 1 79 | grep -v 'Instance Name' | sort | uniq &
sleep 2
-killall mDNS"
+killall dns-sd"
tell window "iTiVo"
- my debug_log(theScript)
+ my debug_log("script: " & theScript)
set scriptResult to (do shell script theScript)
set scriptLineCount to count of paragraphs of scriptResult
if scriptLineCount > 1 then
@@ -1276,18 +1276,18 @@ on choose menu item theObject
if title of theObject ≠ "My TiVos" then
tell window "iTiVo"
try
- set theScript to "mDNS -L \"" & title of theObject & "\" _tivo-videos._tcp local | colrm 1 42 &
+ set theScript to "dns-sd -L '" & title of theObject & "' _tivo-videos._tcp local | grep 'can be reached at' | head -1 | cut -d' ' -f 8 | awk -F: '$2 == \"443\" {print $1}' &
sleep 2
-killall mDNS"
- set hostList to paragraphs 1 thru -1 of (do shell script theScript)
- repeat with j in hostList
- try
- if text 17 thru 19 of j is "443" then
- set IPA to first word of j
- set contents of text field "IP" to IPA
- end if
- end try
- end repeat
+killall dns-sd"
+ my debug_log("script: " & theScript)
+ set dnsSDName to paragraphs 1 thru -1 of (do shell script theScript)
+ my debug_log("dnsSDName: " & dnsSDName)
+ set theScript to "ping -c 1 " & dnsSDName & "| grep PING | cut -d'(' -f 2 | cut -d')' -f 1"
+ my debug_log("script: " & theScript)
+ set hostIP to paragraphs 1 thru -1 of (do shell script theScript)
+ my debug_log("hostIP: " & hostIP)
+
+ set contents of text field "IP" to hostIP
set filterValue to ""
set contents of text field "filterField" of box "topBox" of split view "splitView1" to filterValue
my ConnectTiVo()
Powered by
Google Project Hosting