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: 0004-Move-logic-to-discover-local-TiVo-s-to-an-external-s.patch
(4.6 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
82
83
84
85
86
87
88
89
90
91
92
93
94
From bc12e6ccfa4222f11bbc86f0fde6dfe393c96384 Mon Sep 17 00:00:00 2001
From: Drew Moseley <drew@moseleynet.net>
Date: Sun, 2 Sep 2012 21:42:01 -0400
Subject: [PATCH 4/5] Move logic to discover local TiVo's to an external
script and allow the mDNS utility to not exist for
Mountain Lion
Signed-off-by: Drew Moseley <drew@moseleynet.net>
---
findLocalTivos.sh | 18 ++++++++++++++++++
iTiVo.applescript | 5 ++---
iTiVo.xcodeproj/project.pbxproj | 4 ++++
3 files changed, 24 insertions(+), 3 deletions(-)
create mode 100755 findLocalTivos.sh
diff --git a/findLocalTivos.sh b/findLocalTivos.sh
new file mode 100755
index 0000000..c19f46a
--- /dev/null
+++ b/findLocalTivos.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+
+if [ -L /usr/bin/mDNS -o ! -e /usr/bin/mDNS ]; then
+ # If it is a symlink or it doesn't exist, defer to the dns-sd command
+ # Sample output: "21:29:27.751 Add 2 5 local. _tivo-videos._tcp. HD Living Room"
+ dns-sd -B _tivo-videos._tcp local | colrm 1 79 | grep -v 'Instance Name' | sort | uniq &
+ sleep 2
+ killall dns-sd
+else
+ # Go ahead and use the mDNS executable
+ # Sample output: "21:29:33.402 Add 1 local. _tivo-videos._tcp. HD Living Room"
+ mDNS -B _tivo-videos._tcp local | colrm 1 74 | grep -v 'Instance Name' | sort | uniq &
+ sleep 2
+ killall mDNS
+fi
+
+
diff --git a/iTiVo.applescript b/iTiVo.applescript
index 8cfabf2..45eebcc 100755
--- a/iTiVo.applescript
+++ b/iTiVo.applescript
@@ -709,9 +709,8 @@ on setSettingsInUI()
end setSettingsInUI
on getTiVos()
- set theScript to "mDNS -B _tivo-videos._tcp local | colrm 1 74| grep -v 'Instance Name' |sort | uniq &
-sleep 2
-killall mDNS"
+ set myPath to my prepareCommand(POSIX path of (path to me))
+ set theScript to "sh " & myPath & "Contents/Resources/findLocalTivos.sh"
tell window "iTiVo"
my debug_log(theScript)
set scriptResult to (do shell script theScript)
diff --git a/iTiVo.xcodeproj/project.pbxproj b/iTiVo.xcodeproj/project.pbxproj
index 1b2e144..22c0efb 100755
--- a/iTiVo.xcodeproj/project.pbxproj
+++ b/iTiVo.xcodeproj/project.pbxproj
@@ -36,6 +36,7 @@
/* End PBXAppleScriptBuildPhase section */
/* Begin PBXBuildFile section */
+ 2441259D15F436B800710497 /* findLocalTivos.sh in Resources */ = {isa = PBXBuildFile; fileRef = 2441259C15F436B800710497 /* findLocalTivos.sh */; };
257572C5072881A4000BE9CA /* iTiVo.applescript in AppleScript */ = {isa = PBXBuildFile; fileRef = DA206CF3015C4E8B03C91932 /* iTiVo.applescript */; settings = {ATTRIBUTES = (Debug, ); }; };
257572C7072881A4000BE9CA /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
257572C8072881A4000BE9CA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
@@ -113,6 +114,7 @@
/* Begin PBXFileReference section */
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 2441259C15F436B800710497 /* findLocalTivos.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = findLocalTivos.sh; sourceTree = "<group>"; };
257572D5072881A4000BE9CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
257572D6072881A4000BE9CA /* iTiVo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iTiVo.app; sourceTree = BUILT_PRODUCTS_DIR; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -261,6 +263,7 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
+ 2441259C15F436B800710497 /* findLocalTivos.sh */,
5393FA6F0F425DDD0025D17A /* copyright.png */,
536575DA0EE2791800B68A56 /* empty-check.png */,
536575DB0EE2791800B68A56 /* empty.png */,
@@ -405,6 +408,7 @@
535A80C40F5A287B00F149FC /* t2sami in Resources */,
535A80C60F5A2AA000F149FC /* generate_subtitles.pl in Resources */,
535A80D70F5A3F6300F149FC /* subtitlesSize.pl in Resources */,
+ 2441259D15F436B800710497 /* findLocalTivos.sh in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
--
1.7.11.5
Powered by
Google Project Hosting