Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle fileopen if running (second run) #12821

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@HofiOne
Copy link
Contributor

commented Sep 21, 2017

Description

Added the following features:

  • accept media file open requests and replace the current playlist with a new one even if the app already started
  • two new Finder service items, "Enqueue next in Kodi", "Enqueue last in Kodi" to modify the current playlists without replacing it
  • ability to accept file drag and drop onto application icon
  • listing Kodi in "Open with..." Finder context menu for common media file types

Motivation and Context

Kodi Mac does not allow modifying or replacing the current playlist once the app has started.

How Has This Been Tested?

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed

@HofiOne HofiOne referenced this pull request Sep 21, 2017

Closed

Handle fileopen if running #11709

3 of 9 tasks complete
@Rechi

This comment has been minimized.

Copy link
Member

commented Sep 27, 2017

@HofiOne please update your changes to fit our coding style.
Especially take a look at brackets (https://codedocs.xyz/xbmc/xbmc/code_guidelines.html#code_guidelines_2).

@Rechi

This comment has been minimized.

Copy link
Member

commented Nov 6, 2017

@HofiOne rebase on xbmc/master if you want the latest changes from it in your feature branch, but never ever merge master into a feature branch.

@HofiOne

This comment has been minimized.

Copy link
Contributor Author

commented Nov 6, 2017

ok, it seems that rebase does not work the way it should be from sourcetree, i have to switch to the command line only

@HofiOne HofiOne force-pushed the HofiOne:Handle-fileopen-if-running-2 branch from 91df1d3 to 8280d80 Nov 6, 2017

@HofiOne

This comment has been minimized.

Copy link
Contributor Author

commented Nov 6, 2017

@Rechi about the coding style, in most of the touched files (and others too i saw earlier) there are mixed styles already, even within the files and more often between different files, what style to follow this way?

@Rechi

This comment has been minimized.

Copy link
Member

commented Nov 7, 2017

It doesn't matter what styles are currently used in the files, the correct coding style is described at https://codedocs.xyz/xbmc/xbmc/code_guidelines.html#code_guidelines_2.
Only exception is, changing a few lines in an already existing function, then you can keep the original indentation to keep it readable.

@Rechi Rechi force-pushed the HofiOne:Handle-fileopen-if-running-2 branch 2 times, most recently from e2048eb to 5cffb6b Mar 27, 2018

@Rechi Rechi force-pushed the HofiOne:Handle-fileopen-if-running-2 branch from 5cffb6b to 5239806 Apr 10, 2018

@Rechi Rechi force-pushed the HofiOne:Handle-fileopen-if-running-2 branch from 5239806 to 7fc5779 May 17, 2018

@Rechi Rechi force-pushed the HofiOne:Handle-fileopen-if-running-2 branch from 7fc5779 to f9d9f49 Jun 10, 2018

@Rechi Rechi requested review from FernetMenta and Memphiz Jun 10, 2018

NSURL* foundURL = [NSURL URLWithString:substringForMatch];
NSString* fileName = nil;

if (foundURL.isFileReferenceURL || [foundURL.scheme caseInsensitiveCompare:@"file"] == NSOrderedSame) // Already a file system path URL

This comment has been minimized.

Copy link
@Memphiz

Memphiz Jun 10, 2018

Member

This code is the same as in the else branch or am I blind?

@Memphiz

This comment has been minimized.

Copy link
Member

commented Jun 10, 2018

I would like to have this as at least 4 separated commits.

  1. Info plist change for accepting the media
  2. Info plist change for added menu entries
  3. that free after SDl Main
  4. the whole enqueue features

In case you spot some sane possibility to split the 4th commit even more this would be welcome aswell- but not mandatory.

Beside that - nice work man :)

fileName = foundURL.path;
else
{
foundURL = [NSURL fileURLWithPath:substringForMatch];

This comment has been minimized.

Copy link
@HofiOne

HofiOne Jun 11, 2018

Author Contributor

@Memphiz It's been a decade i've added this and at the first sight even i could not spot the difference
this is the difference, first trying to look for a match using URLWithString: second time it uses fileURLWithPath:

Handle fileopen if running
- Added support of opening media files even if Kodi already running that have been ignored earlier
- Instead of replacing always the current playlist in Kodi now we can add media files to playlist queue
- Add Enqueue next/last in Kodi services menu items
- Add media file handling support for "Open with ..." in Finder for common file types/extensions

@Rechi Rechi force-pushed the HofiOne:Handle-fileopen-if-running-2 branch from f9d9f49 to 33881d4 Sep 27, 2018

@jenkins4kodi

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2018

@HofiOne this needs a rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.