NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
« Previous 1 … 73 74 75 76 77 … 193 Next »
support shortcuts to folders in Music Library

 
  • 0 Vote(s) - 0 Average
support shortcuts to folders in Music Library
BobAtTorrey
Offline

Member

Posts: 118
Threads: 49
Joined: Jul 2005
#1
2007-12-02, 03:34 PM
This writing suggests that GBPVR Music Library handle Windows shortcuts to folders in the same way one would expect Windows shortcuts to work. This very minor change results in a powerful mechanism with which users may multiply categorize all their music. The explanation follows.

Mp3 ID tags, such as ID3v2 provide for a metadata description of ‘genre’. (Other music formats provide similar metadata tags.) However, the Genre tag as conceived and used is almost useless. Genre definitions aren’t uniform, and there are a limited number of genre types (at least as implemented by software such as Mp3tag). More importantly, it doesn’t reflect the multiple cross-indexing by which people would naturally consider organizing their music.

For example, imagine an album, which is Hawaiian slack-key guitar Christmas music. I might at different times be interested in a number of different categories (possibly with subcategories), in which I would want this album to found. I might want that album name to be shown when I look in any of the following categories which have meaning to the way I think about organizing my music:
• \Instrumental \Guitar
• \Christmas
• \Christmas\Instrumental
• \Regional\Hawaiian\Slack-Key
Obviously, a single Genre type cannot accomplish that.

I formerly used the My Music plugin (now abandoned). Back then I recommended this to reven (the plugin author). A few other users, when they saw the suggestion, realized the implications and supported the recommendation. I presumed the work to accomplish this (recognizing that an object (folder) is a shortcut, and then opening the target object) should be minimal and, in fact, reven had it implemented almost immediately.

I already had our music arranged, as a great many people do, as a folder for each artist, within which are the albums (folders) performed by that artist. This snapshot illustrates that.

[ATTACHMENT NOT FOUND]

Once the My Music plugin supported the shortcuts, I created a parallel tree-structure of folders to represent my categorizations, as shown in the snapshot below. (There I use the word Genre just for brevity, but it means categorizations.) Note it shows 3 shortcuts to albums existing under category \By Genre\Instrumental\Slack-key Guitar.

One of those albums is a Christmas album, and the identical shortcut appears under \By Genre\Christmas\Hawaiian because I assigned multiple categories to that album. [My shortcut names prefix the album name with the artist because it’s useful. I.e., you may mind multiple albums under a category new-age, but may feel at the moment prefer to hear ones by artist X rather than artist Y. All of that is just personal preference and immaterial to this proposal.] It just so happens the albums shown in the example don’t have a single artist and reside under an ‘artist folder’ called Various Artists. I.e., don’t ascribe any particular significance to the ‘Various Artists’ shown in the snapshot.

[ATTACHMENT NOT FOUND]

If Music Library simply supported shortcuts to album folders (i.e., seeing the shortcut, fetching the real album folder and its artwork), then I could follow this directory tree to see and play these 3 albums. Today, with Music Library, I can follow down the \By Genre directory tree, but when it gets to the bottom of the branch within which are shortcuts to folders, it shows nothing.

I hope all of that is clear. Please let me know if not.

I will tell you that this system worked wonderfully. The music library is too big (and our feeble brains don’t remember artist names), so being able to access by category fitting the mood, occasion, or holiday, makes life much simpler. My wife got so attached to it that now, without the My Music plugin which supported this, she is strong-arming me to just buy a multi-CD CD player (which would frost me when we have all the music on our hard drive).


CREATING THE SHORTCUTS:

To provide all this power, the ONLY thing that would have to be provided within GBPVR Music Library is handling of shortcuts to folders. The rest of the work -- that of actually defining the tree-structured categories, and creation of the shortcuts themselves -- is up to the user. I created some automation to do the hard stuff and would gladly change or generalize it as appropriate and make it available to others. For my own use, I automatically created a list of paths to all album folders in the By Artist directory tree. At the bottom level of the path of each folder, the folder name is the album name. Then for each album in the list, I appended (with a simple parseable syntax) the one or more categories under which I wanted each album to appear. I then created a Windows PowerShell script which reads the list, and for each album’s categories, creates any portion of the \By Genre directory tree that doesn’t already exist, and creates in the right category folders the shortcuts to the album. Running this script builds everything.

Using a single list, as I did, was very simple. However, the category information might instead, for example, be in a categories.db hidden file within each album/folder. Or, it could similarly be unique parseable text within the Comments or Keywords metadata in the album art .jpg file. If there were something of a consensus in favor of some such other method, rather than an edited list as I used, I would gladly change the automation appropriately and share it.

