INTERACT FORUM

Please login or register.

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

Author Topic: Saved Expressions or Smartlists Toolbox  (Read 2316 times)

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Saved Expressions or Smartlists Toolbox
« on: May 23, 2015, 11:02:28 am »

I'm getting my feet wet with expressions and it occurs to me that it would be useful to have some saved for utility purposes.  In particular, the ability to transfer these to another JRiver instance (Library), be it your own Library, or a friend's, etc.

I thought it would be smart to make a SmartList with some saved expressions *and* some expression columns that were useful and then I could save the list definition and import it to another Library.  It turns out that you can save the SmarList rules, but NOT the Expression Columns.

Let me give a concrete example that might illustrate what I'm trying to achieve:

Artists that have "The" as their first word are problematic.  A lot of people want these to show up as Artist, The.  Other people might want The Artist.  No one wants to have both of these types in their library.  So I did a really simple SmartList that searches for Artists with "the".  Then I made Expression Columns.  One column calculates "Artist, The" from the Artist field.  The other calculates "The Artist" from the Artist field.

By cutting and pasting the Column Expression, you can use these to fix your Artists and convert one type to another.  It's not automatic in any way, but it saves the expressions as columns, and the search as SmartList.

Let's say I want to help a friend clean up his Library, and I want to take this SmartList and 5 or 10 others that all help find and correct Library problems.  If I can't save Expression Columns, and I can't save SmartList definitions, what can I do to move around, save, and recall these valuable tools?

Thanks for any insight,

Brian.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Saved Expressions or Smarlists Toolbox
« Reply #1 on: May 24, 2015, 04:19:54 pm »

Bump.

I'd also like to ask:  Do any of  you do work on friends' libraries?  Either on their JRiver instances or on yours?  If so, I'd imagine you have some canned expressions that help you.  Things like finding special characters in Artist or Album names for example.

Or the one I've quoted above:  "The Artist" versus "Artist, The".  I've had instances in my own library where ripping different CDs yielded *both* of those for a single artist!  My SmartList that locates these, plus it's expressions is a nice tool for me to find those and correct them to one standard.

So how do you guys do it?  Surely you don't reconstruct Smart Lists and utility expressions from scratch, or even from cut and paste text file notes?  It seems like there must be a capability I'm missing.

At a minimum, I know that SmartList definitions can be saved and restored programmatically because there's a menu item to recreate all of the default SmartLists!

Any help is appreciated.  :)

Brian.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Saved Expressions or Smarlists Toolbox
« Reply #2 on: May 24, 2015, 05:06:03 pm »

I don't have a lot of time to devote to writing back, but a few thoughts:

* There is no great, simple Smartlist import/export that does sets of Smartlists.  That would be good, but there isn't one.
* You can save Media Views, however. Almost all of my cool smartlists are actually written as Media Views (which can do almost everything Smartlists can, but better).

* Smartlists themselves are really just saved searches, and I just use Import/Export and a text file when needed.
* Expressions are the same. They're just text.

* Everything is in a Library Backup, and MC can have multiple Libraries, so if I'm helping someone else, I can just restore my Library Backup onto their system, and then switch back and forth to copypasta between them.
Logged
"Some cultures are defined by their relationship to cheese."

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

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Saved Expressions or Smarlists Toolbox
« Reply #3 on: May 24, 2015, 05:51:40 pm »

What a rabbit hole this is...

So you can't save SmartLists.  But Media Views are saveable.  But how?  There are no options in the right click menus.  But on the View menu there's a Load/Save View... item.  But what the hell does it do?  The views are "saved" on the left Navigation bar already.  ...and using that menu item doesn't give you a disk location, just a name.  So what's it for?  Certainly not the type of "saving" we are discussing.  It doesn't even seem useful frankly.

Ok, let's look at the Wiki.  Nothing.  Fine, the wiki is a work in progress.  Web search.  Oh look a posting from Glynor from 2 years ago describing how the View save and load is pretty much non-functional.  Well, I learned where those options are, which were pretty difficult to find.  But, as Glynor said 2 years ago, there's no way to make the load work without some kind of workaround.

