INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Audiobooks - Having subtle visuals marker added to chapter/files in the playlist  (Read 4753 times)

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

I've just been adding some audiobooks for the first time and have read and setup the audiobooks to remember the place where I stopped and closed MC.  When I re-open MC and press play it resumes which is great. But if I change to another playlist, say some music and then come back later to the all audio books playlist, the list just starts playing from item #1 in the list.   I often completely forget which chapter in X or Y book I am at.  The resume playback works only if you resume that chapters file. It does not appear to go direct to that last played files position when you choose the playlist.

So I thought, would some way of visually bookmarking in the playlist by a simple right click context menu option to highlight in a nice way that file/chapter so I can then come back to the playlist later and easily see where I was in that particular audiobook.  I have a dozen or so audiobooks in that one playlist so the option to add many visual markers in different soft colours would be a good option.  

Not just background colours right across that item in the playlist but a more subtle colour highlighting, maybe a soft gradient/fade out under the top edge of the item.  MC could choose random colours not already in use on that playlist,  or offer the option to choose colors.  the later might be better to accommodate everyone's different skins and playlist backgrounds.   I use Black on Black,  so a nice subtle drop down faded out hightlight color would be good, just under the top edge of the playlist item.

when I come back to my audiobook playlist,  I often have no idea which chapter/file I was last at.  A visual marker I can add, and then remove would be great. Maybe options for markers to be added automatically somehow based on some rules if one wanted to go more advanced.  But I would personally like to add the marker by right clicking and choosing add bookmark.  Then MC chooses a random not used colour.   But I would like it to somehow remove the bookmark at the end of that chapter/file.    Maybe the option to auto remove, or drop down to the chapter below when the chapter/file changes...and so on.

does any of this make sense. Or is there something already implemented to show a visual bookmarks,  more than one in each playlist.   Very useful I would of thought for a playlist full of different audiobooks and for visually showing you where you last were in each book if they have multiple chapter files as 90% of mine do.
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732

The easiest way by far to do this is the new "check box" custom field.   Just make a bookmark field, check it when you exit and it'll stay checked until you uncheck it
Logged

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

The easiest way by far to do this is the new "check box" custom field.   Just make a bookmark field, check it when you exit and it'll stay checked until you uncheck it

I'm afraid I don't know what referring to.  Is it a visual bookmark.  Could you point me to where I find this please.
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353

Try replacing the Name column with an Expression Column using the following code:
 