Additional Thoughts:

It might be argued that there may be tracks within a single album which could be categorized differently than the entire album, and therefore shortcut processing should be done for not just folders, but for music files as well. I don’t think that’s worth doing (I haven’t thought through the consequences), and just implementing shortcuts for album folders certainly covers 99+% of the need. [Besides, I want to minimize your (Sub’s) effort to maximize the chance of your agreeing. Smile ]
-Oz-
Offline

Posting Freak

Posts: 803
Threads: 33
Joined: Aug 2006
#2
2007-12-02, 04:20 PM (This post was last modified: 2007-12-02, 05:45 PM by -Oz-.)
Have you ever tried use Music Library 2? It is pretty powerful. http://gbpvr.com/pmwiki/pmwiki.php/Plugin/MusicLibrary2

It uses ID3 tags for organization.
Dan Blomberg
[SIZE="1"]HTPC 1: MSI K8NGM2-FID, AMD 64 3000+, WD 200gb HDD, 1gb ram, NSK2400, PVR-500, Harmony 659
HTPC 2: ASUS M2NPV-VM, AMD 64 3200+, WD 250gb HDD, 1gb ram, nVidia DualTV MCE, NSK2400, Harmony 720
HTPC 3: GIGABYTE GA-E7AUM-DS2H GeForce 9400, Intel E5200 Wolfdale, WD 640gb HDD, 4gb ram, Antec Fusion 2, HVR-1600, hdhomerun, Harmony 880, PCH A-110
GBPVR 1.4.7 Additions: Weather2, UltraXMLTV, Comskip
Project: Setup Logitech Harmony Remote[/SIZE]
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,940
Threads: 956
Joined: May 2006
#3
2007-12-02, 04:44 PM
You can manually do this yourself with the Windows NTFS equivalent of symbolic links using the command mklink and if you are running Vista you can even span drives.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#4
2007-12-02, 05:45 PM
You typed such a long post I couldnt bring myself to say "no"... Big Grin

