FEATURE: Bookmark Indication on Directories

Moderators: Gully, peteru

Post Reply
User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

FEATURE: Bookmark Indication on Directories

Post by MrQuade » Tue Aug 28, 2018 19:54

To quote myself from the Movie list multiple selections thread.
MrQuade wrote:
Tue Aug 28, 2018 12:16
Would it be a good idea to indicate bookmarked directories by displaying the directory's icon with a small overlaid bookmark? Would that overly slow down directory listings?
The FAV button could be used to toggle the bookmark on and off for a selected directory (the FAV label lends itself to this function). It is possibly not a frequently used enough function that merits a single button shortcut, though it may be more useful to a user who sets timer specific recording destination directories as opposed to an IceTV user such as myself?
The same suggestion works for File Commander.
and from prl
prl wrote:
Tue Aug 28, 2018 12:43
I doubt it would be much of a performance hit. I can elaborate when you start a new topic.
I was thinking something along these lines:
BM1.png
and
BM2.png
And even some sort of indication at the top of the screen where the directory name is located to show that the current directory is bookmarked.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

prl
Wizard God
Posts: 32714
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: FEATURE: Bookmark Indication on Directories

Post by prl » Wed Aug 29, 2018 10:44

prl wrote:
Tue Aug 28, 2018 12:43
I doubt it would be much of a performance hit. I can elaborate when you start a new topic.

Instead of elaboration, here's an implementation, but not of the tagging of the path in the screen title. That can be done with a similar test to the icon, but elsewhere in the code.
Screen Shot 2018-08-29 at 10.37.49.png
Screen Shot 2018-08-29 at 10.37.49.png (66.83 KiB) Viewed 834 times

Code: Select all

diff --git a/lib/python/Components/MovieList.py b/lib/python/Components/MovieList.py
index 63a14f6..91e8ab9 100644
--- a/lib/python/Components/MovieList.py
+++ b/lib/python/Components/MovieList.py
@@ -260,6 +260,7 @@ class MovieList(GUIComponent):
                self.iconUnwatched = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/part_unwatched.png"))
                self.iconFolder = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/folder.png"))
                self.iconTrash = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/trashcan.png"))
+               self.iconBookmark = LoadPixmap(resolveFilename(SCOPE_ACTIVE_SKIN, "icons/bookmark.png"))
                self.runningTimers = {}
                self.updateRecordings()
                self.updatePlayPosCache()
@@ -572,6 +573,8 @@ class MovieList(GUIComponent):
                                res.append(MultiContentEntryText(pos=(width - dateWidth - r, 0), size=(dateWidth, ih), font=1, flags=RT_HALIGN_RIGHT | RT_VALIGN_CENTER, text=_"Trash")))
                                return res
                        res.append(MultiContentEntryPixmapAlphaBlend(pos=(iconPos, self.dirShift), size=(iconSize, iconSize), png=self.iconFolder))
+                       if pathName in config.movielist.videodirs.value:
+                               res.append(MultiContentEntryPixmapAlphaBlend(pos=(iconPos, self.dirShift), size=(iconSize, iconSize), png=self.iconBookmark))
                        res.append(MultiContentEntryText(pos=(textPos, 0), size=(width - textPos - dateWidth - r, ih), font=0, flags = RT_HALIGN_LEFT | RT_VALIGN_CENTER, text=xt))
                        res.append(MultiContentEntryText(pos=(width - dateWidth - r, 0), size=(dateWidth, ih), font=1, flags=RT_HALIGN_RIGHT | RT_VALIGN_CENTER, text=_("Directry")))
                        return res
The code puts a bookmark icon on ".." if that directory is bookmarked, but not on the trashcan, even if it is bookmarked. The trashcan can be easily bookmarked if wanted, either with the same bookmark icon or one designed to go with the Trash icon.

The bookmark icon I've created is pretty rubbish. If someone wants to make a better one I'd be happy to use it.