Code: (Name) [Select]
If(IsEqual([Media Sub Type], Audiobook, 1),
If(IsRange(PadNumber(Math(round(([Bookmark] / ([Duration, 0] * 1000)) * 100)),2), 10-90),
Delimit([Name],<//b><//font>,<font color="FF0000"><b>),
[Name]),
[Name])

Edit the Delimit() line if you want to change the formatting.
I just used red (HTML FF0000) so that it stood out.
 
The 10-90 at the end of the second line sets the percentage played which will highlight the current file. (i.e. anything in the range of 10-90% will be highlighted)
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732

good one 6233638!

for the checkboxes, go into tool>options>library & folders>...manage library fields (i called mine 1book to show you)

at the bottom left, click 'add new field'.  in 'edit type', change it to 'check'

in your chosen view, add '1book' to your view, and you'll see it there (see screenshot)

it's visual, right now you'll have to manually check/uncheck, but because this is a calculated field you could make a whole series of complex expressions and stuff to make it do things automatically...
Logged

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

ferday -  thanks,  yes I've found and tested out a checkbox.  Not visual enough for me though.   But now I know, so thank you.  

6233638 -  I'm always amazed at the things that can be done,  this sort of thing is far beyond my understanding.

I'll give it a go.  I added an expression column and pasted your code, but am not seeing anything.  If I play the audiobook file and advance position to within 10-90% I see no red highlight, or stop playback within that range..   I'm using the black on black skin.  So the dark playlist background.
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353

6233638 -   I added an expression column and pasted your code, but am not seeing anything.  If I play the audiobook file and advance position to within 10-90% I see no red highlight, or stop playback within that range..   I'm using the black on black skin.  So the dark playlist background.
Are your files properly tagged as Audiobooks in the Media Sub Type field? It will only affect those.
That can be changed if you want to highlight based on different criteria, but I used that code since it should work anywhere, only affecting Audiobooks and nothing else.
Logged

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

Are your files properly tagged as Audiobooks in the Media Sub Type field? It will only affect those.
That can be changed if you want to highlight based on different criteria, but I used that code since it should work anywhere, only affecting Audiobooks and nothing else.

They are now.  that's amazing, thank you.

I just don't understand all this advanced stuff MC can do.  Its beyond me.  I'd love to know,  but just have a mental block with script, code etc  and it just all seems like math, and a wall of fog appears in my brain.

There is always more to discover with MC. 
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608

That's okay.  In most cases, you don't need it to use MC well.  And, if you want to do something a bit fancy, you can always ask here and someone will usually come along and give you something you can copy/paste into it to get close.

I even pop up and ask for help from time to time.  Regular Expressions make my eyes bleed.

(MrC I miss you!)
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

That's okay.  In most cases, you don't need it to use MC well.  And, if you want to do something a bit fancy, you can always ask here and someone will usually come along and give you something you can copy/paste into it to get close.

While we are on the subject of playlists.  Using the standard view.  When I change playlist it auto starts playback of item number 1. How can I stop this please.  

And also how can I have it scroll down to the last played file in that list and highlight it.  And can this work across zones.   I have headphones zone and speakers,  with the same playlists in each zone.
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353

They are now.  that's amazing, thank you.
I just don't understand all this advanced stuff MC can do.  Its beyond me.  I'd love to know,  but just have a mental block with script, code etc  and it just all seems like math, and a wall of fog appears in my brain.
There is always more to discover with MC.
Glad it's working for you. :)
 
I find that Media Center's Expression Language is relatively easy to learn as far as "coding" goes if you have a clear idea of what you're trying to achieve.
 
That code is basically saying:
   If the Media Sub Type is Audiobook,
   and the bookmark percentage is in the range of 10-90%,
   then color the name red.
   If the playback range is outside 10-90% or it is not an audiobook, display the name as normal.
 
The most complex bit is the second line that calculates the bookmark percentage, which was borrowed from this post by Glynor.
Even that isn't so complex when you break it down, it was just quicker to copy & paste his code than figure it out myself.
 
That's okay.  In most cases, you don't need it to use MC well.  And, if you want to do something a bit fancy, you can always ask here and someone will usually come along and give you something you can copy/paste into it to get close.
Yes, if it had not been for the help from you, MrC, and many other posters here, I wouldn't have a clue about the Expression Language either.
 
That's why I try to pay it forward by helping other users on here.

I even pop up and ask for help from time to time.  Regular Expressions make my eyes bleed.
(MrC I miss you!)
Yep.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608

Even that isn't so complex when you break it down, it was just quicker to copy & paste his code than figure it out myself.

Yep.  And that expression was built with the help of MrC and others itself.  I'm not sure if it was on the Beta board or not, but a few weeks before I made that explanation post, there was another one from me going "Help!?!  I want to build X and I can't figure it out!"
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

If you two don't mind, just another couple of questions regarding playlists.  Using the standard view.  When I change playlist it auto starts playback of item number 1. How can I stop this please. 

And also how can I have it scroll down to the last played file in that list and highlight it.  And can this work across zones.   I have headphones zone and speakers,  with the same playlists in each zone.
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353

If you two don't mind, just another couple of questions regarding playlists.  Using the standard view.  When I change playlist it auto starts playback of item number 1. How can I stop this please. 
And also how can I have it scroll down to the last played file in that list and highlight it.  And can this work across zones.   I have headphones zone and speakers,  with the same playlists in each zone.
I don't think there is an option for this unfortunately. It would be nice if there were.
Logged

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

I don't think there is an option for this unfortunately. It would be nice if there were.

Ah ok. there are limits then.  Would both of these ideas fit into JimH's 'too easy' thread?  

1.  Option to not auto play when changing playlists. 

2.  When changing playlists, and or starting MC up - to scroll down and highlight the last playing file (and options around this, inc type of highlight and colours).

would these things constitute making life easier and that could be easily implemented as per the too easy threads guidelines.
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71465
  • Where did I put my teeth?

Those would be feature requests.  They don't fit in that thread.
Logged

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

Those would be feature requests.  They don't fit in that thread.

Ok understood.  ta.

I've added them to the request list.

Can I ask if they are worth while features, which could be added to your list.
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

Try replacing the Name column with an Expression Column using the following code:
 
Code: (Name) [Select]
If(IsEqual([Media Sub Type], Audiobook, 1),
If(IsRange(PadNumber(Math(round(([Bookmark] / ([Duration, 0] * 1000)) * 100)),2), 10-90),
Delimit([Name],<//b><//font>,<font color="FF0000"><b>),
[Name]),
[Name])

Edit the Delimit() line if you want to change the formatting.
I just used red (HTML FF0000) so that it stood out.
 
The 10-90 at the end of the second line sets the percentage played which will highlight the current file. (i.e. anything in the range of 10-90% will be highlighted)



Although I've suggested this below in the request thread - more easier tools for managing audio books all in-UI and right click context menu.  Would you know how to code this up as an idea below.

Using your code has been great, it really has and I thank you for it.   I have an idea to further expand on this now.   A traffic light system which will show me at as glance how far each audio book track is.  Red >10% (like your code does now),   then orange for >50 but <80%,  and green for >80%.

So when I look at my many audio books in my playlist (card radio playlist) I can clearly see which have a remembered bookmark and how far along each one is.  
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'

JonnyRedHed

  • World Citizen
  • ***
  • Posts: 193

Try replacing the Name column with an Expression Column using the following code:
 
Code: (Name) [Select]
If(IsEqual([Media Sub Type], Audiobook, 1),
If(IsRange(PadNumber(Math(round(([Bookmark] / ([Duration, 0] * 1000)) * 100)),2), 10-90),
Delimit([Name],<//b><//font>,<font color="FF0000"><b>),
[Name]),
[Name])

Edit the Delimit() line if you want to change the formatting.
I just used red (HTML FF0000) so that it stood out.
 
The 10-90 at the end of the second line sets the percentage played which will highlight the current file. (i.e. anything in the range of 10-90% will be highlighted)


Something I've noticed over the last months since you first gave me this code snippet, when I return to the playlist many times or add new audio books into the car radio playlist, that the red highlight mark and place in the file are lost.  Is there a way to work around this so the highlight and place in the file is kept.
Logged
Namaste - 'bows slightly with hands pressed together, palms touching'
Pages: [1]   Go Up