Your wish is granted (see http://forums.gbpvr.com/showpost.php?p=2...stcount=34).
mila06
Offline

Member

Posts: 210
Threads: 47
Joined: Dec 2005
#5
2007-12-02, 09:38 PM
BobAtTorrey Wrote:[Then for each album in the list, I appended (with a simple parseable syntax) the one or more categories under which I wanted each album to appear. I then created a Windows PowerShell script which reads the list, and for each album’s categories, creates any portion of the \By Genre directory tree that doesn’t already exist, and creates in the right category folders the shortcuts to the album. Running this script builds everything.]

Would you show us the script. Sounds very nice !
Michael Larsen

[SIZE="1"]HTPC:
Asus AMD 785G- M4A785TD-M/EVO, ATI 4200 HDMI,
AMD Phenom II X2 550 - 3.0 GHz,
2 GB Ram, 500 GB Seagate Barracuda
Terratec Cinergy C PCI HD, NVidia PureVideo, Cyberlink
Windows 7 ULT, NPvr v1.5.33[/SIZE]
Website
BobAtTorrey
Offline

Member

Posts: 118
Threads: 49
Joined: Jul 2005
#6
2007-12-03, 12:47 AM
mila06,

Sure.
I cobbled things together for my own purpose, so it was a multi-step process, described below.
First, understand that my starting point was that our albums are ordered in a directory structure by artist. The leaf of each branch is a folder which represents a single album. Example:

[ATTACHMENT NOT FOUND]

So the process was:

1. A PowerShell script which lists the artist-folder\album-folder for all albums.
(Windows PowerShell is a free download from Microsoft.) Here is that script:

[SIZE="1"][COLOR="SeaGreen"]# this script lists the full path and file name for all 'music-album folders' under a given directory root.
# To be a 'music-album folder' it must contain at least one file with the extension of mp3 or wma.

# the output of this script is meant to be piped to a text file

#$MusicAlbumRoot = "c:\Documents and Settings\Bob\My Documents\testmusic\Albums By Artist\"
$MusicAlbumRoot = "\\Blackwinxp\Media (f)\My Music\By Artist\"

dir $MusicAlbumRoot -recurse | where {".mp3",".wma" -contains $_.Extension} | foreach {$_.DirectoryName} |sort|unique
[/COLOR][/SIZE]

2. I imported the resulting list into Excel. The list is in column A, and I added any categories I assigned to each album in columns B, C, D, etc. Here's an example:

[ATTACHMENT NOT FOUND]

3. I then created a text file that looked like that below. I don't recall if I just munged the columns together with a separating % (as seen in the text below) with an Excel formula, and then exported it -- or used the CSV export and defined % as the CSV separator. It was probably the former and it was likely then that I also prepended the complete path to the file. (In the example below it happens to be a network path because I developed the stuff on a different PC from the one where the music resides.)

[SIZE="2"][COLOR="Blue"]\\Blackwinxp\Media (f)\My Music\By Artist\The Allman Brothers Band\A Decade of Hits 1969-1979%Rock%
\\Blackwinxp\Media (f)\My Music\By Artist\The American Boychoir\On Christmas Day%Christmas%Christmas\Choral%
\\Blackwinxp\Media (f)\My Music\By Artist\The Beatles\Anthology 1 Disc 1%Rock%
\\Blackwinxp\Media (f)\My Music\By Artist\The Beatles\Anthology 1 Disc 2%Rock%
\\Blackwinxp\Media (f)\My Music\By Artist\Various Artists\Jazz for the Quiet Times [32 Jazz]%Jazz%Easy Listening%%%
[/COLOR][/SIZE]

4. Finally I ran a Powershell script that takes that list with categories and creates all the necessary directories and shortcuts to the album folders. That script is:

[SIZE="1"][COLOR="SeaGreen"]# PowerShell script to create shortcuts to albums in a directory hierarchy of genre/categories

# input file is of the format:
# AlbumPath&Title % GenrePath1 % GenrePath2 % ... % GenrePathN
# where:
# GenrePath is relative to some directory root, defined somewhere below

# pre-set variables (perhaps in the future make these parameters to the script)
$AlbumGenreMapFile = "D:\My Documents\testmusic\Album-Genre map.txt"
$GenreRoot = "\\Blackwinxp\Media (f)\My Music\By Genre\"
$AlbumRoot = "\\Blackwinxp\Media (f)\My Music\By Artist\"

# process each line of the input file
$f = [System.IO.File]::OpenText($AlbumGenreMapFile)
while($line = $f.ReadLine())
{
[string[]]$pieces = $line.Split("%",20,[StringSplitOptions]::RemoveEmptyEntries) | foreach {$_.trim()}
$AlbumPath = $pieces[0]
[string[]]$GenreList = $pieces[1 .. ($pieces.Length-1)]
# get the artist and album title from the folder path
$a = $AlbumPath.Replace($AlbumRoot,"")
$a = $a.split("\")
$artist = $a[0]
$album = $a[1]
echo ("["+$artist+"] -- " + $album)

# loop for each genre/category specified for this album
foreach ($genre in $GenreList)
{
# ensure a directory path exists for that genre/category
$quiet = [System.IO.Directory]::CreateDirectory($GenreRoot + $genre)
# in that genre/category folder, create a shortcut to the album folder
$o = $(new-object -com Wscript.Shell)
$s = $o.CreateShortcut($GenreRoot + $genre + "\[" + $artist + "] " + $album + ".lnk")
$s.TargetPath = $AlbumPath
$s.Save()
}
}
$f.Close()
[/COLOR][/SIZE]

That results in a genre/category directory tree looking like:

[ATTACHMENT NOT FOUND]

And with that, and with the new capability Sub just added, you can find and play all your music via one or multiple categories that you assign.

Hope that helps.

Cheers .... Bob
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  tvg-id support groenator 12 6,895 2023-08-20, 08:55 PM
Last Post: mvallevand
  Play music from browser VCR58 4 1,004 2023-06-10, 04:24 PM
Last Post: sub
  Music Album Art Bobins 0 525 2023-04-25, 01:47 PM
Last Post: Bobins
  Feature Request: EIT Support, plus Stop and Save Recording. Chris4877 8 1,721 2022-09-12, 12:58 AM
Last Post: mvallevand
  [Kodi] Directory Folders for Recordings Panic 14 3,157 2022-07-28, 03:59 PM
Last Post: mvallevand
  Local Media Library with NAS Connectivity joestk 1 1,114 2022-05-27, 06:35 PM
Last Post: mvallevand
  USTV support buntay20 60 8,941 2021-12-23, 01:53 PM
Last Post: mvallevand
  HbbTV Standard Support aderlopas 8 4,422 2020-11-08, 08:55 AM
Last Post: aderlopas
  TV Everywhere Support (Maybe via Extra) pkscout 2 1,757 2020-11-06, 07:15 PM
Last Post: pkscout
  install change-startup and start menu shortcuts paulc 0 944 2020-10-03, 06:13 AM
Last Post: paulc

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode