Commit Graph

326 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
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
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 c68235fcfc Tweak Themes
Use more consistent color Schemes
2019-05-21 20:51:21 +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 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
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 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
Synced Synapse f985f4132d Fix back button not exiting the app when on the remote activity
Hitting the back button in the remote activity was being ignored, thus preventing exiting the app. This issue was inadvertidely introduced in d11dbe6853
2018-07-20 14:36:10 +02:00
Synced Synapse 94693cb5a5 Fix NPE on volume change by not unbinding the controls in the Volume Level Indicator too soon 2018-07-04 20:54:12 +02:00
Martijn Brekhof 36675bba47 Fix NPE when listener is attached while view is destroyed (#560) 2018-07-03 19:48:51 +01:00
Martijn Brekhof d11dbe6853 Fixes a possible race condition and starting multiple instances (#559)
The onDestroyView method is used to unregister the application observer
from the dialog. However the parent got called first which destroys the
view of the dialog. This could lead to Null Pointer Exceptions when
the listener tries to update the UI of the dialog right after it was
destroyed.

The VolumeControllerDialogFragmentListener was created twice as creation
was triggered on both the down and up event of the volume keys. This has
been changed to only trigger on down events.
2018-06-22 11:05:38 +01:00
Martijn Brekhof e0f99c93c4 Fixed NPE in the VolumeControllerDialog (#553)
The applicationObserver was never unregistered resulting in a memory leak
and even worse, crashes when destroyed dialogs still got called through
the applicationOnVolumeChanged callback.

Also changed the view resource identifiers used by the controller dialog
as it used the same resource identifiers as the now playing panel.
2018-06-09 18:47:09 +01:00
Synced Synapse 5cd60d531e Reinstante the ability to bookmark addons
Somewhere along the line, the edits made in b0f2adb876 where lost because the `AddonsActivity` was instantiating `AddonListFragment` instead of `AddonListContainerFragment`.
This PR reinstates the ability to bookmark and access addons, and refactors the way those settings were being stored in the Shared Preferences to use the default Shared Preferences and take into account the specific host we're connected to.
2018-05-10 21:24:24 +02:00
Martijn Brekhof f631efeca9 Fixed issue with running many instrumentation tests (#536)
During tests, activities were not closed properly causing increasing
memory usage, which resulted in failing tests because of
out of memory errors.
This has been fixed by using the test orchestrator which runs
each test in its own instrumentation instance.

Removed the instrumentationTest flavor and replaced it by using the
default debug build type. The flavor was used to keep the required
permissions during testing separate from release versions. This can
also be accomplished using the debug build type.

The PagerSlidingTabStrip from astuetz doesn't work with the new
android build tools. As the project seems dead, I replaced it with
PagerTabStrip from the support library.
2018-05-03 11:04:04 +01:00
Synced Synapse 75f8326fe4 Simplify sharing intent handling
Redesign ApiFuture to be more generic and independent of other classes
2018-04-24 13:36:35 +02:00