Commit Graph

388 Commits

Author SHA1 Message Date
DoomMortal ebae33755c AndroidX migration
Migration to AndroidX
- Update to API level 29
- Update Java sourcecode and xml import statements
- Upgrade Butterknife Version 10 AndroidX support
- Set Java 8 compile options due Butterknife needs it
2020-04-26 19:13:07 +02:00
H. Lehmann a16cf771ee
Do not set download button state when cancelling download (#731) 2020-04-25 10:03:58 +01:00
H. Lehmann 937008a4bd
Remember last-used tab (#730) 2020-04-21 19:35:19 +01:00
Michael Bien 571e3ceae8
Uri encoding for local filenames. (#710)
* Uri encoding for local filenames. Kodi should now be able to play http-served files with spaces or other special characters in their name.

* Uri encoding for local files served with "share with Kore".
2020-02-20 19:54:35 +00:00
Martijn Brekhof e63fd40d9f
Issue/play from here (#713)
* Fixes race condition in MediaFileListFragment

The "Play from here" feature previously queued all songs at once using
a loop and did not wait until an add action was confirmed by Kodi
before queueing the next item. This sometimes resulted in a seemingly
random play order on Kodi.

* Fixed play from here adding first item twice

When selecting "Play from here" in the file browser the current
item is started using "playMediaFile" and the subsequent items
 are queued. However, the current item was added to the queue
list as well. Resulting in the first item always being added twice
to the playlist.
2020-02-20 19:53:00 +00:00
Martijn Brekhof 33043396b8
Fixed OutOfBounds exception (#708)
This fixes an array out of bounds exception when the playlist is cleared
and the PlaylistFragment.playlistsAvailable is called with an empty
list.
2020-02-13 08:46:12 +00:00
alexander 1977600a54 Added ability to play media files locally (#125) 2020-02-04 20:34:13 +01:00
Selaron dd53f621e5 Implemented search field for PVR views
* Implemented search field for PVR views. (#695)
* Implemented search field for PVRChannelEPGListFragment. (#695)
2019-12-22 15:52:36 +00:00
Selaron a3ed983fee Allow sorting of PVR Recordings and optionally hide watched items. (#694)
* Added menu options to PVR recordings view fragment: Sorting and hide_watched option.
Default to unsorted (showing the order delivered by Kodi). Default to not hide watched recordings. (#385)

* Implemented sorting and filtering of PVR recordings as per user's selection. (#385)
2019-12-17 19:34:42 +00:00
Francesco Bonazzi 37ef130a7c Share local files - part 2 (#693)
* Local media files (image, audio, video) can now be shared with Kore. Added token to HttpApp to improve security.

* Added 'Queue on Kodi' share option. 'Play on Kodi' skips the playlist while 'Queue on Kodi' puts the media link at the end of the playlist
2019-12-16 18:37:46 +00:00
Synced Synapse 5d0969c66e Fix preferences saving of nav drawer and bottom bar shortcuts
Preferences for the Nav Drawer and Bottom Bar shortcuts weren't being properly saved. This fixes that and also fixes the order or the Navigation Drawer items, after the addition of the Local Files option.
2019-12-08 20:12:08 +01:00
Francesco Bonazzi b14524963f Stream local files with NanoHTTPD server (#681)
Added local file browser. NanoHTTPD is used to create a local HTTP server to allow to stream files stored on in Android device to Kodi. Added support for multiple local files streaming.
2019-12-03 18:17:19 +00:00
Martijn Brekhof 83527db928 Fixed issue setting preferred locale in Settings (#689)
SettingsActivity does not inherit from BaseActivity which caused
the preferred locale not to be set. This was not apparent when
switching to the Settings screen as the preferred locale would
already have been set by a previous activity which does inherit
from BaseActivity (e.g. RemoteActivity). Therefore we needed
to explicitly set the preferred locale as well in SettingsActivity.
2019-12-02 19:15:52 +00:00
Synced Synapse b962fece80 Apply markup decoding to media file list and addon content list 2019-11-30 19:54:59 +01:00
Martijn Brekhof 41b9f33cd2 Implemented changing language in-app (#680)
This allows users to use a different supported locale than the one that
matches the device's locale.
2019-11-15 18:11:21 +00:00
Nick Grimshaw f91d799823 Fix issue with showing multiple bookmarked addons (#678) 2019-10-14 17:58:40 +01:00
Jordane Quincy 1ea54b8d7f Add color support to UIUtils.applyMarkup (#667) 2019-10-07 15:14:48 +01:00
Synced Synapse 7dfd982643 Tweak connection threads
This PR fixes some issues with connections and threading. Specifically, the  change in #618 introduced threading in `HostConnection`, which had some issues. To fix them, the following changes were made:
- A specific TCP listener thread is used and manually started, instead of using one of the threads in the pool. The TCP listener thread is a long lived thread that should always be running (as long as the connection is through TCP), blocked listening on the TCP socket, so it shouldn't be managed in a pool, where, theoretically, it can be paused and reused. 
- Changed the number of threads to 5. We shouldn't need more than this, otherwise we can overwhelm some Kodi hardware.
- Had to sprinkle some `synchronized` to avoid race conditions. For instance, through a TCP connection, as soon as Kore is opened (on the remote screen) it will call at least `GetActivePlayers`, `GetProperties`, `Ping`. If the TCP socket isn't set up yet, each of these calls would create a socket (and a TCP listener thread), so we would open 3 or more sockets when we should just open 1. A `synchronized` in `executeThroughTcp` prevents this. The others prevent similar issues.

Aditionally:
- Tweaked the playlist fetching code, so that it happens exclusively in `HostConnectionObserver` and when PlaylistFragment is notified of changes, it already gets the playlist data. This somewhat simplifies the code, and makes it more consistent with the Player Observer code;
- Change `EventServerConnection` to accept a Handler on which to post the result of the connection, so that the caller can control on which thread the result is called;
- Calls to the various `RegisterObserver` loose the reply immediately parameter, as it was always true.
2019-09-28 22:10:04 +02:00
Jay Linski 8e0176e326 Support sharing SoundCloud tracks (#671) 2019-09-07 12:28:51 +01:00
Synced Synapse 795e45fc52 Fix field id in view 2019-07-11 12:39:55 +02:00
wbarnard fd2d1359ac Add sort by year section thumb text (#659) 2019-07-10 18:57:14 +01:00
Martijn Brekhof 3b2447607b Implemented support for handling multiple playlists in tests (#657)
Added support for handling multiple playlists in the Mock TCP server.
Refactored SlideUpPanelTests to support the new playlist handler.

Some code cleanup and enhancements
- Removed throw exception declarations from methods that never throw the exception.
- Changed deleting the test database on the test device to delete all databases.
  The former method of only deleting the test database resulted in many old databases
  that were not removed when the test run crashed.
- Enhanced robustness of testing async code by explicitly waiting for a view
  to reach a certain state.
2019-07-03 18:54:51 +01:00
wbarnard 1020b8b7de Fix invisible media details in info fragment (#656) 2019-07-03 18:41:21 +01:00
Synced Synapse a2e4362564 Fix addons content sort
Don't specify a sort method in the listing of addon contents, so that the addon can sort its contents as it sees fit.
2019-07-01 20:57:53 +02:00
wbarnard 4043883a8a Add sort by year option for albums (#649) 2019-06-30 12:38:16 +01:00
Synced Synapse 87a18cfe51 Don't sync TV Shows that have no episodes
After a library clean operation on Kodi, if a TV Show that was previously present is absent it is still returned in a call to `VideoLibrary.GetTVShows` with 0 episodes. Kore shouldn't consider these TV Shows, as they have no episodes.
2019-06-20 19:32:34 +02:00
Synced Synapse c68235fcfc Tweak Themes
Use more consistent color Schemes
2019-05-21 20:51:21 +02:00
Synced Synapse c7fef43deb Fix ANR in service launch
Some ANRs are reported on Google Play. This is an atempt to remove them, by making sure that `startForeground` is always called when the service starts.
2019-05-14 22:06:34 +02:00
ssaqua 53e1a62afe Refactor marquee setup for multi-line TextViews 2019-04-20 22:17:11 +02:00
ssaqua 2706210cef Set ellipsize and horizontally scrolling state based on selected state 2019-04-20 22:17:11 +02:00
ssaqua ce210e9683 Implement scrolling title on now playing and general media info screens 2019-04-20 22:17:11 +02:00
Martijn Brekhof 4dda3ac6e8 Improved performance in SquareGridLayout (#631) 2019-04-07 13:28:32 +01:00
Martijn Brekhof cdbdd98d6a Implemented showing playlists even when not playing (#618)
Implemented showing a music/video/picture playlist in PlaylistFragment even
when playback has stopped but the playlist is still available on Kodi.
The playlist is now only cleared if the Playlist.OnClear event is received
from Kodi.

As the pictures playlist does not support moving/removing items this has
been disabled for the pictures playlist only.

Added a new package org.xbmc.kore.host.actions to hold all Callable's that
we use to handle complex interactions with Kodi that use multiple JSON RPC
calls.

Fixed issue in HostConnectionObserver in method notifySomethingIsPlaying
where hostState.lastGetItemResult.label might not be set.

Reduced calling (force)refreshPlaylist considerably as it should now be
handled by the playlist observer.
2019-03-30 11:08:58 +00:00
Synced Synapse 46d4b5ffe1 Use standard media style notifications
Use the standard media style notifications instead of the custom one
2019-03-21 19:54:01 +01:00
Synced Synapse fb03153365 Tweak movie list items 2019-03-01 21:04:20 +01:00
Martijn Brekhof 00fe2d49a5 Added movie ratings to movie listview items (#613)
Redesigning rate text to a five star rating bar.
2019-02-26 20:08:46 +00:00
Synced Synapse b824930d8e Tweak periodic checking Kodi version 2019-02-08 22:30:48 +01:00
Synced Synapse c043c04264 Add support for OnAVStart event and tweak HostConnectionOberver 2019-02-08 22:30:48 +01:00
Martijn Brekhof e60df7e8ac Fixed issue with registering observers multiple times (#605)
Registering observers would cause the runnables to be
posted multiple times to the checkerHandler. This resulted
in callbacks being called more than once when a result was
received.
2019-02-07 16:39:56 +00:00
Martijn Brekhof 410169e802 Implemented scrolling title on remote control screen (#612)
When the title is longer than fits on screen, it wil first be ellipsized
and when user clicks on the title it will start scrolling to make it
fully readable.
2019-01-14 10:59:07 +00:00
Synced Synapse f7a63ae9a7 Add fastscroll to lists with RecyclerView 2019-01-12 14:26:36 +01:00
Erik Rudisch 2693d62702 Add addons search 2018-12-27 16:21:07 +00:00
Synced Synapse b281462f9d Fix PVR bottom bar shortcut behaviour 2018-10-27 20:53:15 +02:00
Tomer Froumin e2bb7d7c55 Support local play when Kodi requires authentication 2018-09-27 03:12:45 +02:00
Tomer Froumin f774f42700 Addon list improvements (#575)
* Added disabled indicator on addon list

* Added menu options to hide disabled addons

* Code review changes
2018-09-14 16:59:17 +01:00
Dan Pasanen 456ac6a107 Use a ChooserTargetService to direct a shared url to a specific host (#572)
* This gives the user a choice of their hosts to share a url to.
* Sadly the youtube app doesn't appear to support this. It wants to
  use some sort of crappy "Message on Youtube" thing rather than using
  standard android stuff (go figure). It does, however, work from a
  chrome browser of the youtube video, or likely any other supported
  share.
2018-09-14 16:47:51 +01:00
Martijn Brekhof 3c7c4afea7 Fixed clearing focus on search view 2018-09-09 14:09:59 +01:00
Martijn Brekhof 9999f37869 Fixed searchClickBackTest for MoviesActivity tests 2018-09-09 14:09:59 +01:00
Martijn Brekhof d634d9455e Refactored instrumentation tests to support RecyclerViews
* Fixed Espresso not waiting on ViewPager switching
* Removed BaseMediaActivityTests abstract class.
  Unfortunately the click action on list items now requires
  a unique item to be able to select the item to click.
  Therefore the tests from BaseMediaActivityTests have been
  moved to the specific test classes. This made the
  BaseMediaActivityTests class obsolete.
* Removed dependency on Context class in AddonsHandler and inlined
  the json data to allow the AddonsHandler to be initialized before
  the test activity is started. This was needed to have the
  AddonsActivityTests directly start the AddonsActivity, instead of
  first starting MoviesActivity and from there start the AddonsActivity.
2018-09-09 14:09:59 +01:00
Martijn Brekhof 3f5ccefe2e Refactored ListView into RecycleView
Implemented custom RecyclerView to support using an empty view and a
    auto fitted grid layout.

    Reenabled shared element transitions for Oreo
2018-09-01 16:44:10 +02:00