]> granicus.if.org Git - handbrake/commitdiff
MacGui: use the bundle name as the title name for .eyetv bundles.
authorDamiano Galassi <damiog@gmail.com>
Mon, 2 Jan 2017 13:37:23 +0000 (14:37 +0100)
committerDamiano Galassi <damiog@gmail.com>
Mon, 2 Jan 2017 13:40:32 +0000 (14:40 +0100)
(cherry picked from commit 2e1ee72df99040481cc555c4452b08956e0037eb)

macosx/HBTitle.m

index 66d76efd35c8ec95c96452a0bb3c5ccd6842e528..a1a1bf92c75b53a6af5a799b15d7fc43272f465f 100644 (file)
@@ -63,6 +63,13 @@ extern NSString *keySubTrackType;
     {
         _name = @(self.hb_title->name);
 
+        // Use the bundle name for eyetv
+        NSURL *parentURL = self.url.URLByDeletingLastPathComponent;
+        if ([parentURL.pathExtension caseInsensitiveCompare:@"eyetv"] == NSOrderedSame)
+        {
+            _name = parentURL.URLByDeletingPathExtension.lastPathComponent;
+        }
+
         // If the name is empty use file/directory name
         if (_name.length == 0)
         {