Here's the bookmark icon I used:
bookmark.png
bookmark.png (258 Bytes) Viewed 834 times
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: FEATURE: Bookmark Indication on Directories

Post by MrQuade » Wed Aug 29, 2018 11:43

prl wrote:
Wed Aug 29, 2018 10:44
The code puts a bookmark icon on ".." if that directory is bookmarked, but not on the trashcan, even if it is bookmarked.
That's a tricky one. Technically of course that is correct, but could look a bit odd to have ".." display as bookmarked. Since the parent directory's name is not shown (even though it should be visible as part of the current directory's path), having visual feedback of its bookmarked status might be confusing to some users.

To prevent ambiguity I would suggest that ".." not be bookmarked, nor be allowed to have its bookmark toggled via the hotkey. But that is just my take on it.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: FEATURE: Bookmark Indication on Directories

Post by adoxa » Wed Aug 29, 2018 13:24

Here's a plugin to implement prl's code, albeit with no bookmark indicator for ...

Drop the .tgz and install as normal ("Install extensions" or through FC is recommended, not the command line). It takes effect immediately, no restart required.
Attachments
enigma2-plugin-extensions-Bookmarker_1_all.ipk.tgz
(2.27 KiB) Downloaded 25 times

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: FEATURE: Bookmark Indication on Directories

Post by MrQuade » Wed Aug 29, 2018 23:38

Yep, certainly did the job of showing the bookmarked directories.

Is Filecommander bookmark aware or would this be a silly feature to have the as well?

Also, does anyone think it is worth mapping FAV to toggle the bookmark on the selected directory?
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: FEATURE: Bookmark Indication on Directories

Post by adoxa » Thu Aug 30, 2018 00:34

MrQuade wrote:
Wed Aug 29, 2018 23:38
Is Filecommander bookmark aware or would this be a silly feature to have the as well?
Not as yet, I only did what prl supplied. I have a submission that gives FC its own bookmarks, too, so if that's accepted there'd potentially be two sets of bookmarks.
Also, does anyone think it is worth mapping FAV to toggle the bookmark on the selected directory?
Not personally (all my bookmarks are indirect, as a result of move), but I don't really have anything against it, either. Although, now that I think of it, using FAV might sometimes be easier than going through MEDIA (especially to remove). If prl doesn't do anything in the next couple of days, I shall.

prl
Wizard God
Posts: 32714
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: FEATURE: Bookmark Indication on Directories

Post by prl » Thu Aug 30, 2018 10:24

MrQuade wrote:
Wed Aug 29, 2018 23:38
Is Filecommander bookmark aware or would this be a silly feature to have the as well?

As adoxa said, he has a pull request current to add bookmarks to File Commander. To have them displayed in the File Commander file lists would need a similar change to the File Commander code as was made to MovieList. It's easy to do, but not yet done.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32714
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: FEATURE: Bookmark Indication on Directories

Post by prl » Thu Aug 30, 2018 10:32

adoxa wrote:
Thu Aug 30, 2018 00:34
Not personally (all my bookmarks are indirect, as a result of move), but I don't really have anything against it, either. Although, now that I think of it, using FAV might sometimes be easier than going through MEDIA (especially to remove). If prl doesn't do anything in the next couple of days, I shall.

I don't intend to do any more on this one. I'll leave it to you.

Are you still going to add some sort of flagging in the MovieSelection title to indicate that the current directory is bookmarked?

Something like this in MovieSelection.updateTitle(), perhaps:

Code: Select all

		if config.movielist.last_videodir.value in config.movielist.videodirs.value:
			title += " " + _("(Bookmarked)")
[untested]
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32714
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: FEATURE: Bookmark Indication on Directories

Post by prl » Thu Aug 30, 2018 10:35

adoxa wrote:
Thu Aug 30, 2018 00:34
MrQuade wrote:
Wed Aug 29, 2018 23:38
Also, does anyone think it is worth mapping FAV to toggle the bookmark on the selected directory?
Not personally (all my bookmarks are indirect, as a result of move), but I don't really have anything against it, either. Although, now that I think of it, using FAV might sometimes be easier than going through MEDIA (especially to remove). If prl doesn't do anything in the next couple of days, I shall.

I think it should be either added or not added. I don't think there's much point to making it switchable (I don't think there's much point to it anyway).
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: FEATURE: Bookmark Indication on Directories

Post by adoxa » Thu Aug 30, 2018 12:59

I'm not sure. For my usage, it would be better if deleting a directory also deleted its bookmark (hm, but it's entirely possible the directory would get created again, so you'd want to preserve the bookmark). Unless someone could create a more subtle icon (perhaps a star that sits on the folder) it'd also need an option to turn it off (I really don't like how it looks atm, although it should possibly be optional anyway). I don't really see a need to have an indicator for the current directory. FAV could probably be done irregardless.

To summarise:
  1. it needs a better icon;
  2. it may want an option to show that icon;
  3. is there a need to indicate the current directory is bookmarked?
  4. FAV would always toggle a directory's bookmark, irrespective of the icon (use action feedback if there's no icon);
  5. FC may need two icons, to distinguish between movie bookmarks and its own (should that be accepted).
2 depends on 1, in that with a more subtle icon there should be no problem in always displaying it.
3 is open to suggestion (I think not; I'm not in favour of "(Bookmarked)", I think an asterisk/icon before it might be better: "* Home").
4 I might just do anyway (for my FC bookmarks, too).
5 I probably won't do.

IanSav
Uber Wizard
Posts: 16846
Joined: Tue May 29, 2007 15:00
Location: Melbourne, Australia

Re: FEATURE: Bookmark Indication on Directories

Post by IanSav » Thu Aug 30, 2018 13:07

Hi,

While I also don't really see the benefit of this change/"feature" I did want to offer a better overlay image. This has a high contrast border and is a little taller to make the bookmark stand out on any image upon which it is overlaid.

Regards,
Ian.
Attachments
bookmark.png
Proposed bookmark overlay image.
bookmark.png (126 Bytes) Viewed 741 times
Last edited by IanSav on Thu Aug 30, 2018 13:10, edited 1 time in total.

IanSav
Uber Wizard
Posts: 16846
Joined: Tue May 29, 2007 15:00
Location: Melbourne, Australia

Re: FEATURE: Bookmark Indication on Directories

Post by IanSav » Thu Aug 30, 2018 13:10

Hi Adoxa,

"*" is used as a footnote indicator. Unless you provide footnote text associated with the use of "*" don't use it.

Regards,
Ian.

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: FEATURE: Bookmark Indication on Directories

Post by MrQuade » Thu Aug 30, 2018 13:18

adoxa wrote:
Thu Aug 30, 2018 12:59
To summarise:
it needs a better icon;
Yea, I was considering a star as well, seeing as that is the symbol used on some of the remotes for the FAV button.
The concept to use a literal bookmark was based on more generic bookmark icons like this one.
folder-55-512.png
folder-55-512.png (14.39 KiB) Viewed 738 times
adoxa wrote:
Thu Aug 30, 2018 12:59
it may want an option to show that icon;
Yep, some people may not want to see an icon.
Maybe an option that could choose a style as well as off? "Bookmark"/"Star"/"None"?
adoxa wrote:
Thu Aug 30, 2018 12:59
is there a need to indicate the current directory is bookmarked?
I thought that might be worth showing seeing as there is an option in the MENU popup to add and remove the bookmark from the current directory.
On that note, the wording of that option could change to make it less ambiguous too.
Instead of simply "Add bookmark" it could read "Bookmark current directory" (and conversely "Remove bookmark from current directory", though that is long-winded)
adoxa wrote:
Thu Aug 30, 2018 12:59
FAV would always toggle a directory's bookmark, irrespective of the icon (use action feedback if there's no icon);
Definitely needs some sort of feedback.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

prl
Wizard God
Posts: 32714
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: FEATURE: Bookmark Indication on Directories

Post by prl » Thu Aug 30, 2018 17:10

IanSav wrote:
Thu Aug 30, 2018 13:07
I [wanted to] to offer a better overlay image. This has a high contrast border and is a little taller to make the bookmark stand out on any image upon which it is overlaid.

Regards,
Ian.

The top edge of the front of the "folder" icon where I "hang" the bookmark isn't horizontal, while the top of your bookmark (while better in all other respects to my quick effort) is not.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32714
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: FEATURE: Bookmark Indication on Directories

Post by prl » Thu Aug 30, 2018 17:19

MrQuade wrote:
Thu Aug 30, 2018 13:18
On that note, the wording of that option could change to make it less ambiguous too.
Instead of simply "Add bookmark" it could read "Bookmark current directory" (and conversely "Remove bookmark from current directory", though that is long-winded)

Is "Unbookmark current directory" too ugly? Is "Unmark current directory" too ambiguous?
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32714
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: FEATURE: Bookmark Indication on Directories

Post by prl » Thu Aug 30, 2018 17:22

adoxa wrote:
Thu Aug 30, 2018 12:59
To summarise:
  1. it needs a better icon;

Definitely. I said as much when I posted mine. IanSav's looks pretty good apart from the top edge.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
Gully
Moderator
Posts: 7736
Joined: Thu Aug 30, 2007 22:08
Location: Melbourne

Re: FEATURE: Bookmark Indication on Directories

Post by Gully » Thu Aug 30, 2018 17:44

prl wrote:
Thu Aug 30, 2018 17:19
MrQuade wrote:
Thu Aug 30, 2018 13:18
On that note, the wording of that option could change to make it less ambiguous too.
Instead of simply "Add bookmark" it could read "Bookmark current directory" (and conversely "Remove bookmark from current directory", though that is long-winded)

Is "Unbookmark current directory" too ugly? Is "Unmark current directory" too ambiguous?
Not sure either are great.

Is "Add/Remove Bookmark" really that problematic/ambiguous? Keeps it short and simple.
Cheers
Gully
_____________
Beyonwiz U4
Logitech Harmony Elite
Google Pixel 6 Pro

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: FEATURE: Bookmark Indication on Directories

Post by MrQuade » Thu Aug 30, 2018 18:28

Gully wrote:
Thu Aug 30, 2018 17:44
Is "Add/Remove Bookmark" really that problematic/ambiguous? Keeps it short and simple.
I guess the problem as I saw it, was that when I read that, it doesn't tell me if I am adding the bookmark to the current directory or the selected directory.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

prl
Wizard God
Posts: 32714
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: FEATURE: Bookmark Indication on Directories

Post by prl » Thu Aug 30, 2018 18:31

MrQuade wrote:
Thu Aug 30, 2018 18:28
Gully wrote:
Thu Aug 30, 2018 17:44
Is "Add/Remove Bookmark" really that problematic/ambiguous? Keeps it short and simple.
I guess the problem as I saw it, was that when I read that, it doesn't tell me if I am adding the bookmark to the current directory or the selected directory.

I agree.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

IanSav
Uber Wizard
Posts: 16846
Joined: Tue May 29, 2007 15:00
Location: Melbourne, Australia

Re: FEATURE: Bookmark Indication on Directories

Post by IanSav » Thu Aug 30, 2018 19:11

Hi Prl,
prl wrote:
Thu Aug 30, 2018 17:10
The top edge of the front of the "folder" icon where I "hang" the bookmark isn't horizontal, while the top of your bookmark (while better in all other respects to my quick effort) is not.
I didn't even try to match the top of the folder icon. ;) I gather that this is a preference. I will have another go when I submit some requested changes to my OpenViX and OpenPLi developments. (Working on three images with three different teams is very time consuming.)

Regards,
Ian.

Post Reply

Return to “Bug Reporting and Feature Requests”