Glynor, what were you referring to with saving and loading Media Views above?  Certainly not what I found?

As far as cutting and pasting between libraries, isn't that really, really awkward?  You can't cut a view, or a smartlist, or anything except text.  Then you need to switch Libraries to do the paste.  In the case of a smartlist, sure you can cut the Import/Export definition, but what if you have 2 or 3 or 4 columns with expressions?  Cut and paste each one?  Awkward and slow.

I'm mildly frustrated, so I'm going to stop now.

I *do* thank you for trying to help.

Brian.

Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Saved Expressions or Smartlists Toolbox
« Reply #4 on: May 24, 2015, 06:05:43 pm »

It is functional, just weird.  It was functioning then, but I didn't figure it out till later.

There are posts on it somewhere.

All of the Media Views stuff in the wiki needs to be redone.  That's a long-term project, but it is huge.  If I was paid to do it...
Logged
"Some cultures are defined by their relationship to cheese."

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

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Saved Expressions or Smartlists Toolbox
« Reply #5 on: May 24, 2015, 06:51:16 pm »

Send the bill.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Saved Expressions or Smarlists Toolbox
« Reply #6 on: May 24, 2015, 06:59:59 pm »

What a rabbit hole this is...

It is certainly a hole in functionality in Media Center.  Migrating things from one Library to another is a very manual process. That's one big reason why I consistently recommend to users not to divide their Libraries unless absolutely necessary.

For helping friends and such, unless it is just a tweak here and there, I usually just import my Library Backup, wipe out all of the content, and then import their stuff into it.  For smaller things, the copypasta routine isn't too bad (especially if you can pull up your main server via TeamViewer, and switch back and forth quickly, which is what I've often done).

I agree, it could be better. You found before one of the threads where I whined about it.  But, there's always so much to do, and so many priorities.

A playlist and smartlist sharing feature would be awesome. Better importing/exporting of Media Views would also be awesome. You'll get no arguments from me there.  There are some tricks you can do with the files in the Library itself, but in there be dragons.

Send the bill.

I'll email you. I've been mulling a modest proposal around for a few months now.
Logged
"Some cultures are defined by their relationship to cheese."

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

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Saved Expressions or Smarlists Toolbox
« Reply #7 on: May 24, 2015, 10:26:27 pm »

In the case of a smartlist, sure you can cut the Import/Export definition, but what if you have 2 or 3 or 4 columns with expressions?  Cut and paste each one?  Awkward and slow.

One thing that may assist in this is the ability to run multiple instances of MC on the one PC at the same time. There is a setting for it in Options -> General -> Advanced.

With that set you can run a copy of different libraries in each instance, then copy and paste between then with minimum navigations around MC.

Of course, a large screen helps make this work a lot better. :D I have a 2560x1600 pixel screen, and can run two instances at 1920x1080 quite comfortably on that.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Saved Expressions or Smarlists Toolbox
« Reply #8 on: May 24, 2015, 10:38:40 pm »

but what if you have 2 or 3 or 4 columns with expressions?

I don't. If I need an expression in a column more than just as a test, I make it a calculated Field. Makes it a bit easier to restore them then, and they're then available to use in other contexts. Doesn't really help with the copypasta, except that it is quicker to do in the Library Fields manager.

I haven't ever had to do the two-instances trick Roderick mentioned (because I can always remote to my home machine), but that'd be a decent way too.

Like I said... It'd be nice.  But:

* It doesn't impact mere mortals, who shouldn't really be using multiple Libraries.
* I'd like it, but more than other stuff? I dunno... I'd vote for improvements to video streaming times 100 before this if forced to choose.
* I, personally, only encounter the issue relatively rarely because I don't have "split" Libraries except when their needs really don't intersect at all (in which case, I don't need all that stuff from my home Library).
Logged
"Some cultures are defined by their relationship to cheese."

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

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Saved Expressions or Smartlists Toolbox
« Reply #9 on: May 24, 2015, 10:59:25 pm »

I'm on a Mac and it doesn't have the run multiple instances option.  Darn.

But really my WHOLE reason for posting this was because I thought it would be useful to build up a collection of saved searches and expressions (and maybe other stuff?) that would be helpful in cleaning, maintaining, and fixing libraries.  I must be the only one that thinks of using JRiver in this capacity.

I guess I'll move on to something else now.

Brian.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Saved Expressions or Smartlists Toolbox
« Reply #10 on: May 25, 2015, 12:24:20 am »

I think this is just an "angle of approach" kind of thing here.

A smartlist is a saved search. If you need a reminder regarding the syntax, you can open the smartlist for editing, hit the import/export button, view the search string in there and be instantly refreshed.

MC also has a "Notes" section... (If you don't see it, enable it by looking in "Tools > Options > General > Features")
You can keep an inventory of search notes and examples in there, apply keywords to them, and reference them at will.
I did this for a while, but really, after some time, you reach a point where you have MC set up, running sweetly, providing everything you need, and you will find that you rarely need that list.

If you create some expression columns in a view, you can save the view, but more on that further down.
You could also save the set of columns as a preset, or, preferrably, as glynor has said, create a custom library field from that expression and then you can add it to any view you wish on whim.

Saving/loading views.
Here's a post I made nearly six years ago that is still valid today. Click

Customising/Creating views
Another couple of old posts that are still useful and current can be found here and here. For "cleaning, maintaining and fixing", I created a "Workshop" group in the tree. Under that, I have "Audio", "Image" and "Video", just like the defaults, but under those, I have views set up that allow me to deal with auto-imported stuff, duplicates, offline media, leaving the default media tree nodes to contain views specifically for browsing and enjoyment. You don't have to copy that workflow, I only mention it to give you an idea of the power available to you with the MC library. You can set it up almost any way you need, and then forget about it because everything you need will just work, and you will be happy. It just takes a bit of time, is all.

Finally, everything to do with your library and MC settings (except plugins) are saved in regular, automatic library backups. Look in the JRiver directory in your Documents folder. Your library is everything. Make backups of the backups folder. If you're embarking on some testing, make manual backups, then, if it all goes hopelessly pearshaped, you can restore in a few mouse clicks. My library is twelve years old now.

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Saved Expressions or Smartlists Toolbox
« Reply #11 on: May 25, 2015, 07:44:15 am »

Thanks for the reply Marko.

A smartlist is a saved search.

Yep, I understand.  That's why I wanted to save a SmartList externally!  So I can move it to another Library and import it.  This doesn't seem to be possible, unless I manually save the Import/Export string.  Which is do-able.  But what about Expression Columns?  You're going to remind me of saved views.  I'll address that below.

Quote
Saving/loading views.
Here's a post I made nearly six years ago that is still valid today. Click

In doing research, I read this post, and another that detailed the TWO locations that a saved view can be placed in order to recall it through the (nearly hidden) Load View item.  I tried them both:  The Saved Views folder insider your Library.  The Saved Views folder inside of the Data folder inside the Application.  Neither work on a Mac for some reason.  I think this is related to core View code on Macs somehow.  I say this because when you do Add View on a Mac, NO TEMPLATES other than Empty show up.  This exact same behavior happens when attempting to Load View from:

Customize View > Settings > Saved Views > Load View

Only "empty" shows up, even though I have a JVI file in both of the specified locations.

If that functionality worked, perhaps this conversation would be done, or moving towards more advanced functionality.  As it stands, I'm left with not much of a solution.  <shrug>

Quote
Customising/Creating views
Another couple of old posts that are still useful and current can be found here and here.

I've read through those, but need time to understand all of it.  Thanks for the pointer.

Quote
For "cleaning, maintaining and fixing", I created a "Workshop" group in the tree. Under that, I have "Audio", "Image" and "Video", just like the defaults, but under those, I have views set up that allow me to deal with auto-imported stuff, duplicates, offline media, leaving the default media tree nodes to contain views specifically for browsing and enjoyment. You don't have to copy that workflow, I only mention it to give you an idea of the power available to you with the MC library.

I like that idea.  It's very much in line with what I was after!  With the caveat that I want to copy my Workshop views to other libraries.

Thanks again for trying to help.

Brian.
Logged
Pages: [1]   Go Up