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.
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.
* 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.
Hitting the back button in the remote activity was being ignored, thus preventing exiting the app. This issue was inadvertidely introduced in d11dbe6853
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.
Refactored MusicListFragment and PVRListFragment to use AbstractTabsFragment
Fixed scrolling in a nested scroll view using espresso
Fixed issue with setting and checking Kodi major version
As detailed in https://github.com/xbmc/xbmc/pull/13051, Kodi v18 changes the way album genres are handled, as the genre (by which i mean `genreId`) ceases to be available at the album level, being only available at the songs level.
This impacts Kore because `GetAlbums` and `GetAlbumDetails` won't return the `genreId` tag, from which the local AlbumGenres table was populated.
This PR changes the source of the local AlbumGenres table to be the `genreId` returned at the song level (by `GetSongs`), to make it somewhat more consistent with the way Kodi will handle things from now on.
There's no need to have so many classes to handle the hardware volume keys. This PR simplifies it, without duplicating any more code than was already duplicated.
- added method to HostConnection that returns a Future object instead of
taking a callback.
- added logic for handling null Handlers in HostConnection methods
- added method to HostManager to run a function that takes a HostConnection
in a background thread where the Future API results above can be
synchronously composed.
- replaced chain of callbacks in RemoteActivity with a sequence of
future gets in OpenSharedUrl.
Whan the background service is launcher, it is launched on the foreground and a notification is always shown.
The service stays on while something is playing. It stops itself on a connection error, quitting Kodi or 5 seconds after stopping
Make the Pause Phone Calls preference dependent on the Show Notification preference, as we always need to show a notification when the service is running
* Refactored RemoteFragment and created a compound view for the
actual remote. I called it ControlPad to make it more clear what
its main function is.
* Implemented a custom grid layout (SquareGridLayout) that will
always be square. When its width and height are both set to
match_parent, it will take the smallest of the two as the
actual size.
* For devices with a smallest width smaller then 360dp the ControlPad
is sized to the maximum available space. For larger devices we still
use the old fixed sizes.
Refactored code to use styles
* Implemented simple Kodi markup code applier for the Now Playing fragment
* Moved to UIUtils; added early exit; now handles nesting of the same type
* Added handlers for LOWERCASE, CAPITALIZE, LIGHT and COLOR
- LOWERCASE and CAPITALIZE work, LIGHT and COLOR are just stripped out
- inlined the TextAppearanceSpan new's. Turns out they can't be reused.
* updated javadoc
* fixed crash when capitalizing an empty word
* Allow the RemoteActivity and BaseMediaActivity to show a volume controller dialog when hardware volume keys are pressed
** The dialog handles the key events and makes callbacks to the activities to handle showing the dialog itself
* Minor improvements
** Make HighlightButton render in the IDE GUI Editor
** Minor code cleanup
** set currentActivePlayerId = -1; on playerOnStop in BaseMediaActivity to be more consistent
resolvesxbmc/Kore#235
* Refactored RemoteFragment and created a compound view for the
actual remote. I called it ControlPad to make it more clear what
its main function is.
* Implemented a custom grid layout (SquareGridLayout) that will
always be square. When its width and height are both set to
match_parent, it will take the smallest of the two as the
actual size.
* For devices with a smallest width smaller then 360dp the ControlPad
is sized to the maximum available space. For larger devices we still
use the old fixed sizes.
* The slideup panel is only displayed when something is
playing. It starts collapsed showing the media poster
and title of what is currently playing.
* Media controls implemented are volume, progress, shuffle,
repeat and play/pause for all items. Next and previous are only
available when a music item is playing.
* In collapsed mode the panel will display the mute button only
if Kodi is muted. The mute button in expanded mode is always
visible.
* Panel is enabled by default. Users can disable the panel
in Settings
* Implemented listening to Player.OnPropertyChanged notifications
to update shuffle and repeat button states.
* Add support for sharing SVTplay urls to "Play on Kodi".
SVTplay is a free streaming service provided by the Swedish national television SVT.
This feature requires the svtplay video plugin on Kodi.
* Fix SVTplay share always playing first episode of series.
* Changed platform AlertDialogs and preference.* to support lib counterparts
- added dependencies: support/preference-v7 for PreferenceFragmentCompat
and Preference subclasses, support/preference-v14 for the
MultiSelectListPreference
- simplified some AlertDialog.Builder calls and added non-null annotations
to DialogFragment#onCreateDialog(Bundle) overrides to shut the IDE up
- UIUtils: changed static member avatarColorsIdx to local var because it's
only used in one place and the value isn't cached
- layout/dialog_send_text: removed view vertical margins as they take
way too much space for nothing.
- strings: shortened english preference titles
- themes: added PrefTheme and changed preference title font size to medium
from large
- preferences: changed CheckBoxPreference to SwitchPreferenceCompat. these
don't have the same issue described in #233 (tested in kitkat).
* Changed platform PreferenceManager in RemoteActivity to support pref
* Fixed M permissions
* Split prefs into 2 groups as per material design guidelines
* Changed prefs theme to v14.material
* Moved container padding to individual prefs; removed pref-v7 dependency
- this makes the item dividers touch the screen edges which i think looks
better
- don't need to require preference-v7 because preference-v14 already
does
* Moved PrefTheme attributes *{Start,End} to v17 override
* Fixed crash caused by rotating twice while a dialog is active
* Changed wording as suggested